#brayden
1 messages · Page 1 of 1 (latest)
We also use the Ruby SDK if there's some documentation that can be pointed to.
So you want to refund the whole amount that they paid?
Yeah correct. Let's say they start an annual subscription for $365 per year. Then 5 days in, they want to cancel and we've deemed they're eligible for a full $365 refund. Currently, we're only able to get Stripe to generate a refund for $360, based on the remaining time left on the subscription. How can we refund $365 instead?
You would just need to expand the latest_invoice from the Subscription and grab the Charge ID: https://stripe.com/docs/api/invoices/object#invoice_object-charge
Once you had that, you could do a regular refund: https://stripe.com/docs/api/refunds/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.