#eoghanobrien_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ 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/1245417853096562700
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! Sounds like you're looking for our prorations documentation: https://docs.stripe.com/billing/subscriptions/prorations
I'm using this right now, this can create a negative amount though right, or a scenario where we pay the customer, how do I deal with that?
Not sure I understand, can you give me a specific example?
Okay
We have price IDs of different amounts
price_123 is 29.00 and price_345 is 69.00
we have a customer on a subscription plan using price_345
they want to downgrade their plan to price_123
They downgrade immediately after purchasing price_345
now we owe them 40.00
how does Stripe handle that credit
The 40.00 is added to the Customer's credit balance and will be used on the next Invoice for that Customer: https://docs.stripe.com/billing/customer/balance
got it, so we never send the customer any payout, they can only apply that credit to future products?
so at the end of the cycle, their next payment would be 0.00 but they'd still have a credit of 11.00
Correct.
their next payment would be 18.00 and their credit would be 0.00
Yep.
and all of this is automatically handled via the Stripe credit balance system
Yes.
If a customer decided they wanted the difference back as a refund, is that possible?
You can decide to do that if you want, yes. You can modify a Customer's balance at will: https://docs.stripe.com/api/customers/update#update_customer-balance
So you would get the money back to the Customer and then adjust their balance accordingly.