#ironbeard-downgrade

1 messages · Page 1 of 1 (latest)

sharp trellis
hardy condor
#

Right, but I guess I mean the situation where they went from an annual subscription that cost, say, $1000, to one that cost $500.

#

Will Stripe process a refund?

sharp trellis
#

no, Stripe won't automatically process a refund. What happens is that the amount prorated will go into the customer balance [0]. It'll be applied to the next invoice.

If you want to refund the customer, you're going to need to do it manually. Via the API, this would look like :

  • Look at the credit in the account balance and/or sum pending invoice items
  • Use the List Invoices API and pass the subscription id in the subscription parameter to only view Invoices for that subscription. Also expand the associated charge if any. For each invoice: Check if there’s an associated charge. If so, create a refund for up to the amount of the account balance. If the charge amount is smaller than the credit, refund fully and subtract the charge amount from the credit
  • Move to the next invoice in the list until the full credit has been refunded
  • Update the customer’s account balance back to 0 via the API and/or delete the pending invoice items.

[0] https://stripe.com/docs/billing/customer/balance

hardy condor
#

Awesome, that's very helpful, thanks so much 🙂

#

If proration_behavior is always_invoice does their billing cycle the change? E.g., they initially started an annual sub on Jan1 and then upgrade (with always_invoice) on June1st, would their next invoice (after the one created by always_invoice) be on the following Jan1 or the following June1st?

hardy condor
#

Sorry, I've got to run but thanks for your help here! I'll check back at a later time but feel free to close the thread if you need to. Thanks again!