How to redirect user to the billing page

Hello, I was setting up billing in my app and I wanted to redirect the user to the billing page if they haven't already paid. Like if a user comes to the site, register's using their Google account, then once they come to the billing page say they change the URL to go back to the landing page, login with this newly created account then they will have effectively just bypassed the billing. I'm already checking to see if the user has paid in my middleware but as of now all I can do is redirect them back to the homepage but they can't ever pay so instead I want to redirect them to the billing page. I'm using the Next JS app router SDK.
5 Replies
CB_Kinde
CB_Kinde2w ago
Hey there. Sorry for the late response, I'll see if @Patrick can pick this up, otherwise another support rep will get back to you as soon as possible.
Abdelrahman Zaki - Kinde
Hi @A person, Thanks for sharing the details. I’m currently investigating the best approach for handling this flow with the Next.js App Router SDK. I’ll get back to you shortly with a clear recommendation.
A person
A personOP2w ago
Sounds good thank you
Abdelrahman Zaki - Kinde
Hi @A person, Thanks again for your patience. I was able to reproduce the issue on my end so the behavior you described is confirmed. I’ll need to check in with one of our experts to make sure we recommend the best path forward. Since we’re heading into the weekend, I’ll pick this up with them tomorrow and circle back to you shortly after with a clear solution.
Koosha-Kinde
Koosha-Kinde2w ago
Hey there,

Thanks for reaching out and trying out our billing feature.
I too was able to replicate the scenario you mentioned.

In Kinde we allow for states where you have users without a plan subscription and those that do (and they get the related entitlements of the plan subscription).

Are you looking to implement billing for a B2C, B2B or other type of application?
Also, do you want to ensure all users have a paid plan when accessing your product?

Looking forward to hearing back from you.

Did you find this page helpful?