#Loterak
1 messages · Page 1 of 1 (latest)
Yep this is a great use-case for subscription schedules
https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#existing-subscription
Depends on the end_behavior: https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-end_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
By default, the schedule will just end and the underlying subscription will be intact and continue to run
The last message you sent means that if a user on a "Basic" plan schedules a change to a "Premium" plan, once the schedule is released they would go back to "Basic"?
No they would remain at whatever the last phase was
Okay that's perfect then! Last question. What would need to be the start date in order for the schedule to go into effect before the user gets billed on the "Basic" plan?
Not sure I understand
Imagine a user is on the "Basic" plan and their billing cycle ends July 1. They select an upgrade to "Premium".
I want the system to apply this upgrade for the next billing cycle, not the current one. If I set the schedule to start on the end of the current billing cycle, what ensure that they won't get billed for the "Basic" plan first and then switch to "Premium"?
You would need to set the end_date of the current phase (the basic plan) to be just before the timestamp of the next renewal: https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-phases-end_date
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can find the time that the basic plan will renew by looking at the billing_cycle_anchor on the subscription: https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_cycle_anchor
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.