#LordGrim
1 messages · Page 1 of 1 (latest)
Good question. Checking in to how we handle deletions like that
Hey apologies for the delay here. You are right that that does not refund the remaining amount. You will want to make a refund call on the latest payment from the subscription for the amount remaining on the cycle 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.
One way I have seen to do this is to use our pending invoices API, this StackOverflow answer has a code snippet showing that https://stackoverflow.com/a/59201871/16458642
Otherwise you could just refund and prorate as you are doing now, make a refund for the amount of credit that the customer gets, and then zero out their credit