#mathieu-subscriptions

1 messages · Page 1 of 1 (latest)

vernal adder
#

does that answer your question?

rigid sable
#

Ok so it seems this proration_behavior set to always_invoice does the trick by it self.

So to be sure here his an example :
A client has subscription with one year (starting january) period and 10 quantity of some product.
The client update his subscription by adding 5 more quantity to the same product on july, our system pass the option proration_behavior=always_invoice as we update the quantity.
This will trigger an invoice and a payment on that date (xx july) for the 5 quantity added (with propration amount being calculated).
Then the next year on january birthday, the client will have an invoice + payment with his quantity at 15.

Is that correct ?

#

@vernal adder

vernal adder
#

yes that's correct

rigid sable
#

@vernal adder ok that nice, thx for the answer.

Now can you do the same behavior from the Stripe Dashboard when editing a subscription ?

vernal adder
#

probably, i'd suggest testing it out yourself

rigid sable
#

I'm asking this because from what i saw on the dashboard when you edit a subscription, his proration amount is added on the next upcomming invoice (it doesn't generate an invoice on the day it changes). So i'm thinking you actually can't reproduce the proration_behavior : always_invoice on the Dashboard

vernal adder
#

the only possibility that i can see from the dashboard to invoice immediately is if you update the billing cycle too i.e.

#

for your specific use case, i.e. always invoice but do not change the billing cycle, no there doesn't seem to be anyway to do this via the Dashboard

rigid sable
#

okay it's pretty clear now the difference on what you can do from the API than from the dashboard.

One final question : consider the same scenario has i mention earlier but instead of adding 5 you are removing 5 on the quantity (still with option proration_behavior : always_invoice).
Since there is less quantity will the amount on the invoice (generated on july) be 0 ? And so will there be a proration applied to next year subscription to compensate the fact that the user reduce his quantity for the last 6 month or will it just recalculate the invoice as just 5 regular quantity amount ?

limber raven
#

if you reduce the quantity then the invoice (the one you create with always_invoice ) total might be negative(like the proration item is "unused time on 5xProduct" for some large negative amount). If it's negative then the invoice is paid automatically and the negative amount gets added to the customers's balance(https://stripe.com/docs/billing/customer/balance) as a credit that will be offset against any future invoices