A duplicate invoice.payment_failed email can tell a customer to update a card after they have already paid. Stripe customer email notifications need clear ownership and idempotent event handling so billing messages arrive once, with the right next step.
Stripe sends selected emails when you enable them in the Dashboard; it does not automatically send every billing or product message. For custom notifications, receive Stripe webhooks, verify the Stripe-Signature header, record each event ID before acting, and send through your email provider only when the current invoice or subscription state still calls for a message.
Assign an owner to each Stripe customer email notification
Write down the billing messages your product needs and assign one sender to each. Stripe can send selected payment receipts and subscription-related emails through Dashboard settings. Your application can send messages that depend on product state, such as explaining how a failed renewal affects access or linking to a recovery page.
| Message | Likely owner | Example trigger or setting |
|---|---|---|
| Successful payment receipt | Stripe or your application, but not both | Stripe successful-payment receipt setting or invoice.paid |
| Failed subscription payment | Stripe, your application, or a workflow tool | invoice.payment_failed |
| Trial-ending reminder | Stripe or your application | customer.subscription.trial_will_end |
| Product-specific access instructions | Your application | Check the subscription and account state after a billing event |
| Welcome and setup guidance | Your application or a workflow tool | customer.created or checkout.session.completed |
The table is a design map, not a rule that every business should use the same sender. For each row, record the event, recipient field, message template, and system responsible for sending. That makes ownership concrete: if Stripe already sends the receipt, your webhook handler should not send a second copy of the same receipt.
Treat billing notices and promotional campaigns as separate message types. A billing email explains a payment, renewal, or account action; a customer’s presence in Stripe does not by itself make them a marketing subscriber. Keep campaign preferences separate from the billing workflow.
Configure Stripe customer email notifications in the Dashboard
For subscription emails, open Settings → Billing → Subscriptions and emails in the Stripe Dashboard. For payment receipts, open Settings → Payments → Emails and configure the successful-payment receipt option. The exact settings available in your account are visible in those Dashboard sections; use them to decide which messages Stripe owns before adding application-generated emails.
Test the actual customer flow, not only the setting. A successful one-time checkout and a recurring invoice renewal are different paths. Run a test payment for each relevant path, then inspect the Stripe event and the recipient inbox to confirm which system sent the email.
Stripe’s billing events give a useful starting point for custom messages:
invoice.payment_failed: evaluate a failed invoice and consider a payment-recovery message.invoice.paid: confirm a paid invoice or trigger product provisioning.customer.subscription.trial_will_end: prepare a trial-ending reminder.checkout.session.completed: respond to a completed Checkout session.customer.created: start welcome or onboarding logic when a new customer record is created.
Use the event that matches the action you need, then check the current Stripe object before sending. For example, a failed-invoice event can arrive after the customer has corrected their payment method. A current-state check helps suppress a stale email that would otherwise ask them to do something they have already done.
Verify webhooks and account for Stripe retries
Stripe signs webhook requests and supplies the signature in the Stripe-Signature header. Verify it using the endpoint’s signing secret and the unmodified raw request body. If verification fails, reject the request; parsing and re-serializing JSON before verification changes the bytes used for the signature check.
In live mode, Stripe retries webhook delivery for up to three days when your endpoint does not return a successful response. Your endpoint therefore needs to tolerate repeated delivery. Store the Stripe event ID under a unique database constraint and treat an already-processed ID as a duplicate, rather than sending again.
A minimal Node.js example shows the important boundaries. The eventStore calls represent your database implementation: insertIfNew must atomically insert the event ID and return false if that ID is already present. sendBillingEmail is the application function shown in the next section.
import express from "express";
import Stripe from "stripe";
import { eventStore } from "./event-store.js";
import { sendBillingEmail } from "./mailer.js";
const app = express();
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
app.post(
"/webhooks/stripe",
express.raw({ type: "application/json" }),
async (req, res) => {
let event;
try {
event = stripe.webhooks.constructEvent(
req.body,
req.headers["stripe-signature"],
process.env.STRIPE_WEBHOOK_SECRET
);
} catch (err) {
return res.status(400).send(`Invalid signature: ${err.message}`);
}
const firstDelivery = await eventStore.insertIfNew(event.id);
if (!firstDelivery) return res.sendStatus(200);
try {
if (event.type === "invoice.payment_failed") {
const invoice = event.data.object;
await sendBillingEmail({
invoiceId: invoice.id,
customerId: invoice.customer,
eventId: event.id
});
}
return res.sendStatus(200);
} catch (err) {
await eventStore.markFailed(event.id, err.message);
return res.sendStatus(500);
}
}
);
app.listen(process.env.PORT || 3000);
In production, persist the event and queue the email work before returning success. Then let a worker process the queue and retry a failed send without depending on Stripe to redeliver the event. Make the event record and outbound message status observable so support can distinguish signature failures, duplicate deliveries, and email-provider errors.
Send a billing email through Volanea SMTP
Volanea combines transactional email, campaigns, and automations through one API and sends through Amazon SES. For a webhook-driven billing message, you can use SMTP from the application worker. Configure the SMTP host and port from your Volanea project, set the username to volanea, and use the project’s secret API key as the password.
Here is a Node.js send function using Nodemailer. The from field accepts either a bare email address or the Name <address> format shown here. Keep the recovery link under your control and generate it from your application rather than placing sensitive payment details in the email.
import nodemailer from "nodemailer";
const transport = nodemailer.createTransport({
host: process.env.VOLANEA_SMTP_HOST,
port: Number(process.env.VOLANEA_SMTP_PORT),
secure: process.env.VOLANEA_SMTP_SECURE === "true",
auth: {
user: "volanea",
pass: process.env.VOLANEA_API_KEY
}
});
export async function sendBillingEmail({ invoiceId, customerId, eventId }) {
const invoice = await loadInvoice(invoiceId);
const customer = await loadCustomer(customerId);
const stillNeedsPayment = await invoiceStillUnpaid(invoiceId);
if (!stillNeedsPayment || !customer.email) return;
await transport.sendMail({
from: "Billing <billing@example.com>",
to: customer.email,
subject: "Action needed: update your payment method",
text: `Your latest payment needs attention. Update your payment method: ${
await createBillingRecoveryUrl(customerId)
}`,
headers: { "X-Stripe-Event-Id": eventId }
});
await recordEmailSent(eventId, customer.email);
}
The loadInvoice, loadCustomer, and persistence functions are application-specific; they keep business state and delivery records in your system. The code checks that the invoice still needs payment before sending, and the event ID gives your logs a traceable link back to Stripe. Do not mark an event complete before you have durably queued the work, or a process crash could lose the email.
For a walkthrough of the broader delivery design, see our guide to email API integration and reliable sending flows. SMTP and API sending are different interfaces to delivery; choose the one that fits how your application manages templates, queues, and send results.
Test the Stripe-to-email flow before launch
Stripe CLI can generate test events against a local webhook endpoint. Start your application, forward events with stripe listen --forward-to localhost:3000/webhooks/stripe, and use the signing secret printed by the listener for local signature verification. Then trigger a failed invoice event with:
stripe trigger invoice.payment_failed
The CLI command exercises a test event; it does not prove that your complete production billing lifecycle behaves correctly. Test the email path as well as the handler. Confirm the event is recorded, the expected customer is selected, the current invoice state passes the send rule, and exactly one message appears in the provider’s records.
Before enabling live traffic, run a checklist:
- Trigger
invoice.payment_failedand confirm the recovery email contains a valid action link. - Deliver the same event ID twice and confirm the second delivery does not send another email.
- Resolve the invoice before processing the queued message and confirm stale recovery content is suppressed.
- Test
customer.subscription.trial_will_endseparately if your product sends trial reminders. - Check that successful payment receipts have one owner and that the customer receives only one copy.
- Confirm webhook signing secrets and email credentials are stored as environment secrets, not committed to source control.
Stripe retries unsuccessful webhook deliveries for up to three days, but your own worker should manage email-send retries after the event has been durably recorded. Track Stripe event ID, event type, customer or invoice ID, message status, and provider response. Those fields make it possible to investigate a missing billing email without guessing which system owns it.
What Loops’ Stripe integration handles
A prebuilt connector can take over event intake and workflow routing when your team does not need to maintain a webhook receiver. Loops documents support for 19 Stripe events across customer, subscription, invoice, checkout, quote, and dispute categories. It matches incoming events to contacts by email address and creates a contact if no matching address exists.
Loops includes a Payment Failed template for a failed-payment workflow, alongside templates for new customers and successful payments. That provides a concrete route from a selected Stripe event to a customer email without writing the webhook handler above. Loops also documents sending custom product events from a backend through its API, with contacts matched by email.
This connector is useful when its event selection, email-based contact identity, and workflow model match your needs. A backend-controlled flow remains a better fit when the email depends on your own application’s account state or needs delivery logging tied directly to your billing database. Choose based on where the decision logic belongs, not just whether a connector exists.
Match Volanea volume and sending behavior to billing mail
Billing emails are operational messages, so volume limits matter. Volanea includes 1,000 free emails or credits every month; the Starter plan is $5/month for 7,500 emails, and Growth is $20/month for 50,000 emails. For scale, a product sending 4,000 billing messages in a month fits within Starter’s stated email volume, while 30,000 fits within Growth’s stated volume, provided other sends do not use the remaining capacity.
Every feature ships on every plan; plans differ by monthly volume and domain count. At the monthly sending limit, sending pauses and there is no overage billing. That behavior is worth incorporating into billing-email operations: estimate renewal and failure-notice volume, account for campaign traffic using the same sending capacity, and alert your team before the project reaches its limit. A paused send at the limit can delay a payment-recovery email.
Volanea sends from shared Amazon SES infrastructure and does not offer dedicated IPs. That is a relevant infrastructure detail for teams evaluating sending requirements; it does not change Stripe webhook verification, event idempotency, or the need to monitor billing email volume.
FAQ
Does Stripe automatically email customers after every payment?
No. Stripe can send successful-payment receipts when you enable them under Settings → Payments → Emails, but it does not automatically send every message a product might need. A failed-renewal explanation or product-specific access instruction requires a configured Stripe email feature or an application/workflow responding to events such as invoice.payment_failed.
How long does Stripe retry a failed webhook?
Stripe retries a failed live-mode webhook for up to three days. Your endpoint should verify the signature, store the event ID, and return a successful response after durable receipt. Process email delivery from a queue so a temporary provider issue does not require Stripe to keep delivering the same event.
When should I use a Stripe connector instead of my own webhook?
Use a connector when its supported events and contact-matching rules cover your workflow; Loops documents 19 events and matches contacts by email. Use your own webhook when messages depend on application state, such as whether an account has already restored access, or when you need event and delivery records integrated with your backend.
What happens if Volanea reaches its monthly email limit?
Sending pauses at the monthly limit, with no overage billing. Account for all email traffic sharing the project’s monthly volume, including billing notices and other sends, and monitor usage before a renewal peak. If you need an email platform for these flows, start free with 1,000 emails a month.