#gracine
1 messages · Page 1 of 1 (latest)
Hey there
Hi!
Hmm coupon still applied even though you have applies_to set?
Can you provide the Subscription ID that I can look at?
sure
sub_1MFitTDDSPupZJdPiTDIBuaI
In the Coupons page I cannot see where the product applied to
is it me or ... ? I can only see it at the creation form
I do see that you set applies_to . In the Dashboard it shows under "Applicable Products"
let me retry aggain
Ah no it is all correct
So the coupon will still be shown
But notice that it is $0
The coupon isn't removed in this case but it won't actually discount at all since the product doesn't apply
You should be able to see this when looking at the upcoming invoice in the Dashboard here: https://dashboard.stripe.com/test/subscriptions/sub_1MFitTDDSPupZJdPiTDIBuaI
So all looks expected to me and the next invoice won't be free
No worries
let me retry, 2min
Sure
Hum
I still have my coupon applied
Subscription id: sub_1MFjAhDDSPupZJdPckr9Iyvh
I applied coupon id: Tblfxl7u for Premium subscription
then upgraded to Pro subscription
coupon is still applied to the pro
Same thing. It is expected that the coupon shows up as a line item, however it will discount $0 since it doesn't actually apply to that product
ah
I see
the confusion is that it is still displayed
Discount
100% off forever
should I manually remove it in the subscription update then ?
Yes if you don't want it to be displayed then you should remove it
explicitly nil it
Yeah try setting an empty string for coupon on the update
ok great
last question
if user subscription has been setup with a subscription schedule
i need to update the schedule , not the subscription by id ?
I am a bit confused on that part
Mostly yes
Depends on what update you are doing
But yeah, you likely want to be updating the Schedule as that will be controlling the underlying Subscription
I have schedule to have a coupon for 12 months, and then remove the coupon
but if the user upgrade to a higher plan, i want to change the price id of the subscription and remove the coupon
so in that case I could simply update the subscription directly since i want to invalidate the remove coupon phase anyway
that would all be done in the single update call ?
Why are you using a Schedule for that instead of just a coupon with a duration set?
A Schedule is much more complicated here
Are you aware of https://stripe.com/docs/api/coupons/create#create_coupon-duration?
good question 🙂 I integrated Stripe after real production users signed up and I needed to set the duration dynamically based on their creation date
because the deal was 12months free from the signup
In that case I found the subscription schedule to be really simple and elegant
But maybe it was not the best way to achieve this
Gotcha
So in this case I believe you would update the Schedule itself to remove the coupon from the new phase. However, I don't recall exactly the behavior here on whether you can just update the underlying Subscription and release the schedule. I'd recommend testing this out using Test Clocks.