User sign up issue

This is my current workflow upon user filling in the sign up form and clicking on the sign up button:

  1. If user exists (but has not paid), delete the user and log user out
  2. Sign up user
  3. Redirect to Stripe payment page

I included step 1 because sometimes users abort the payment and retries, and step 2 cannot run again because the user already exists.

But somehow there are some users who complete payment but the user is NOT created (I suspect it’s due to Step 1 that deleted it). I’m not sure how this happens - maybe the user clicks Back after payment or something.

Any idea how to resolve this? Or any documentation on the proper workflow for signing up users? Thanks!

It’s hard to know exactly what’s going on behind the scenes. My first question is, why does step 3 come after step 2?

Remove step 1 and use these flows
Step 1. If user doesn’t exist, sign up and then Stripe
Step 2. If user exist but hasn’t paid, login and then Stripe

1 Like

Good question. I’m just following this video:

Also, I guess we need to store the user-entered details (name, email, password) somewhere before the payment is actually made? Specifically, it would be difficult to store the password in a temporary data type other than in User?

Thanks, I’ll try this.

Step 1. If user doesn’t exist, sign up and then Stripe
Step 2. If user exist but hasn’t paid, login and then Stripe

But I’m suspecting the issue is due to a time delay in the Stripe web hook that marks the user as having paid.

When the sign up page gets reloaded somehow, Step 2 might still ask the same user to pay again. Even though he/she might have already paid.

But this would definitely be safer than deleting the user :sweat_smile:

Any particular reason why you’re using Stripe web hook rather than any traditional payment confirmations?

I used Bubble’s Stripe plugin before. There were a lot of issues and limitations.

Have you tried it before?

We’re using Stripe js plugin
It’s working great

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.