nextjs-subscription-payments icon indicating copy to clipboard operation
nextjs-subscription-payments copied to clipboard

Fix lifetime payment option and manage|subscription button routing

Open anthony-som opened this issue 10 months ago • 1 comments

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: image Result: image

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 avatar Apr 17 '24 01:04 anthony-som

@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.

vercel[bot] avatar Apr 17 '24 01:04 vercel[bot]

Hey! Good suggestion. While we aren't going to merge this into the main template, you can definitely use it for your fork 😄

leerob avatar Jun 07 '24 01:06 leerob