#Ninjesus - coupons
1 messages · Page 1 of 1 (latest)
Hello đź‘‹ , catching up on your question...
Do you have the ID of a specific subscription that you saw this behavior with?
I think this is expected behavior, that the full coupon will be applied to any subscription cycle in which the coupon is active.
Is the coupon a flat rate or some percent off?
it is a flat rate
I recreate a subscription with the test clock and I send you the id
sub_1KwXhSQ69qZCyjRMo4kc0c0E
here it is,
the Jul 02 invoice should not be €50, it should be something around €52.39
wait my calculus might be bad, it should be more like €57.61
as the coupon is planned to apply only from July 2 to July 6 on the Jul 2 - Aug 2 period
Thank you for the info. Checking in to this
hi @tight widget I'm taking over for @icy pewter. Give me a few minutes to get caught up
Hi, alright
So this might be a bug on our end (or, if it's intended behavior, it feels maybe a bit unintuitive). Let me reach out to someone internally and see if I can get some assistance in looking at this
ok I stay around
Alright, I know what's happening. This is expected behavior.
So the key thing here is what is mentioned in the “COUPON DURATIONS” box here - https://stripe.com/docs/billing/subscriptions/coupons#creating-coupons.
Creating a coupon for a specific duration will fully apply it to all invoices in that time period.
Your specific coupon was created with duration_in_months: 2, so that means all invoices created from when the coupon was added --> two months later will all have that coupon fully applied. So since the coupon was added on May 6th (when you updated the billing_cycle_anchor, it’ll be applied to any Invoice that is created before July 6th (which matches the behavior you're seeing).
Does that make sense?
oook it kind of makes sense, If I want my "2 month" coupon to be prorated I must then cancel it before the Jul 2 invoice and create a percent off calculated to match the remaining days ?
It is a bit unintuitive, but I understand that is how it works. Could be really helpful if stripe proposes a coupon_proration_behavior or something like this, like either apply coupon to entire invoices that are emited in the time span, or prorate using the discount end timestamp when invoice is for a subscription period
Yeah, for cases where you have to update the billing_cycle_anchor, you'd want to either (a) set the coupon after the first invoice is created (which in this case gives them 10EUR off of June and July) or (b) manually calculate the coupon total for the first Invoice (before that Invoice is paid) and apply a new coupon for 10EUR off 1 month after the Invoice is paid.
I guess I'll go for the manual calculation, it will fit the natural expectations of my clients when they set a first 2 months discount and they want a billing cycle anchor at the beginning of following month
at least it is easy to do the math, I have the original discount end timestamp and the subscription billing period start and end timestamps