#erickrobertson
1 messages · Page 1 of 1 (latest)
Stripe supports updating the subscription immediately or only after the current plan ends. Here are their docs:
- Update subscription plan immediately: https://stripe.com/docs/billing/subscriptions/upgrade-downgrade
- Update subscription plan in the future with subscription schedule such as after current billing cycle ends: https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#upgrading-subscriptions
If the business requirement is to only update the plan upon renewal, i.e. after current cycle ends, then option (2) should fit the use case
The business requirement is for the customer to select which plan they wish to use for renewal. It seems like I would need to know this ahead of time in order to use the second option.
For the first option, it seems I would need to update the plan appropriately. Then set the current_period_start and current_period_end dates, and set the billing_cycle_anchor so that it put them on the proper schedule for the next renewal under the new plan. Would that be the proper approach?
or do I just need to change the plan data and I don't need to touch the current period start or end dates or the anchor time?
For the option (1), plan will be updated immediately. billing_cycle_anchor is simply changing the billing period, but it has nothing to do when the plan will be changed. current_period_start and current_period_end in a Subscription can't be updated.
For the option (2), it's also possible to add the subscription schedule after you know the timestamp of the renewal on existing subscription: https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#changing-subscriptions
For option (1) if someone has paid for a year, and their current_period_end is January 2024, and they want it to renew monthly after that, all I need to do is to update the subscirption to change to the new price?
Yes, but you can only update the subscription when the current cycle ends, which is January 2024. Any update via option (1) will update to the new price plan immediately.
For example,
- Subscription is created on 5 Jan 2023 with yearly plan
- Subscription will have
current_period_endon 5 Jan 2024 - If the subscription is updated to monthly subscription on 5 Feb 2023 (one month after the subscription starts), the price plan on the subscription will be changed to monthly immediately and the billing amount will be prorated
- Customer will be billed on the monthly basis on every 5th of the month
does that mean that the customer will be given a credit for the remainder of the year they did not use, and their monthly billing will pull from that credit until 5 Jan 2024, and then it will start billing monthly?
There's a part of me that also wonders, would it be better just to encourage the customer to disable automatic billing in this case, and they can renew to the monthly plan when it expires?
does that mean that the customer will be given a credit for the remainder of the year they did not use, and their monthly billing will pull from that credit until 5 Jan 2024, and then it will start billing monthly?
Yes, correct!
There's a part of me that also wonders, would it be better just to encourage the customer to disable automatic billing in this case, and they can renew to the monthly plan when it expires?
No, that's not how it works. Stripe will not expire a plan on a subscription. Upon updating to the monthly plan on the subscription with option (1), the subscription will be changed to monthly plan.
The recommended approach is to use Subscription Schedule, i.e. option (2) to schedule the renewal to the new plan when the current billing cycle ends
You shouldn't use option (1) if you are looking for updating the price plan in the future such as after the billing cycle ends
if the customer were to change their mind before the current billing cycle ends, and we set the item back to just the original item, would we then just need to update the phases to undefined to remove them?
You can release the subscription schedule, so that no change will be made in the future: https://stripe.com/docs/api/subscription_schedules/release
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.