#vasynyt-pi-failure
1 messages · Page 1 of 1 (latest)
Well that depends on the failure reason! Payment can be retried on an existing PI that previously failed
Also what is the webhook I should recieve when the customer making the payment intent does not have the balance on his account?
charge.failed
Where can I see the reason for the failure? It seems that the only webhook you can recieve from failed payment intent is "requires_payment_method"?
It seems that the only webhook you can recieve from failed payment intent is "requires_payment_method"?
That's not an event type, but a Payment Intentstatus.
Are you relying on an existing event already?
Yes I'm storing a local copy of the pi on my database and listening to webhooks for updates to status column that matches the pi's status attribute.
The webhooks doesn't seem to contain any information about why the pi/charge failed
What are the possible statuses for this pi? Should I handle all failures with the "requires_payment_method" as per the docs (https://stripe.com/docs/payments/payment-intents/verifying-status) it seems that this is the only status update on failure?
I suppose @radiant prism went offline is @hidden flame currently online?
HI 👋 was just getting caught up here
I see, thanks!
When a payment intent fails to process, you can look at the last_payment_error hash to get a better idea of why:
https://stripe.com/docs/api/payment_intents/object#payment_intent_object-last_payment_error
This guide helps explains declines/failed payments and how to handle them:
https://stripe.com/docs/declines
I see thanks! One more question. How are the failed payments handled? I'm currently mailing my users on every failed pi and wondering should I advice them to make a new payment or is there something to be done with the already failed pi?
If they provide you with an updated payment method, you can then attach that to the payment intent and attempt to process it again. This takes a little more work to implement, but prevents you from accruing a large number of uncompleted payment intents. Just creating a new payment intent is likely easier as you already have the flows to do so in place. It's ultimately up to you and what you think will be the best experience for your customers.
I see. I will probably go with just making a new pi. The hash you provided doesn't seem to contain a lot of helpful information. As it pretty much states that the pi failed, but no information about why
"last_payment_error": {
"code": "payment_intent_payment_attempt_failed",
"doc_url": "https://stripe.com/docs/error-codes/payment-intent-payment-attempt-failed",
"message": "The payment failed.",
"payment_method": {
"id": "pm_1K6F6gACGm8HkR75bUB7tE2p",
"object": "payment_method",
"billing_details": {
"address": {
"city": "Helsinki",
"country": "FI",
"line1": "Knockers",
"line2": null,
"postal_code": "00100",
"state": null
},
"email":
"name":
"phone": null
},
I would like to find out where I can find details about exactly why the pi failed. For example if the customer didn't have the balance in their account etc.
It seems that even here (https://stripe.com/docs/declines) there is no specific way to find this out?