#NotSupportedException
1 messages ยท Page 1 of 1 (latest)
Hello ๐
I think the total number of retries depend on the retry schedule you've set via
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.
The attempt count will only increment if you're using automatic retries
https://stripe.com/docs/api/invoices/object#invoice_object-attempt_count
You can listen to webhook events for invoices. Typically, if the retry failed you'd receive invoice.payment_failed event
the payload for that event would be an invoice object
The invoice object should have the attempt count
yes, I've already done it, and i wanna know, the max count of retries, which i configure in retry schedule
*in code
Not sure I completely understand your usecase here.
Are you asking if/when a subscription gets cancelled, how do you find the number of times the invoice was retried?
So, in my retry schedule, I configured count of retries, and I want to retrieve this count to code and do something with it.
There's no way to programatically retrieve that information
There's no API for that
Oh, okay, thx
Yeah sorry for the confusion
But can you give me some advice? How can I notify the user that the subscription will be canceled if the next payment fails? Or should I just send a message after the subscription becomes past_due?
There's no workaround for that unfortunately, you'd want to track that yourself by listening to invoice.payment_failed events
๐ข, thx