#Typedef-subscription-refund

1 messages · Page 1 of 1 (latest)

acoustic lintel
#

👋 Happy to help

distant wedge
#

can stripe.refunds.create take subscription id?

#

or only charge and payment intent

acoustic lintel
#

Could you share the use case when you would like to refund a subscription?

distant wedge
#

sometimes customer would buy a subscription and would want a refund

#

how would i give them full amount

#

through stripe api

acoustic lintel
#

Will the subscription be cancelled?

acoustic lintel
#

In general, subscription itself can't refund automatically. If there's any downgrade to the subscription, then the fund will be credited to customer's balance which customer can use for the next invoice: https://stripe.com/docs/billing/customer/balance

#

If you wish to refund the credits in customer's balance, then you can:

  1. Find the invoice list of a subscription and expand the charge field: https://stripe.com/docs/api/invoices/list
    https://stripe.com/docs/api/expanding_objects
  2. Create a refund on the charge for up to the amount of customer's balance obtained from Step 1: https://stripe.com/docs/api/refunds/create
  3. If the charge amount is smaller than the credit, refund fully and subtract the charge amount from the credit
    4.Move to the next invoice in the list until the full credit has been refunded
  4. Update the customer’s balance back to 0: https://stripe.com/docs/api/customers/update