#duracel-schedule-error
1 messages · Page 1 of 1 (latest)
duracel-schedule-error
@orchid perch your call is to the Update SubscriptionSchedule API https://stripe.com/docs/api/subscription_schedules/update. This API does not support a customer parameter nor a start_date parameter (that's only on create)
Is there another way to add a new schedule to an existing subscription?
My use case is when a customer is subscribed to an annual plan and decides to switch to a monthly plan. I'd like to subscribe them to the monthly plan at the end of the current subscription's billing cycle (a year from now)
So you have an existing Subscription. What you want is
1/ Create a SubscriptionSchedule from that existing Subscription using from_subscription
2/ Update that Schedule and pass the same first phase (current one) and add a new one at the end that makes the switch to the new Price
1/ Don't use this tool you're going to just struggle and struggle and struggle. Use real code based on the Stripe client library/SDK your usual code uses
2/ Read the docs about schedules carefully
3/ You have to pass all phases on update, not just the new one
If I just created a SubscriptionSchedule from an existing schedule, wouldn't that schedule be phase[0] and then the new one be phase[1]?
yes
When you create the schedule look at the exact response, it has an entire phase in it and you have to re-pass all relevant phases. It's... convoluted I would say
We're working on a better approach in the future where you can "amend" a schedule and add new phases
I'm using this tool because my app is built in Bubble and I've been unable to use the code from stripe there, so parameters are the only way for now
you can still write code locally as a developer