#timtam_subscription-cancel-prorated-invoice
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1405616076313722941
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Here are the three invoices for the customer. Trial beginning, failed payment, and prorated invoice
Hi there,
I'm with you in just a moment. In the meantime, cou you provide me with the subscription id so I can take a closer look at it?
Sure, here it is: sub_1RYvwpK5YogHaeCHxKVmx13h
Sorry for the delay. Been a bit busy.
So looking at your question, if I understand you right, you do not want a prorated invoice at the end of the subscription, when the subcription got canceled?
In this case, the subscription was canceled because the payment failed repeatedly. We did not receive a payment from the customer, so their subscription was canceled, but a prorated invoice was created and a credit was added to their account. I would like to know if there is a way to avoid creating the invoice when the subscription was canceled due to failure to pay.
Sorry for my delay as well
Hello ๐
I'm stepping in as my colleague had to go
This is, honestly, and unfortunate side effect of the way we consider failed Invoices. Stripe expects you to try to collect payment for them. So the next invoice that is generated for the customer assumes the previous one will be paid at some point.
Is their anything in the invoice webhook that would let me know the reason it was created?
You mean the final invoice, right? Not the one that failed?
Unfortunately, there isn't an easy way to know this Invoice was created due to the Subscription cancel. The property we have on an Invoice to identify the reason it was created is the billing_reason but for the latest Invoice this property has the value "subscription_cycle" which doesn't tell you very much
Thank you for the help, sorry for the delay, I had a call from a coworker.
I think the solution is, when I get the invoice finalized hook, look at the invoice before that one on the subscription, and if the status is "failed" don't refund the customer.
Yes, that approach would work
That solves my problem then. Thank you for your help
Great! Happy to help ๐