#tom-hacohen_subscriptions-invoice-finalize
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/1395470305119572141
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! This is because of your Retry Settings: https://docs.stripe.com/billing/subscriptions/overview#smart-retries
Thanks @red lark, how do I fix it though? It's not clear to me even from the link you shared (which I've previously read) what is the way to fix it.
Ah shoot, that link is totally hidden. It's the 'Smart Retries' one that points here: https://dashboard.stripe.com/settings/billing/automatic
I guess I can set the "send reminders if recurring invoice hasn't been paid"
but there's no option to make it continue to finalize and send invoices (I spent a lot of time on this page)
Hi ๐
I'm stepping in as my colleague needs to go. Can you describe the scenario where this would apply?
but there's no option to make it continue to finalize and send invoices (I spent a lot of time on this page)
Sure
Let's say we have a customer, ACME. They have a subscription with us. They haven't paid on June 16th (last month) so they get a failed invoice last month. It's been a month since then, and they've continued to use the service, but the July 16th invoice is still a draft today (rather than finalized) so they don't get notified about the failed payment for the additional invoice as it's not finalized and doesn't even try. We want it to continue to the next invoice and essentially never have drafts (for longer than the default 1hr), always finalize invoices.
I guess that now that I'm saying it, what I can do is just listen to "draft invoice created" webhooks and call the "charge" API. Though is there an automatic way of doing it?
well, only for automatic ones that have a subscription attached.
No, there isn't an automatic way you can configure that in the Dashboard. I"m not sure what you mean by the Charge API but you can use the Invoices APIs to finalize https://docs.stripe.com/api/invoices/finalize an Invoice.
One question I have, is if the user still has an outstanding Invoice for June, but pays their July Invoice, what should the status of the Subscription be as far as your business is concerned?
unpaid
but it's not the end of the world for us, as this we can manage (we'll continue chasing old invoices).
This is the "Charge" API I had in mind I think: https://docs.stripe.com/api/invoices/pay
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ah the /Pay API
You can either collect a new Payment Method from the Customer or retry the default payment method using that API
The reason I ask about the status is that, IIRC, have the latest Invoice become paid will reset the Subscription to active
Yeah
it'll auto finalize, right?
@grizzled knot, not ideal, but not the end of the world for us as we'll chase old invoices. ๐
No the request to /pay will fail if the Invoice has not finalized. You would need to finalize the Invoice first
gotcha, so I need to finalize + pay, or if I finalize with "auto advance" it'll just pay on its own?
If the payment_behavior is charge_automatically, then yes it will attempt to charge the default PM
And one last thing: any downside to listening to the invoice.draft.created (or whatever it's called) webhook and calling finailze immediately?
I guess I'll have to check: (1) it was created as part of a subscirption, and not manually, and (2) that charge_automatically is set on the invoice. Though anything else?
We have the 1 hour draft period to allow you to take any follow up actions you want to for a specific Invoice (i.e. add custom footer, add a one-off charge, etc.). If you know your Invoice is good to go, you can finalize immediately.
invoice.created is the event you want: https://docs.stripe.com/api/events/types#event_types-invoice.created
thanks!
Happy to shed what ๐ก I can ๐
๐