#ninja-invoice-attemptcount
1 messages · Page 1 of 1 (latest)
interesting, how can I get the number of failed payment attepmts on an invoice then?
this invoice has also not been auto retried, so should that number for attempt count not be 0?
You can use the List Charges API and pass invoice: 'in_123'
https://stripe.com/docs/api/invoices/object#invoice_object-attempt_count the docs are clear about this
intesting, thanks
am i missing the list charges docs that allow you to pass in an invoice time/intent??
ah my bad I thought we had this. You'll have to use https://stripe.com/docs/api/charges/list#list_charges-customer instead and then find the ones associated with that specific invoice
I assume the exandable charges object on the invoice would only return the most recent, not all charges correct?
correct
so my hunch here is my best bet is to listen for charge.failed if I want to not have to list and filter charges, I just want to know when an invoice payment fails