Send a branded PDF receipt for every Stripe payment
Stripe receipt PDFs with your own branding, created on every completed checkout with Zapier or a webhook and emailed to the customer automatically.
Quick answer. When a Stripe Checkout session completes, Zapier or your server picks up the payment. The details go into a receipt template, html-pdf.com turns it into a PDF, and the PDF is emailed to the customer or stored with your records.
What you'll build
Stripe already sends a basic email receipt. This gives you a PDF receipt that looks like your brand, with your logo, your colors, extra fields your customers ask for (like a VAT number or a purchase order reference) and your own wording.
The customer gets an email with the PDF attached a few seconds after paying. You keep a copy in Google Drive or your database.
What you need
- A Stripe account that takes payments with Stripe Checkout or Payment Links.
- Zapier (with Webhooks by Zapier) for the no-code path, or a small Node.js server for the code path.
- A receipt design. Start with the receipt template. The template is a web page design that we turn into a PDF, so you only edit text and colors.
- An API key from html-pdf.com. New accounts get 100 free pages once, with no card.
Step by step with Zapier
- Trigger. Create a Zap with Stripe as the app and Checkout Session Completed as the event. Test it with a recent payment.
- Make the PDF. Add Webhooks by Zapier → Custom Request. Method
POST, URLhttps://html-pdf.com/v1/pdf. - Headers.
AuthorizationwithBearer hp_live_...andContent-Typewithapplication/json. - Data. Paste the JSON below. Replace the customer name, amount and date with fields from the Stripe step. Stripe amounts come in cents, so divide by 100 with a Formatter step first.
- Send. Add Gmail → Send Email, put the customer email in To and map the
urlfrom step 2 into Attachments.
{
"html": "<h1>Receipt</h1><p>Paid by Alex Kim on 10 Oct 2026</p><p>Amount: 49.00 USD</p>",
"format": "A5",
"margin": "12mm",
"filename": "receipt.pdf",
"response": "url"
}
With "response": "url" you get a download link valid for 24 hours, which Zapier uses to attach the file. Our Zapier guide has the full step reference, and the same flow works in Make and n8n.
Code path for developers
Listen for the checkout.session.completed event, then render and send.
import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
app.post("/stripe/webhook", express.raw({ type: "application/json" }), async (req, res) => {
const event = stripe.webhooks.constructEvent(
req.body, req.headers["stripe-signature"], process.env.STRIPE_WEBHOOK_SECRET
);
if (event.type !== "checkout.session.completed") return res.sendStatus(200);
const s = event.data.object;
const amount = (s.amount_total / 100).toFixed(2);
const html = `<h1>Receipt</h1><p>${s.customer_details.name}</p><p>${amount} ${s.currency.toUpperCase()}</p>`;
const pdf = await fetch("https://html-pdf.com/v1/pdf", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.HTML_PDF_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ html, format: "A5", filename: `receipt-${s.id}.pdf` }),
});
const file = Buffer.from(await pdf.arrayBuffer());
// Attach `file` to your transactional email.
res.sendStatus(200);
});
For line items, call stripe.checkout.sessions.listLineItems(s.id) and add a row per item. The receipt PDF API page covers layout tips.
Ask your AI agent
Connect the html-pdf.com MCP server to Claude or ChatGPT and try a design first.
With html-pdf, create an A5 receipt PDF for "Studio Nine Yoga". Customer Alex Kim, 10 class pass, 49 USD, paid by card ending 4242 on 10 Oct 2026. Add our VAT number and a small footer with the support email.
Ask for the HTML afterwards and paste it into Zapier or your code.
Receipts or invoices?
A receipt confirms a payment that already happened. If you need a numbered invoice with payment terms, use the invoice template and see the invoice PDF guide. The automation is the same.
FAQ
Doesn't Stripe already send receipts?
Yes, Stripe can email receipts, and its design options are limited to things like logo and colors. This approach gives you full control of the layout and lets you attach a real PDF.
Which Stripe event should I use?
Use checkout.session.completed for Checkout and Payment Links. For subscriptions, invoice.paid fires on every renewal.
Can I store the receipts?
Yes. Download links last 24 hours, so save the PDF to Google Drive, S3 or your database in the same run if you want to keep it.
How much does each receipt cost?
One credit per page, so a one page receipt is one credit. Failed renders cost nothing.
