#bkrnetic-subscriptions
1 messages · Page 1 of 1 (latest)
Hi there!
The retry schedule is define in your dashboard settings here: https://dashboard.stripe.com/settings/billing/automatic
And then on the invoice object you can look at the next_payment_attempt property https://stripe.com/docs/api/invoices/object#invoice_object-next_payment_attempt
Oh, that's cool. Thanks a lot!
And to fetch the invoice that potentially failed, I can do that by checking latest_invoice, right? https://stripe.com/docs/api/subscriptions/object#subscription_object-latest_invoicee
The latest_invoice can be an invoice in any state, not necessarily failed. If you want only invoices with a failed payment, I would recommend to use Stripe webhook to listen to the invoice.payment_failed event https://stripe.com/docs/api/events/types#event_types-invoice.payment_failed
Ok, thanks a lot soma
We need to show users the next payment date. Listening to webhook doesn't help much for that.
I need to fetch all active or past_due subscriptions and then check the next retry date of most recent invoice that failed for past_due subs or check the upcoming for active subs
Well, not really, but I would like you to clarify what I wrote the last
I would say latest_invoice should be sufficient in this case
Otherwise you can use this endpoint: https://stripe.com/docs/api/invoices/list, passing the status and subscription parameters to get the data you need
Okey, that's cool. Thanks ynnoj, that's it.
np!
Hey, I'm back. Is it possible to search subscriptions by both customer and multiple statuses?
I know how to manage multiple statuses, but I'm not sure about customer.
No, the Search API doesn't have a customer parameter yet. I've previously shared that feedback with the team
Okey. Also enabling expand parameter within search would be nice, if that is not possible yet.
Parameter
You should enable providing all the parameters available in List subscriptions (method all) tbh. There are millions of use cases that will find it handy.
Yep, agreed! Have already relayed this
Awesome ❤️
Can you share your acct_xxx?
Why?
Currently I'm using my client's account as his developer. Not sure that I have mine, will check.
I can note on the feedback that you'd be a merchant interested in the extended parameters
Thanks!