#Naveed | Web3Auth
1 messages · Page 1 of 1 (latest)
👋 Hi there, Happy to help!
Actually you can monitor this webhook event invoice.payment_failed
You can find further details in this guide:
https://stripe.com/docs/billing/subscriptions/webhooks#payment-failures
But how can I get the reason for the card failure
E.g. insufficient funds, no card on file, 3D secure etc
Also how can I convey the fact that the payment method will be retried again in a future date
When listening to payment_intent.payment_failed you'll have in the response an attribute called last_payment_error.message.decline_code|code|message which reflect the failure cause.
You can find here the list of all the events related to a failure payments:
https://dashboard.stripe.com/test/events?type=payment_intent.payment_failed
Here is the full list of the decline codes:
https://stripe.com/docs/declines/codes