#FACELESSMAN
1 messages · Page 1 of 1 (latest)
Hi there
There is no pre-built setting that you can configure like this. You would have to handle this from your end based on how you set proration_behavior and how you perform the upgrade/downgrade
Hi bismark, yup I was looking at the docs
I understand it can be done from my side, but can you share a little more information about what I should take a look at
I wonder how I can prevent proration for a "downgrade"
would I write some code that would call the API proration only for upgrades
and in the case there's a downgrade do not change the subscription?
Yep, so you basically use proration_behavior as described here: https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am just struggling (and that's my fault I guess) to get my head around it
No worries happy to help clarify
So if you are just changing the quantity on a Sub
(I assume that is what you mean when you say "extra seats"?)
yup
Then that doesn't change the billing period. So no invoice will be cut immediately. You can control the proration that occurs, and will be swept up by the next billing cycle, based on whether you set proration_behavior: 'none' or proration_behavior: 'create_prorations
If you set proration_behavior: 'none' then the Sub will be downgraded and nothing will happen immediately. At the next billing cycle the Sub will charge for the new amount.
If you set proration_behavior: 'create_prorations' then when you perform the upgrade, proration items will be generated based on how much was paid for the previous quantity and how much is owed for the new quantity.
Those proration items will be picked up in the next billing cycle when the next invoice is generated
You can test this all out using Test Clocks: https://stripe.com/docs/billing/testing/test-clocks
Ok, this part I understand but how about "downgrades"
The scenario is like this:
- I purchase 10 "seats" I am billed 10 x $1
- Half way through the month I reduce from 10 seats to 5 seats
- On the backend I have
proration_behaviortocreate_proprations
does that mean that as soon as the downgrade happens, NOTHING will happen until next month?
(in terms of sending an invoice)
like I am not refunding the user, am I ?
because they did downgrade half way through the month
Correct, if you don't change the billing period (meaning if the Sub stays on a monthly period) then no invoice will be immediately generated unless you explicitly set proration_behavior: 'always_invoice'
So nothing will happen immediately in terms of an invoice here
However, proration items will be generated since you are setting create_prorations
And those will be picked up the following month
one last question that is a little unclear to me:
what's this propration items exactly?
you mean just like the downgrade?
Reading this: https://stripe.com/docs/billing/subscriptions/prorations
Proration items are invoice items