#atul
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
invoice.payment_failed has an Invoice object, that has a payment_intent property in it, then you need to look at last_payment_error property on the Payment Intent: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-last_payment_error
last_payment_error": {
"charge"
:
"ch_3MCKU4HxaKwf0Rtd0jzMZLxL"
Copy
,
"code"
:
"card_declined"
,
"decline_code"
:
"generic_decline"
,
"doc_url"
:
"https://stripe.com/docs/error-codes/card-declined"
,
"message"
:
"Your card was declined."
,
"source"
:
{… 23 items}
,
"type"
:
"card_error"
,
last_payment_error have some keys
Thats going to be fixed for all types
What do you mean?
last_payment_error is a hash
so key inside hash is always going to be fixed ??
or will vary depending on the reason why the error have occured
They are fixed: https://stripe.com/docs/api/errors
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!