#box - downgrade refund
1 messages ยท Page 1 of 1 (latest)
hey there, you would do this by downgrading with proration to generated the credit balance on the customer. Then you'd create a partial refund for the charge related to the previous invoice and clear the customer balance to avoid them being credited on the next recurring payment.
So for the downgrade you can read here: https://stripe.com/docs/billing/subscriptions/upgrade-downgrade
and if you leave prorations enabled (default) the invoice will have a net credit amount and your customer will end up with a balance credit
then you can go get the payment on the previous invoice:
https://stripe.com/docs/api/invoices/object#invoice_object-payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Create a partial refund for the amount of the credit balance:
https://stripe.com/docs/api/refunds/create#create_refund-amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
and manual clear the same amount from the customer balance:
https://stripe.com/docs/invoicing/customer/balance?dashboard-or-api=api#modifying
otherwise the default is for the customer to get the credit on the next invoice
Gotcha, thanks synth! I'll have a play around and get back to you if I have any questions ๐
Quite welcome, and sounds good ๐