#Dooing - upgrade and downgrade subscription
1 messages ยท Page 1 of 1 (latest)
Hello, have you seen our docs on subscription schedules? That would definitely allow you to define changes like this that happen X subscription cycles out https://stripe.com/docs/billing/subscriptions/subscription-schedules
If you are going to do this yourself then you would probably want to make sure to do these updates a little bit before the new subscription cycle and yes you would want to turn off proration
" little bit before the new subscription cycle"
how to have that in control?
the user may switch any time
--
Whats the advantage to use the schedule api for that? It looks quite complex.. and basically, if I get it right, it jus says.. for the cycle, use this plan, then for the next cycle, switch to that... and so on... scheduling the flow of the subscriptions... ok, I get it, that allows for any kind of crazyness.
But actually... is there really a difference if I say - switch to the end of the current subscription, or if i say switch to this DATE - which is the end of the next or 2nd next cycle, for instance.
You would have to do your own scheduling to do this with calls to directly update the subscription. The schedules API is decently complex but then Stripe handles the scheduling and allows us to do things like update a subscription exactly when it cycles
But actually... is there really a difference if I say - switch to the end of the current subscription, or if i say switch to this DATE - which is the end of the next or 2nd next cycle, for instance.
I'm having trouble picturing this. Can you elaborate on this scenario more?
well, I can ask the subscription about the end of its current cycle
so I can set the proration date to this date
then I have the EXACT date of the cycle switch
and if I want one in the future.. I can just add 1 or 2 month on top
which is again a simple math
At least in Java with the Java time api ๐
I just find the unix time stamp 1-2 month in the future and set this
If I understand you correctly, I think that the issue would be that when the subscription cycles, it would charge the user the full price of the subscription again.
If you want to switch the price that the user is charged next month, you can just update the price with no proration at all and there will be no charges until the next cycle
well, but of the new one, not the old one, I assume?
ah wait.. that sounds good ๐
updateParamsBuilder.setProrationDate(subscription.getCurrentPeriodEnd())
the proration date... is the SWITCH date, right?
even if there is no proration
Unfortunately not, the proration date is just when we calculate the price from. The update would still happen immediately when you make the call and the subscription will still take payment as normal on the next cycle
but just before you said, if I change the pricing plan, then everything will stay, as is, but for the next cycle, the new price will be charged, automatically
right?
and what if I want to do the switch in 3 month from now.. is that ONLY possible with the Schedule API, or is there also a simpler way?
Correct, that is only possible with the schedule API
When I said that I was talking about making an update with no proration at all, the price would change and nothing is billed immediately, but the next cycle the new price would be charged
yeah but thats what I would need for a switch to make a downgrade, to a lower plan. Stay on the higher plan to the end of the cycle, charge the new price with the new cycle
upgrade however, our client wants IMMEDIATELY. So there, I guess I need to use the proration. I read about immediately or NONE... but I am confused. What actually means that. So one example:
A customer paid 30 USD at the 1. of the month.
Today is the 15th of the month (cycle).
So he used 50% or 15 USD. so far, and as still 15 USD balance, lets say.
The new subscription, lets say, is 60 USD, or 30 USD for half the month.
I guess now I can either start a new cycle - NOW. And charge - NOW 60 USD minus the 15 USD balance = 45 USD now.
Or I keep the billing cycle, that means for the second part of the cycle the customer has to pay 30 USD, and with a 15 USD balance, that will make it
15 USD now, and 30 USD in 14 days from now.
Right?
Any other possibility?
hellooo?
Apologies busy server, reading over that
Yeah, you would create prorations if you want to charge now for the difference between the old price and the newer price and then they would pay the new price on renewal. That is the typical use case for a proration here
If you started the new cycle now, I don't think prorations would be calculated like that. I think you would just charge the full 60 now
I think, the opposite is true, since I use stripe not only for the client of mine (which I am discussing atm).. but also for my own product, and there we use:
builder
.setProrationDate(Instant.now().getEpochSecond())
.setBillingCycleAnchor(SubscriptionUpdateParams.BillingCycleAnchor.NOW)
.setProrationBehavior(SubscriptionUpdateParams.ProrationBehavior.CREATE_PRORATIONS);
this does start a new billing cycle as NOW and create prorations
or wait.. I guess.. if I just do not adjust the billing cycle, but do set prorations, i will probably just keep the cycle and charge 15 USD now and 30 USD in 14 days from now as in my example above
but what will ALWAYS_INVOICE or NONE do? I do not understand.
(for the proration behavior)
JUst read the documentaiton slowyl again. I think what you told me above was not correct. to just get the new amount at the next cycle date, would mean:
.setProrationBehavior(SubscriptionUpdateParams.ProrationBehavior.NONE)
I think.
create_prortions means that invoice items will be created but they won't be billed immediately unless the billing period changes or the subscription goes from unpaid to paid
always_invoice means invoice items are created and always billed immediately
none means no prorations are billed for this update
Yes, using none is what I was getting at but I see how I was confusing with my wording
--
Wait. I have CREATE_PROSTION, but an invoice IS created immediately
I assume, because i change the billing chycle in this example, this makes it different?
Correct, changing the billing cycle + create prorations will bill immediately
ah ok. But keeping the cycle, and prorations, will switch the subscription to NOW - but bill the difference at the next cycle switch
right?
and keepin ght ecycle, and immediately, will switch the subscription to NOW, but bill the different also NOW.
and none, will switch the subscription now, and just bill the new price to the new month, so the customer will get an upgrade for the remainder of the month for the cheaper price, or a downgrade without getting back money
but, all of those settings, WILL switch the subscription right to the second, now, right?
so keeping the subscription until a future date, will require scheduling either on my end, or stripes end with that schedule api that I still have to dig into
Yes, that is accurate. All of those will change the subscription immediately, to change the actual price on the subscription will take scheduling on your side or using the schedules API
and the rest of my assumptions, are those also correct, or not?
Yes, those are what those proration behaviors would do here