#wiiim

1 messages · Page 1 of 1 (latest)

dire latchBOT
chilly egret
#

Hello there

#

Tell me about the issue you are having.

zenith zodiac
#

So first of all what I'm trying to do:

Pretend there is a user with an existing subscription with a price of 50€ always billed on the first of the month with the help of a billing anchor.
In the middle of the month, I decide to give the user a new discounted price of 25€ per month. What I want to happen is that the next invoices will be 25€.

But after doing some tests I think stripe calculates the price for the new invoice differently (somehow taking into account the rest of the month)?

chilly egret
#

Yeah you are talking about proration

#

So basically what you want to do instead is update the Subscription to the new Price that you want but set proration_behavior: none

zenith zodiac
#

Im currently not updating the subscription at all. I just create a new price and update the item in the subscription.
How can I combine it into one request to be able to set the proration_behavior?

#

Oh, do I need to remove the item first and re-add it then?

chilly egret
#

Updating the Subscription Item does update the Subscription

zenith zodiac
#

Okay didn't knew that, will test it out. Thanks 🙂

#

Works as expected. Can be closed 🙂

chilly egret
#

🎉

zenith zodiac
#

Quick question again. How would I do the same thing for subscription schedules? There I would have to re-add the phase right?

chilly egret
#

Yeah with Subscription Schedules you always pass the current phase as phase 0

zenith zodiac
#

Okay and how would I replace the current phase? In the Java SDK I can only find "add" methods

chilly egret
zenith zodiac
#

Not yet. So i have to cancel the old phase and add the new one or can I just set the price on the old phase?

chilly egret
#

You don't really cancel anything. Whatever period is currently happening on the Subscription you pass as Phase 0. Then Phase 1 is your update

#

So if you wanted to update a Sub immediately that is on a Sub Schedule you would set end_date: now for phase 0 (the current period of the Sub)

#

Then indicate your update in Phase 1