/stripe-guides

How to enable email receipts in Stripe?

Learn how to enable and customize email receipts in Stripe, including setup, branding, API options, testing, and monitoring for a seamless customer experience.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free consultation

How to enable email receipts in Stripe?

How to Enable Email Receipts in Stripe: A Comprehensive Guide

 

Introduction

 

Stripe offers email receipts functionality that automatically sends receipt emails to your customers after successful payments. This tutorial will guide you through the process of enabling and customizing email receipts in Stripe, exploring all available options and settings.

 

Step 1: Access Your Stripe Dashboard

 

First, you need to log in to your Stripe account:

  1. Navigate to https://dashboard.stripe.com/
  2. Enter your credentials to log in
  3. Once logged in, you'll be directed to your Stripe Dashboard

 

Step 2: Navigate to Email Receipt Settings

 

To configure email receipts:

  1. In the left sidebar, click on "Settings"
  2. From the dropdown menu, select "Emails"
  3. On the Emails page, click on the "Customer emails" tab
  4. Look for the "Receipt emails" section

 

Step 3: Enable Email Receipts

 

To turn on the email receipt feature:

  1. In the "Receipt emails" section, find the toggle switch for "Send email receipts to customers"
  2. Click the toggle to enable it (it should turn blue when enabled)
  3. Stripe will now automatically send receipt emails after successful payments

 

Step 4: Customize Your Receipt Template

 

Personalize your receipt emails:

  1. In the "Receipt emails" section, click on "Customize receipt template"
  2. You'll be presented with various customization options:

Business Information:

  • Add your business name
  • Upload your company logo (recommended size: 128px × 128px)
  • Add your business address
  • Include your support email and phone number

Email Appearance:

  • Set a primary color that matches your brand
  • Choose a reply-to email address

 

Step 5: Configure Receipt Settings via API (Optional)

 

For developers who want programmatic control, use Stripe's API:


// Example: Setting receipt email when creating a PaymentIntent
const stripe = require('stripe')('sk_test_your_secret_key');

const paymentIntent = await stripe.paymentIntents.create({
  amount: 2000,
  currency: 'usd',
  receipt\_email: '[email protected]',
  // other PaymentIntent options...
});

Or when creating a Charge directly:


// Example: Setting receipt email when creating a Charge
const charge = await stripe.charges.create({
  amount: 2000,
  currency: 'usd',
  source: 'tok\_visa',
  receipt\_email: '[email protected]',
  // other Charge options...
});

 

Step 6: Customize Email Content through Branding Settings

 

To further customize the appearance:

  1. Go back to "Settings" in the left sidebar
  2. Select "Branding"
  3. Here you can configure:
  • Icon (appears in browser tabs and bookmarks)
  • Logo (displayed on receipts and the customer portal)
  • Colors (primary and accent colors for your Stripe interfaces)
  • Custom links (add links to your terms of service or privacy policy)

 

Step 7: Test Your Email Receipt Configuration

 

Before going live, test your email receipt setup:

  1. Create a test payment in test mode:
  • Ensure your Stripe account is in test mode (check the toggle in the left sidebar)
  • Create a test product or use an existing one
  • Process a test payment using test card details (e.g., 4242 4242 4242 4242)
  1. Check the email account you specified to verify the receipt was received
  2. Review the formatting, branding, and content of the email

 

Step 8: Set Up Receipt Metadata (Advanced)

 

Add custom data to your receipts using metadata:


// Adding metadata to a PaymentIntent
const paymentIntent = await stripe.paymentIntents.create({
  amount: 2000,
  currency: 'usd',
  receipt\_email: '[email protected]',
  metadata: {
    order\_id: '6735',
    customer\_name: 'John Doe',
    product\_details: 'Premium Subscription - Annual'
  }
});

This metadata will be available in your Stripe Dashboard and can be included in receipt templates.

 

Step 9: Configure Webhook Notifications for Email Events (Optional)

 

Set up webhooks to track email delivery status:

  1. Go to "Developers" > "Webhooks" in your Stripe Dashboard
  2. Click "Add endpoint"
  3. Enter your endpoint URL
  4. Select the events to listen for:
  • customer.email.created
  • customer.email.delivered
  • customer.email.failed
  1. Click "Add endpoint" to save

Example webhook handler code:


// Example Express.js webhook handler
const express = require('express');
const app = express();

// This is your Stripe CLI webhook secret for testing
const endpointSecret = 'whsec\_...';

app.post('/webhook', express.raw({type: 'application/json'}), (request, response) => {
  const sig = request.headers['stripe-signature'];
  let event;

  try {
    event = stripe.webhooks.constructEvent(request.body, sig, endpointSecret);
  } catch (err) {
    response.status(400).send(`Webhook Error: ${err.message}`);
    return;
  }

  // Handle email events
  switch (event.type) {
    case 'customer.email.created':
      const emailCreated = event.data.object;
      console.log('Email created and queued for sending');
      break;
    case 'customer.email.delivered':
      const emailDelivered = event.data.object;
      console.log('Email successfully delivered');
      break;
    case 'customer.email.failed':
      const emailFailed = event.data.object;
      console.log('Email delivery failed:', emailFailed.failure\_reason);
      break;
    default:
      console.log(`Unhandled event type ${event.type}`);
  }

  response.send();
});

app.listen(8000, () => console.log('Webhook server running on port 8000'));

 

Step 10: Monitor Email Performance

 

Track how your receipt emails are performing:

  1. In your Stripe Dashboard, go to "Settings" > "Emails"
  2. Review the "Email activity" section to see:
  • Number of emails sent
  • Delivery rates
  • Open rates
  • Failed deliveries
  1. Adjust your email strategy based on these metrics

 

Conclusion

 

You've now successfully set up and customized email receipts in Stripe. This feature not only provides customers with confirmation of their purchases but also enhances your brand's professionalism. Remember to regularly review your email templates and performance metrics to ensure they continue to meet your business needs and customer expectations.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022