#meisei81_api

1 messages ¡ Page 1 of 1 (latest)

woeful heathBOT
#

👋 Welcome to your new thread!

⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!

🔗 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/1211870839587217459

📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.

⏲️ 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. Thank you for your patience!

naive yokeBOT
rough meadow
#

request id: req_SBmcp5aBwOWneJ

solemn meteor
#

Are you looking for the historical payment failures?

rough meadow
#

But why do I receive the fail event?

#

It sent several times

#

I'm trying to figure it out

solemn meteor
#

Customer attempted the payments a few times. The first two attempts were failed that payment_intent.payment_failed events were sent.

#

In the last attempt, the payment was successful and payment_intent.succeeded event was sent

rough meadow
#

It seems that when we got the failure event, we retrieved the payment intent by id and found that the last payment error is null.

#

I think it couldn't be null at the moment when the failure event comes

solemn meteor
#

It's possible that the customer attempted new successful payment while you were retrieving the Payment Intent

#

The successful payment attempt was just 1 min apart from the failed attempt

#

If you are looking for the payment failure reason of a specific attempt, the last_payment_error can be retrieved directly from the event body

rough meadow
#

We retrieve the detail just for the secondary confirmation.

solemn meteor
#

I see! Since Checkout Session is used for your integration, I'd recommend using checkout.session.completed event to check whether the payment has been completed successfully: https://dashboard.stripe.com/events/evt_1Oo5KSE2ZZnUHRVW8nMDJj21

When a Payment Intent is retrieved again, it's possible the Payment Intent has been updated to the last payment attempt which can be different from the event body you received

rough meadow
#

Got it. Thanks for your help.