#andrew-schedule-update
1 messages · Page 1 of 1 (latest)
proration_behavior: 'none',
items: [
{
id: subscriptionItemId,
price: priceId,
quantity: 0,
deleted: true,
},
{
price: updatedPricedIdKey[priceId],
quantity: 1,
},
]
}
this was my original code , while it works,I did not realize i can set a schedule
Actually I just tested this myself. Good timing
So you are trying to create a Subscription Schedule? Or just update the existing Subscription?
I was trying to replicate the UI and saw that there was a end of the current period option on it. So which ever can do that?
It seems like setting a schedule would make more sense
I was trying to replicate the UI
What UI are you referring to here?
oh yes, sorry for the confusion
Yes the Dashboard is taking advantage of Subscription Schedules in this case.
In particular this is an example of how you might use the end_behavior parameter. Where you can set the subscription to cancel at the end of the current phase.
https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-end_behavior
This is basically how we suggest using the Subscription Schedule to create an Installments plan: https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#installment-plans
@mint prairie I wouldn't want to cancel the subscription
Okay in that case you would set the end_behavior to release. This would end the Schedule but continue the subscription with the same price as in the last phase of the schedule.