#juan_subscription-proration

1 messages ยท Page 1 of 1 (latest)

lyric orbitBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1276265471498256455

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

vestal lotusBOT
mild burrow
#

Hello, when you applied that update, you used a proration_behavior of create_prorations that tells Stripe to credit the user for the remaining time on their current price and charge them for the remaining time on the new price, but not to do that until the end of the month.

#

Which is why the Aug 22 - Sep 22 2024 items for that unused and remaining time are showing up alongside the charges for the next subscription cycle

remote kelp
#

So ok lets have the following example:
Subscription starts the 1st August with a "seat" for Maria.
Then the 15th of August another "seat" is added for David.
Sept 1st arrives:
I want to charge Maria for the whole month and I want to charge David for just the 15 days he has spent.
I thought that this was the proration behavior. If this is not, then how can I reproduce this behavior?

So in my actual scenario, I created in the same day the two seats, so I would have thought they would have been charged for the whole month which was $200 each at the end of the month ($400 total)

mild burrow
#

If you set proration_behavior to always_invoice that will create the same invoice items and then charge them immediately. So if you did that instead of create prorations on the subscription above that would have resulted in an invoice for $199.93 ($399.87-$199.94)

remote kelp
#

Shouldn't it be in total $400 in my actual scenario where I have added at the same time two different seats? (each seat is $200)

mild burrow
#

Oh as in should the $399.87 be $400 instead?

remote kelp
#

no no, you mentioned $199.93 (lets say $200) instead of the actual $399.87 (lets say $400)

mild burrow
#

That number is the proration. So the user had already paid $200 so we credited that against the full ~$400 basically

remote kelp
#

Ohh ohh I see I see

mild burrow
#

Yeah, prorations can be a lot to wrap your head around

#

So yeah you were seeing ~$400 - ~$200 + $400

remote kelp
#

Ok so to recap. I can have this setting of proration_behavior to always_invoice and with this setting I will have the behavior that I want. The aspect to consider is that for example taking the scenario I previously explain (with Maria and David) then Maria will be charged immediately on the 1st August and then David will be charged at the moment his seat is added (15th of August). So this would mean that every 1st of the month Maria will be charged and every 15th of month David will be charged?

mild burrow
#

Not quite, the proration amount is just a one time thing. So you can have that one time charge happen immediately or have it added on to the next recurring invoices. For the recurring invoices we would be charging the full $400 on the first of every month in that scenario.

remote kelp
#

Oh nice nice, that is the actual behavior that I wanted. So it is solved then I'll use this setting. Thank you very much you have been a blessing I was worried by this ๐Ÿ™Œ๐Ÿป

mild burrow
#

Of course, glad I could help! Let us know if you have any other questions, proration can be one of the more difficult things to work with in our API

lyric orbitBOT