#kushal-subscription
1 messages · Page 1 of 1 (latest)
👋 happy to help
if you want to keep the schedule then you have to update the schedule otherwise you can release the subscription from the schedule
could you please elaborate more on what you're trying to achieve so I could try to better help you?
hi
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
i am implementing the subscription in my web app when user is downgrading his plan from yearly to monthly i am creating a schedule and in first phase i am continuing the yearly plan to the end date and then in the second phase i am switching to the new plan once the current plan is expired so while in i in the first phase if user decides to cancel the terminate his subscription how should i proceed i want to terminate his subscription only when his current plan expires not before that so i used to modify the subscription to
changing the cancel_at_period_end == true now i can not do that can you please help.
So you just need to update the phases based on the desired state. For your case, if the user cancel his subscription, you need to remove the phase for monthly plan and keep just the phase with the yearly plan. Don't forget to update the schedule end_behavior to cancel
https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-end_behavior
So that the subscription will cancel at the end period of the yearly plan
thank you i have also set the end_behavior="release" to keep the subscription going so i need to change it to the cancel too
Should work, yep!
thank so much for your help
i also want to achieve the A pro rata behavior while i am modifying my subscription
ie. when current user has a monthly subscription and if he wants to switch to the yearly subscription i want to switch it immediately and only charge him according to the usage.
ie. if monthly subscription is 20$ and yearly is 200$ i want to charge him only 180 and modify the the new yearly subscription start date to the date when the monthly subscription started is this possible and recommended approach?
You can take a look at prorations
https://stripe.com/docs/billing/subscriptions/prorations
While updating the subscription you can specify billing_cycle_anchor=now and proration_behavior=create_prorations to achieve that scenario
thank you so much you guys are really helpful.