Developers October 19, 2020

Best way to handle sign up flow? (Bit technical)



Just want to reach out to the community and get some thoughts on this.

I've never built a signup subscription flow and was wondering if there's a best practice to follow?

I'm currently using Auth0 and Servicebot for auth and subscription management. I'm thinking sign up the user and store the subscription status in the Auth0 user metadata. A user would sign up first with Auth0 and then be redirected to the billing page. Upon completion, update the user metadata with "subscriptionPaid: yes" etc. I was thinking, if a user had created an account but didn't complete billing, they'd be redirected there on login (not sure how to do this on Auth0 yet).

Is that process sound? What process did you follow?

  1. 2

    I haven't used it yet but I've been looking at since it's recommended a lot here. Seems like it simplifies a lot of the logic and edge cases for subscription billing.

    At launch I'm just letting the platform be free for beta users.

    I'm using magic links ( for sign-up and sign-in because I really like that experience as a user. Also it simplifies things a lot on my end as the developer.

    1. 1

      Hi, thanks for that Kenneth. Having a look at Paddle :)

  2. 1

    I think your fundamentals are correct.

    The way I do this is I have a "paid: (boolean)" flag as part of the user table.

    In my controllers, this flag is used to allow / deny the user access to certain functionality. It is also used to redirect users to an upgrade screen, in certain cases e.g.


    redirect_to upgrade_path and return if !current_user.paid?

    When a user upgrades to a paid account, Stripe sends a webhook to my app - I then update the flag to "paid: true" and the user can then access the features they need.

    When a user cancels, Stripe sends a different webhook and the flag goes back to "paid: false" and the user is no longer able to access paid features.

    1. 1

      Hey @yongfook, great okay. Thanks for that.

Recommended Posts