#andrew_96175
1 messages · Page 1 of 1 (latest)
You can use Smart Retries with invoices:
https://docs.stripe.com/invoicing/automatic-collection
Got it... Was wondering about that. What would be the expected webhook for a non-subscription invoice when the retries eventually stop without payment?
I don't think there is a webhook event for that
All available webhook events can be found here:
https://docs.stripe.com/api/events/types
Ah wait
I think this one is the one you are looking after
That's what I was nervous of. With Subscriptions, we get a 'Subscription updated' event where we're looking for the status to be changed to past_due. This seems to signify that the smart retries weren't successful. We're looking to do something similar with one-off invoices... Smart retries and then eventually we're notified if those failed.
In order to get notified of the failure of the invoice payment you can listen to invoice.payment_failed and in order to get notified about an Invoice that will become due, you can listen to the event invoice.will_be_due
I'm not sure honestly, I invite you to test it first.
invoice.will_be_due almost seems like something that would fire before the date I'm looking for... I wonder if https://docs.stripe.com/api/events/types#event_types-invoice.overdue might do it?
Assuming the X in that doc something we can control?
or that if you are looking for a post date
By default, what's the 'due date' of an invoice? x amount of days after the day it's sent?
Thanks by the way for all the help! Really appreciate it.
Yes I think this is accessible from https://dashboard.stripe.com/automations
You need first to upgrade your account to "Scale" if it's not already, there you can find all the values
Ah, understood. So, is invoice.overdue something that will only fire if my account is on scale?
Am I correct in thinking that all these settings only apply to subscriptions and not one-off invoices?
Hi yes I believe you're correct on both accounts. However, pricing tier questions related to Scale, etc are best for support (as well as dashboard questions). We mostly answer api quesions and help developers with their api integrations in here
Totally get that. Quick follow up question! My concern is that if invoice.payment_failed is the only event I can be watching for, and Stripe is going to retry payment up to 8 times, I could end up with quite a few emails to the customer. Is there a way to differentiate between the first failed payment and the last one that is the end of Stripe's retries of an invoice?
I want to send an email on the first failed payment, and then I want to send a final warning email and schedule cancellation of a related subscription for 6 days later whenever Stripe gives up retrying
We have an attempt count: https://docs.stripe.com/api/invoices/object#invoice_object-attempt_count
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Oh sweet. Ok, that was the piece I was missing.
Final question... Is there any indication when Stripe has given up on retries?
Attempt count definitely helps with identifying the first one.
Not exactly. But you can configure what happens when all retries fail here: https://dashboard.stripe.com/settings/billing/automatic
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Hmm... Ok. So if I know the retry length, I guess I could schedule something on the very first failed payment for the same amount of time in the future to check if a payment was made and send a final warning email / schedule cancellation if not.
Thanks a lot for your help!
Yeah