I am trying to have stripe payment setup before my customers get access to all the protected pages in my Next JS app and even account sign up pages. I don’t want customers to first sign up for an account and then pay for the product. However I am stuck in the process.
To avoid unnecessary sign ups I have protected my /signup page using clerk middleware. And Stripe doesn’t redirect to a protected page. How to I get the customer from stripe payment link to a protected registration page at clerk?
I have also tried magic link authentication but that destroys customer flow and takes them away from the web app.
Manpreet Singh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.