Stripe not sending invoice emails to customers in test environment
Asked Answered
D

4

7

I'm integrating Stripe into one of the apps. When I send invoices through Node.js SDK it's not sending invoice emails to customers when I use the test environment API key. But when I use a live environment API key with the exact same code, it sends the invoice email to the customer.

Also when I send invoices from the Stripe dashboard in test mode, it is sending emails to customers. The issue seems to be only with SDK/API in the test mode.

Is it possible to send emails to customers even in test mode using Node.js SDK/API?

Deckhand answered 7/12, 2022 at 8:13 Comment(0)
S
7

Stripe doesn't send email in test mode.

From https://support.stripe.com/questions/not-receiving-email-sent-from-stripe:

Stripe only sends email receipts for payments that are made with your live API key or through your live Dashboard. If you are expecting an email for a test transaction, one will not be sent.

Straightaway answered 7/12, 2022 at 8:50 Comment(3)
hmm how am I supposed to properly test Invoice integration with credit cards requiring 3D secure then? – Radnorshire
You may retrieve invoice URL from hosted_invoice_url parameter in Invoice object from API response or webhook events (e.g. invoice.sent event). With the URL, you can perform 3DS on it. – Straightaway
Interesting, looking into it thanks πŸ™ – Radnorshire
G
3

It appears that it is now possible to have Stripe send emails, even in Test mode. According to this page, emails will be sent if the email address is associated with a verified domain.

Grassplot answered 29/11, 2023 at 11:3 Comment(1)
I can confirm that this is true. Not all emails are triggered in test mode, just the ones listed in the linked article. – Intolerance
D
1

As per this video from Stripe, you can append +test_email to get the test emails.

Dianoia answered 30/5 at 13:39 Comment(1)
I think it doesn't work anymore – Thurstan
P
0

Automated emails on payment are not supported in test mode. You can email receipts and paid invoices only via Stripe's dashboard. Source: https://docs.stripe.com/receipts?payment-ui=checkout#:~:text=RECEIPTS%20IN%20TEST,the%20Dashboard.

Peti answered 2/5 at 19:14 Comment(0)

© 2022 - 2024 β€” McMap. All rights reserved.