#Naveed | Web3Auth
1 messages · Page 1 of 1 (latest)
Can you share with me the URL of the page?
sure
OK, so it's not a doc from Stripe.
Your question is whether Stripe will send an email to customer for failed payment?
yeah for no credit card on file
cuz i think no card on file and payment failed both result in the state of "payment_method_required"
if im not mistaken
ideally id also like to be able to do some custom handling, but we can address this after the email part
Upon failed payment attempts.```
So you can configure your email setting and let Stripe sends emails for failed payments
yeah so if u look at the screenshot above basically stripe doesnt send emails for no card on file
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
There's a Send emails to customers to update failed card payment methods option on the same page
I see. Yes you are right, no email to be sent if there's no attached payment method.
so anything i can do?
any good way to differentiate between the two cases
failed payment due to other reasons like expiry etc
vs no payment method on file
You can listen to the invoice.payment_failed event, get the payment_intent of the invoice and check its last_payment_error hash (https://stripe.com/docs/api/payment_intents/object?lang=php#payment_intent_object-last_payment_error)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.