nextjs-subscription-payments
nextjs-subscription-payments copied to clipboard
Fix lifetime payment option and manage|subscription button routing
Description: Added/Fix Lifetime option
- type BillingInterval contained 'lifetime' option when stripe does not offer a 'lifetime' interval.
Solution
- worked around this issue by creating a one-time payment option on the product which would have a 'null' interval value on the database. Work with this to set the 'lifetime' value to null
Result
Database value:
Result:
Description: Add route to price button
- Manage button for subscribed users would route them to another subscription payment link
Solution:
- added condition to onClick; if user is subscribed, manage button routes them to /account page where they can access customer portal
@anthony-som is attempting to deploy a commit to the Vercel Solutions Team on Vercel.
A member of the Team first needs to authorize it.
Hey! Good suggestion. While we aren't going to merge this into the main template, you can definitely use it for your fork 😄