#deadshot_sub-payment-retry

1 messages ยท Page 1 of 1 (latest)

pseudo apexBOT
#

๐Ÿ‘‹ 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.

formal wyvern
#

Hi ๐Ÿ‘‹

What state is your payment intent in? can you share an ID?

calm temple
#

I had it recently and I retried it from dashboard

#

Its a subscription payment

formal wyvern
#

So you already retried it? What is your question then?

calm temple
#

I want to do it using API for future payments if failed

#

pi_3PH30MHCPH5IrTb70K2gIyaV

#

Here is a payment I want to retry pi_3PEVeyHCPH5IrTb70SdDMdUK

formal wyvern
#

Okay, taking a look

calm temple
#

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

formal wyvern
#

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

calm temple
#

I will go with the invoice

#

Thanks for the info

formal wyvern
#

Yeah, in that case it's easy to connect to the Subscription