#bruno - subscription prorate
1 messages ยท Page 1 of 1 (latest)
Okay so you want to issue a refund rather than a credit note?
And you cannot delete the draft invoice like so?
https://stripe.com/docs/api/invoices/delete
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
No, that's a subscription invoice.
The API is returning this message "You can't delete invoices created by subscriptions"
Yes, I want to issue a refund, not a credit to customer's balance.
Can you try marking it as uncollectible?
https://stripe.com/docs/api/invoices/mark_uncollectible
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So, that invoice is in "draft" status. When I try to "mark it uncollectible", I'm getting this error "You can only pass in open invoices. This invoice isn't open".
So, I try to get the invoice to "open" status by finalizing it, but then it automatically moves to "paid" status...
Ok
You want to cancel the sub and refund the user. You do not want to use the default flow provided by subscriptions.
Yes, that's right.
You can preview the invoice that would be generated with those changes, use the prorated amount to generate the refund, then cancel the sub without proration and avoid the credit invoice
Here's the info on canceling the sub:
https://stripe.com/docs/billing/subscriptions/cancel?dashboard-or-api=api
And when you make this API request, you can pass in the changes to the subscription and see the invoice it would generate.
https://stripe.com/docs/api/invoices/upcoming
Happy to help ๐