#t90

1 messages ยท Page 1 of 1 (latest)

wanton capeBOT
fast trout
#

Hi ๐Ÿ‘‹ could you share the ID of a Subscription that you were using to test this flow so I can take a closer look at it?

Are you updating the Subscription after the first payment for it has been made?

native abyss
#

Are you updating the Subscription after the first payment for it has been made?

Yes, after the first payment has been made, we tested adding another user and updating the subscription quantity

fast trout
#

Sorry, I'm not sure I'm understanding the concern here. The Coupon was applied for the first payment, and after that the Coupon will no longer impact the Subscription as you configured its duration to once.

What is the desired behavior that you're looking for your Coupon to have?

lavish lily
#

The coupon is still being applied when another user is added to the subscription. The desired behaviour is that after the initial first purchase - no further discounts are to be applied

#

As per t90s screenshot above, the second invoice/payment is also discounted with a coupon. When this should only be applying to the first payment

fast trout
#

Hm I don't think that is showing a coupon being applied though, if it were there would be a line showing the amount of the discount near the total like this:

#

Instead it looks like the prorations that are being generated because the Subscription was updated in the middle of the billing period are taking into account that the previous payment (the one being prorated) had a discount applied.

#

Is it the proration behavior that you're looking to control?

lavish lily
#

I think it is showing the coupon being applied - this is from the same subs as earlier posted.
Added 1 user who has 15% off.
Another user was added so this is now pro-rating the discount for TWO users.
Then next month we're back to 2 users without discount

#

Are you saying this is just a pro-ration issue?

fast trout
#

To clarify, the next month it is expected for no users to have discounts because you only want to coupon to apply once, right?

lavish lily
#

correct

fast trout
#

Oh, I think I might understand what is happening. When you increase the quantity of the Subscription Item, we calculate a proration based on the previous price paid. That payment included the discount, so the prorations for the current billing period will also contain the discount. However the Coupon will not impact the amounts for the next billing period.

lavish lily
#

Sorry, yes that is what is happening - but this isn't what we expected

#

So is there essentially no way to 'truly' have a one off discount? Will it always be based on the current period if it's a subscription?

fast trout
#

The Coupon does only apply to the first payment. When you update mid billing period with changes that take affect immediately, you're adjusting the billing period that has already been paid for so prorations are calculated (by default) and those prorations are based on the amount originally paid.

You can disable our proration behavior if you would like to replace it with your own calculations though.

lavish lily
#

Makes sense, so coupon is fine - pro-ration not so much

fast trout
#

Gotcha, you can use the proration_behavior parameter to disable our prorations when making a request to update the Subscription:
https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior

Then you could create an Invoice Item, using the subscription parameter to associate it with your customer's Subscription so it will be included in the next Invoice, to charge for your desired proration amount:
https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-subscription

lavish lily
#

Ok thanks for explaining for my (finance) side. I'll leave you back with @native abyss to see if they have any further queries from a dev POV