Send branded Stripe payment receipts with Amazon SES

Every time a Stripe payment succeeds, email your customer a clean, branded HTML receipt from your own verified Amazon SES address instead of the default Stripe template.

Deterministic Code
StripeAmazon SESFinanceOperationsEmail Automation
PromptCreate

When Stripe fires a charge.succeeded webhook, retrieve the charge and its customer, format a clean branded HTML receipt, and send it through Amazon SES to the customer's email. Every field comes straight from the Stripe payload, so every run is deterministic; no drafting, no judgment.

Trigger: a Stripe webhook subscribed to the charge.succeeded event.

Step 1. Take the charge id from the webhook payload and call Stripe's Retrieve Charge operation to load the full charge, including amount, currency, description, receipt_url, receipt_email, and payment_method_details.card.last4. If the charge has no customer id, stop.

Step 2. Call Stripe's Retrieve Customer operation with that customer id to fetch name, email, and preferred_locales. If the customer has no email on file, stop and log.

Step 3. Decide whether to send. The workflow reads a config flag deferToStripeReceipt. If deferToStripeReceipt is true and the charge's receipt_email field is already populated, skip the send and log that Stripe is handling it. Otherwise proceed.

Step 4. Build the receipt content. Format the amount by dividing the Stripe amount by the currency's minor unit and rendering it with the currency code (e.g. 2599 with currency usd becomes $25.99). Compose an HTML body that includes: business name and logo (from workflow config), the formatted amount, the charge description, the last four digits of the card, a Stripe-hosted receipt link built from receipt_url, and a support link pulled from workflow config. Produce a plain-text fallback with the same information. If the customer's preferred_locales includes a language other than English and you have copy for it in the workflow config, use that language; otherwise fall back to English.

Step 5. Call Amazon SES's Send Email operation using the Simple content shape (Subject plus Html and Text bodies, not Raw MIME). Set FromEmailAddress to the verified SES identity configured on the workflow (e.g. billing@acme.com), Destination.ToAddresses to the customer's email, and ReplyToAddresses to the workflow's support address if configured. Subject should read like 'Your receipt from {business_name}'.

Config the workflow exposes: business_name, from_address (a verified SES identity), support_url, deferToStripeReceipt (boolean), and an optional locale_overrides map keyed by language code. All copy that appears in the email should be sourced from these config values, not hardcoded.

Additional information

What does this prompt do?
  • Listens for every successful Stripe payment and looks up the customer on the fly
  • Builds a clean HTML receipt with the amount, what they bought, the last four digits of their card, a link to the hosted receipt, and a support contact
  • Sends it from your own verified Amazon SES sender so it lands under your brand, not Stripe's
  • Respects the customer's preferred language when it is set on their Stripe profile, and can defer to Stripe's default receipt when you would rather not double up
What do I need to use this?
  • A Stripe account with live payments turned on
  • An Amazon SES sender (email address or domain) that you have verified and moved out of the SES sandbox
  • The from-name, from-address, and support link you want on the receipt
How can I customize it?
  • Subject line, header copy, and footer link so the receipt looks like the rest of your product
  • The from-name and from-address, e.g. Acme Billing <billing@acme.com>
  • Whether to skip the branded send when Stripe already emails its own receipt, or take over the receipt entirely

Frequently asked questions

Will my customers still get Stripe's default receipt too?
That is up to you. The workflow can defer to Stripe's built-in receipt when a receipt email is already set on the charge, or you can turn Stripe's off and let this branded version take over completely.
Does the receipt work in languages other than English?
Yes. If a customer has a preferred language set on their Stripe profile, the receipt copy honors it. Otherwise it falls back to English.
Do I need to be out of the Amazon SES sandbox?
Yes for real customers. While your SES account is in the sandbox, sends only succeed to email addresses you have verified in AWS, which is fine for testing but not for live traffic.
What happens if a customer paid without an email on file?
The workflow simply skips the send. There is nothing to email, so no receipt goes out and nothing errors.
Does this cover refunds or failed payments too?
No. This one is specifically for successful charges. Refund confirmations and failed-payment recovery emails are separate workflows.

Send payment receipts that look like your product.

Stop routing customer receipts through the generic Stripe template. Send them from your own verified domain, in your voice, without touching a mail server.