#gracine

1 messages · Page 1 of 1 (latest)

wanton slateBOT
worthy plaza
#

Hey there

fleet owl
#

Hi!

worthy plaza
#

Hmm coupon still applied even though you have applies_to set?

#

Can you provide the Subscription ID that I can look at?

fleet owl
#

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

worthy plaza
#

I do see that you set applies_to . In the Dashboard it shows under "Applicable Products"

fleet owl
#

let me retry aggain

worthy plaza
#

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

#

So all looks expected to me and the next invoice won't be free

fleet owl
#

yeah now I see it...

#

probably my bad

worthy plaza
#

No worries

fleet owl
#

let me retry, 2min

worthy plaza
#

Sure

fleet owl
#

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

worthy plaza
#

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

fleet owl
#

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 ?

worthy plaza
#

Yes if you don't want it to be displayed then you should remove it

fleet owl
#

is it in the update call

#

like {...,coupon: nil }

worthy plaza
#

Yep I believe you use an empty string

#

Checking

fleet owl
#

explicitly nil it

worthy plaza
#

Yeah try setting an empty string for coupon on the update

fleet owl
#

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

worthy plaza
#

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

fleet owl
#

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 ?

worthy plaza
#

Why are you using a Schedule for that instead of just a coupon with a duration set?

#

A Schedule is much more complicated here

fleet owl
#

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

worthy plaza
#

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.

fleet owl
#

yes will do

#

thanks for your help