#itxve-subscription
1 messages · Page 1 of 1 (latest)
yeah
I'd recommend understanding the overview of Stripe subscription first: https://stripe.com/docs/billing/subscriptions/overview
Then refer to the subscription integration doc here: https://stripe.com/docs/billing/subscriptions/build-subscriptions
itxve-subscription
I can't find refund information in my subscription
Could you share the scenario when the refund of a subscription will happen? Is it due to downgrading or cancelling a subscription?
I want to cancel my subscription and get a gold star refund for my most recent bill, probably because the user forgot to cancel the subscription
Cancelling a subscription doesn't refund automatically. 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:
- 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 - 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
- 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 - Update the customer’s balance back to 0: https://stripe.com/docs/api/customers/update
I recorded invoiceId from invoice.paid webhook, which means that I can find charge from invoice and perform refund operation
Yes, you can refund from the charge here. After refund the customer, please also update customer's balance back to 0
I have two more questions about the refund.
- I can find the charge of each bill, can I refund each one?
- Do I need to process a refund for the same charge multiple times, or the stripe has already been processed, and the same bill can only be refunded once
I can find the charge of each bill, can I refund each one?
You can refund the amount up to the original charged amount for each charge. If the charged amount is $10, you can refund up to $10 (it'll fail if you refund $11).
Do I need to process a refund for the same charge multiple times, or the stripe has already been processed, and the same bill can only be refunded once
Refund can be performed multiple times up to the charged amount. For example, you can refund $1 three times for a charged amount of $5
I understand
please also update customer's balance back to 0, means, I can always charge the order until the amount is 0
When a subscription is cancelled, the refund amount will be credited to customer's balance: https://stripe.com/docs/billing/customer/balance
After you refund the amount, customer's balance does not change since the refund is directly on the charge and it has no knowledge about customer's balance. You'll need to update customer's balance back to 0 (https://stripe.com/docs/api/customers/update). If you don't update the customer's back to 0, the credit will be used in the next invoice, i.e. customer will pay less in the next invoice.
thx,I read the documentation more.
No problem! Happy to help 🙂