#deadshot_sub-payment-retry
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/1241078448622010390
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
What state is your payment intent in? can you share an ID?
So you already retried it? What is your question then?
I want to do it using API for future payments if failed
pi_3PH30MHCPH5IrTb70K2gIyaV
Here is a payment I want to retry pi_3PEVeyHCPH5IrTb70SdDMdUK
Okay, taking a look
Well since this is a Subscription payment, you would want to start with the Invoice. You could retry the Invoice by calling the Invoice Pay API https://docs.stripe.com/api/invoices/pay
Got it. Thanks
One question though
If payment fails on this subscription payment, I want to receive a webhook event. I am not sure what is the difference:
payment_intent.payment_failed
invoice.payment_failed
charge.failed
All of those will fire because each one is something that occurs. An invoice creates a payment intent and a payment intent creates a charge. So when one fails, they all fail.
It depends on what you want to know and what data you want to have access to in the webhook event.
invoice.payment_failed will include the Invoice object
payment_intent.payment_failed will include the Payment Intent object
charge.failed will include the charge.
I would recommend listening to either the Inovice or Payment Intent event, since you can find the Invioce from the Payment Intent and vice versa
Yeah, in that case it's easy to connect to the Subscription