#AndrewAndyAndy
1 messages · Page 1 of 1 (latest)
stripe.subscriptionSchedules.update(data.scheduleId, {
end_behavior: 'release',
phases: [
{
start_date: data.currentPeriodStart,
items: [
{
price: data.priceId,
}
],
iterations: 1,
},
{
proration_behavior: 'none',
items: [
{
price: updatedPricedIdKey[data.priceId],
quantity: 1,
}
],
},
],
}
Is the coupon's duration once?
we have some that are forever
Interesting. Can you send me the ID of one of these subscriptions that lost the coupon across phases?
sub_1KLuePDnkobEEnenm7XvgMzb
So now that I look at it, I see that coupon is a per phase property and it doesn't exist in the default_settings hash on the schedule https://stripe.com/docs/api/subscription_schedules/object#subscription_schedule_object-phases-coupon
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So I think currently the API wants you to specify the coupon in each phase for which it applies
I'll double check that as it is a bit surprising
okay thank you
Would the coupon still remain in tack after the subscription schedule end behavior has 'release'
If it is on the last phase, yes it should
Yeah unfortunately I am not currently seeing a way to apply a discount to the entire schedule. I can put in a feature request for it if you would like but for the moment I think setting it in each phase is the intended way to go
okay sounds good thank you for your help
can you put a feature request, that would be helpful
Will do! Glad we found a short term solution at least