#vasynyt-pi-failure

1 messages · Page 1 of 1 (latest)

radiant prism
#

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

zealous citrus
#

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"?

radiant prism
#

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 Intent status.

#

Are you relying on an existing event already?

zealous citrus
#

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

#

I suppose @radiant prism went offline is @hidden flame currently online?

hidden flame
#

HI 👋 was just getting caught up here

zealous citrus
#

I see, thanks!

hidden flame
zealous citrus
#

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?

hidden flame
#

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.

zealous citrus
#

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.