#avidan_api
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/1220342109567975484
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
you need to listen to these events https://docs.stripe.com/billing/subscriptions/webhooks#payment-failures
from there you can simply use your existing notification behavior
hmmm, this would require us to save the failure information on our DB which we would like to avoid. is there an api endpoint that can get that info?
not necessarily the failure information, you just need to save the invoice ID that failed
and then you can retrieve the invoice
from Stripe
i understand but again if i don't want to save this data on my DB, how can i retrieve this data using the api?
you don't want to save the invoice ID?
i want to avoid this if it's possible
ok fair enough
do you have the subscription ID for the customer? or just the customer ID?
i have both
ok you can retrieve the subscription and expand the latest_invoice
and on that invoice i need to look on the status?
yes
ok. i'll try that. thx
let me know if you need any more help