Email After Stripe Payment: Send Your Own With Claude Code

Send your own branded email after Stripe payment goes through, using a Stripe webhook and a plain-English brief to Claude Code. Sample email included.

Quick answer

Stripe can send a standard receipt, but to send your own email after Stripe payment goes through, your project needs a webhook: an automatic message Stripe sends when someone pays. Connect an email service such as SimpleSends, then ask Claude Code to listen for Stripe’s payment event and send your branded email once per payment.

Last checked: October 2026

On this page
  1. Stripe's emails vs your own: which do you need?
  2. How does Stripe tell your project a payment happened?
  3. What to tell Claude Code to send an email after Stripe payment succeeds
  4. What should your after-payment email say?
  5. How do you test it before real customers pay?
  6. Which other payment emails should you set up?

Someone has paid for your SaaS through Stripe. Stripe can email them a receipt, but that receipt is Stripe's email with your logo on it. If you want to thank people in your own words, tell them how to get started, or send a login link or download, you need to send your own email after Stripe payment goes through.

This guide shows what Stripe already sends, how Stripe tells your project someone paid, and the exact message to give Claude Code so your own email goes out after every payment.

Stripe's emails vs your own: which do you need?

Stripe's emails work well as a payment record. Your own email is better when you want to do more than confirm an amount, such as welcoming the customer and pointing them to their next step.

Here's what Stripe can send for you:

Stripe emailWhere to switch it onWhat you can change
Receipt after a successful payment or refundSettings, then Business, then Customer emailsLogo, icon, brand and accent colors, business details
Invoice summary with PDF links, for one-time paymentsWhen creating a payment link: After payment tab, Create an invoice PDFInvoice details and footer
Subscription emails: failed payments, trial ending (7 days before), upcoming renewals, expiring cardsBilling settings, under Email notifications and customer managementUses your branding settings

The layout and most of the wording in these emails are Stripe's. Your own email lets you:

  • write in your own voice
  • send from your own address, such as hello@yourcompany.com
  • include what the customer gets next: a login link, a download or setup steps
  • match the look of your other transactional emails (the automatic emails your SaaS sends when someone does something)

You can use both. Many SaaS products keep Stripe's receipt as the payment record and send their own getting-started email alongside it. If you'd rather send the receipt yourself, switch off Successful payments in Stripe's Customer emails settings so customers don't get two. Our guide to order confirmation and receipt emails covers what a full receipt needs.

How does Stripe tell your project a payment happened?

Stripe tells your project about a payment with a webhook: an automatic message Stripe sends to a web address on your site the moment something happens in your Stripe account. That address is called a webhook endpoint. When the message says someone has paid, your project sends your email.

Why not send the email from your "thanks for your order" page? Stripe's docs point out that customers don't always reach it: someone can pay and lose their connection before it loads. The webhook arrives either way.

These are the Stripe events most SaaS products use for payment emails:

Stripe eventWhat it meansEmail you might send
checkout.session.completedSomeone finished paying through Stripe Checkout or a Payment LinkThank-you and getting-started email
checkout.session.async_payment_succeededA bank payment that takes a few days to clear has now gone throughThe same email, sent when the money arrives
invoice.paidA subscription invoice was paid, including renewalsRenewal confirmation
invoice.payment_failedA subscription payment didn't go throughPayment failed email

Claude Code picks the right events; the table helps you follow along.

Three things are useful to know:

  • Stripe signs every webhook with a signing secret, a password-like value that proves the message really came from Stripe. Your project keeps it in an environment variable: a private setting stored with your hosting, not in your code.
  • The same event can arrive twice, and Stripe doesn't promise events arrive in order. Your project should check it hasn't already emailed about a payment before sending.
  • Stripe retries. If your site doesn't answer, Stripe keeps trying for up to three days on live payments.

The endpoint has to be a public https address, so this runs on your live site. For more on how webhooks work in email, see what email webhooks are.

What to tell Claude Code to send an email after Stripe payment succeeds

Once SimpleSends is connected, one message gets Claude Code started. It writes the email, builds the webhook endpoint and connects the two.

Connect SimpleSends first

A connector, also called an MCP server, lets Claude Code work with an outside service while you build. To connect SimpleSends:

  1. Sign up on the SimpleSends website and follow the steps there to set up the email address you'll send from. To send from your own domain, this includes adding a few DNS records where your domain is registered.
  2. In Claude Code, open Customize, then Connectors, choose Add, then Add custom connector. Name: SimpleSends. MCP server URL: https://mcp.simplesends.com/mcp
  3. When Claude prompts you to connect, log in to SimpleSends.
  4. Back in the Claude Code chat, tell Claude Code: "I've connected SimpleSends for all transactional email." It takes it from there, including adding what your project needs to send email.

Brief Claude Code

Tell Claude Code

We take payments with Stripe. After someone pays, I'd like them to get our own email from hello@yourcompany.com as well as Stripe's receipt. Thank them, confirm what they bought and how much they paid, and tell them how to get started, with a button to log in. Make sure each payment only ever gets one email, even if Stripe sends the same event twice. Show me a preview of the email before you build anything.

What to expect: Claude Code asks how you take payments (Checkout, Payment Links or subscriptions), shows you a preview to approve, then adds the webhook endpoint and the sending code to your project. It also tells you which secret values your live site needs in its hosting settings, such as the Stripe signing secret and the API key your project uses to send email.

Tell Stripe where to send the webhook

Stripe needs your webhook endpoint's address. There are two ways to give it:

  1. In Stripe: open Workbench, go to the Webhooks tab and choose Create an event destination. Select Your account, pick the events Claude Code names, choose Webhook endpoint, and paste in the address Claude Code gives you. Stripe then shows a signing secret; click Reveal secret and add it to your hosting settings where Claude Code tells you to.
  2. Through Stripe's connector: Stripe has its own connector in Claude's connector directory. Once you connect it and approve access in Stripe's sign-in window, Claude Code can create the webhook endpoint in your Stripe account for you.

What should your after-payment email say?

Keep it short and useful. Confirm the payment in the first line, show what they bought, give one clear next step, and tell them how to get help. Here's an example for a SaaS with a monthly plan:

Sample email

To change it later, tell Claude Code what you want, such as "make the opening warmer", and ask for a new preview.

How do you test it before real customers pay?

Test in Stripe's sandbox, a practice copy of your Stripe account where no real money moves. Pay with Stripe's test card, 4242 4242 4242 4242, with any future expiry date and any three-digit security code. Stripe sends the webhook as if it were a real payment, so your email should go out.

Stripe doesn't send its automatic receipts for sandbox payments, so during testing you'll only see your own email. That's expected.

Tell Claude Code

Let's test the after-payment email. Walk me through a test payment in Stripe's sandbox using my own email address, then check SimpleSends to confirm the email went out and was delivered. If anything failed, tell me why.

What to expect: Claude Code reads the send log in SimpleSends and tells you whether the email was sent and delivered, and if not, what went wrong. Our guide to testing your emails has a full pre-launch checklist.

Which other payment emails should you set up?

A few other payment moments are worth an email:

You can brief Claude Code on all of them in one message.

Frequently asked questions

Can I change the wording of Stripe’s own receipt?

Only a little. Stripe lets you add your logo, icon, brand colors, business details and a short description of the purchase. The layout and most of the wording stay Stripe’s. If you want to write the whole message yourself, send your own email from your project when Stripe’s payment webhook arrives.

Do I still need Stripe’s receipt if I send my own email?

Stripe doesn’t require it. If you switch Stripe’s receipt off, make sure your own email covers what a receipt needs: what was bought, the amount, the date, your business name and how to contact you. Rules on receipts and invoices vary by country, so check what applies to your business.

Does this work with Stripe Payment Links?

Yes. Payment Links run on Stripe Checkout, so a completed Payment Link purchase triggers the same checkout.session.completed event as a normal Checkout payment. Tell Claude Code you use Payment Links and it will listen for that event.

What happens if my site is down when someone pays?

Stripe keeps trying. For live payments it retries the webhook for up to three days, and you can also resend an event from the Stripe Dashboard for up to 15 days. The email arrives late, but it still arrives once your site responds.

Does Claude Code send these emails when real customers pay?

No. Claude Code builds the setup and can send test emails from the chat while you work. When a real customer pays, your live project receives Stripe’s webhook and sends the email through SimpleSends on its own. Nothing goes through the chat.

Can I send my own email when I refund someone?

Yes. Stripe can send its own refund receipt if you switch on Refunds in its Customer emails settings. For your own wording, ask Claude Code to listen for Stripe’s refund event and send a short refund confirmation, the same way as the after-payment email.

Sources (7)