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

subscription.prices.products.name still has the name of the previous plan after I just changed my plan

Open VincentLu91 opened this issue 3 years ago • 1 comments

I just changed my subscription plan to a new plan before the end of billing cycle.

However I checked my Supabase subscriptions table and it still shows the price_id of the previous subscription plan I used.

Not sure why, but I know this behaviour because on the frontend when I go to the Account page it still says "You are currently on the ${subscriptionName} plan" where

const subscriptionName = subscription && subscription.prices.products.name;

And the value I see there is the name of the previous subscription plan!

Whereas on the Stripe checkout I see that the plan I'm using is the new one.

Does the subscription plan name in the DB change on the next billing cycle?

VincentLu91 avatar Nov 01 '22 17:11 VincentLu91

Yes, if don't allow changes to product during billing cycle is checked in stripe. This prevents customers from canceling before billing cycle has ended. I would review settings in stripe and update supabase db. Let me know how it goes.

Happy coding.

mworks-proj avatar Feb 28 '23 19:02 mworks-proj