armand
BABetter Auth
•Created by armand on 4/5/2025 in #bug-reports
Stripe plugin: seems we can't reactivate a canceled subscription
Hello,
The title is self-explanatory, once a subscription is canceled, it seems there's no way to return to the portal to reactivate it before it truly gets canceled.
Steps to reproduce:
1. Call
authClient.subscription.cancel
2. Then, try to call authClient.subscription.upgrade
(only other method available)
3. You get: You're already subscribed to this plan
After a quick digging in source code, I found the issue in the upgradeSubscription
endpoint (packages/stripe/src/index.ts
). The code doesn't check cancelAtPeriodEnd
when validating subscription status:
A potential fix would be to add cancelAtPeriodEnd
check to allow reactivation of canceled subscriptions:
Am I missing something, or is it really a bug I ran into?2 replies