Zapier Tutorial

Automate Receipt Generation with Zapier

Connect Stripe, PayPal, Square, or any payment platform to auto-generate and send professional PDF receipts after every payment.

The problem

Every time someone pays you, they expect a receipt. For SaaS subscriptions, e-commerce orders, or freelance payments, customers need proof of purchase for their records, expense reports, or taxes.

Payment platforms like Stripe send basic email confirmations, but they're generic and don't reflect your brand. Manually creating receipts means copying transaction details, formatting a document, exporting to PDF, and emailing it. For 20 transactions a day, that's tedious and error-prone.

The solution: Create a branded receipt template once in TemplateFox, connect it to your payment platform via Zapier, and let it auto-generate and email receipts for every payment.

Receipt vs Invoice: What's the difference?

They're often confused, but serve different purposes in the payment flow:

๐Ÿ“คInvoice (Before Payment)

  • "You owe us $500"
  • Request for payment
  • May include payment terms (Net 30)
  • Customer hasn't paid yet

๐Ÿ“ฅReceipt (After Payment)

  • "You paid $500"
  • Confirmation of transaction
  • Shows payment method used
  • Proof of purchase for records

Need invoices instead? See our invoice automation guide for sending payment requests before customers pay.

1

Create your receipt template

1.1 โ€” Choose a template

Start with one of our pre-built receipt templates or create your own:

  1. Go to Templates
  2. Filter by Receipt category
  3. Choose a template that matches your use case
  4. Click Use Template to add it to your dashboard

Available receipt templates

Payment Confirmation
Sales Receipt
Service Receipt
Donation Receipt
Deposit Receipt
Rent Receipt

Tip: For Stripe/PayPal automation, use the Payment Confirmation template โ€” it's designed for online payments with QR verification.

Receipt template in the visual editor showing QR code and payment confirmation

1.2 โ€” Understand receipt fields

A receipt has different fields than an invoice. Since the payment already happened, you're confirming the transaction, not requesting money.

Hardcode once (your business)

  • company_name โ€” Your business name
  • company_address โ€” Your address
  • company_email โ€” Support email
  • company_phone โ€” Contact number

Edit these directly in the template โ€” they stay the same for every receipt.

Dynamic from Zapier (per transaction)

  • confirmation_number โ€” Unique receipt ID
  • transaction_date โ€” When paid
  • payer_name โ€” Who paid
  • payer_email โ€” Their email
  • amount โ€” Amount paid
  • payment_method โ€” Card/PayPal

Map these from your payment platform in Zapier.

Receipt-specific fields (vs invoices)

Receipts include payment confirmation details that invoices don't have:

{{payment_method}}โ€” "Visa" or "PayPal"
{{reference_id}}โ€” Unique payment reference (pi_3Nx...)
{{status}}โ€” "Completed" or "Pending"
{{card_last_four}}โ€” Last 4 digits of card used

Optional: QR code for verification

Add a QR code that links to a verification page. Customers can scan it to confirm the receipt is authentic โ€” useful for expense reports and fraud prevention.

{{verification_url}}โ†’ https://yoursite.com/verify/RCP-2024-0042
QR code selected in template editor showing properties panel

Learn more: Data binding ยท QR codes ยท Expressions

1.3 โ€” Test with the Preview tab

Test your template with sample data before connecting to Zapier. The JSON panel lets you see exactly how your receipt will look with real transaction data.

1

Open the Preview tab

Switch from Design to Preview mode in the editor.

2

Edit the JSON data

Add test values for each field. The preview updates in real-time.

3

Copy the payload structure

Use Copy Payload โ€” this is the exact format you'll send from Zapier.

Tip: Test with realistic data โ€” use actual amounts, a real date format, and the payment method format your platform uses (e.g., "Visa").

Preview tab with JSON data panel
View example JSON payload for Stripe
{
"confirmation_number": "RCP-2024-0042",
"transaction_date": "January 15, 2024",
"transaction_time": "2:34 PM",
"payer_name": "Sarah Chen",
"payer_email": "sarah@example.com",
"amount": "49.99",
"currency": "USD",
"payment_method": "Visa",
"card_last_four": "4242",
"reference_id": "pi_3NxQKwABCD1234567890",
"status": "Completed",
"recipient_name": "Acme SaaS Inc.",
"recipient_account": "****7890",
"verification_url": "https://acme.io/verify/RCP-2024-0042"
}
2

Connect Stripe with Zapier

We'll use Stripe as the example since it's the most popular payment platform. The process is similar for PayPal, Square, and others โ€” we'll cover those below.

Zapier workflow: 1. Stripe Payment โ†’ 2. TemplateFox Generate PDF โ†’ 3. Gmail Send Email

2.1 โ€” Set up the trigger

Choose the right trigger based on your use case:

S

Payment Intent Succeeded

Best for one-time payments, product purchases, service fees

S

Invoice Payment Succeeded

Best for subscriptions, recurring billing (includes invoice details)

S

New Charge

Legacy option โ€” use Payment Intent for new integrations

  1. Go to zapier.com and create a new Zap
  2. Search for Stripe
  3. Select Payment Intent Succeeded
  4. Connect your Stripe account
  5. Test the trigger with a recent payment

Testing with Stripe Test Mode

Connect Zapier using your test secret key (starts with sk_test_). Create a test payment with card 4242 4242 4242 4242.

2.2 โ€” Map Stripe fields to your template

Now connect the Stripe data to your receipt template. Add a TemplateFox action step:

  1. Add an Action step
  2. Search for "TemplateFox"
  3. Select "Generate PDF"
  4. Connect your TemplateFox account with your API key
  5. Select your receipt template
  6. Map the fields using Stripe data

Common Stripe field mappings

Template FieldStripe FieldNotes
confirmation_numberIDPayment Intent ID (pi_xxx)
transaction_dateCreatedUse Formatter to format date
payer_emailReceipt EmailCustomer's email address
amountAmountโš ๏ธ Divide by 100 (cents โ†’ dollars)
card_last_fourCharges Data Card Last4Last 4 digits of card
reference_idIDSame as confirmation_number
payment_methodCharges Data Card BrandVisa, Mastercard, etc.

Converting Stripe amounts from cents

Stripe sends amounts in cents (4999 = $49.99). Add a Formatter step before TemplateFox:

  1. Add Formatter by Zapier action
  2. Select Numbers โ†’ Spreadsheet-Style Formula
  3. Formula: [Amount] / 100
  4. Use this formatted amount in TemplateFox

Tip: The template has separate fields for payment_method (card brand) and card_last_four (last 4 digits), making it easy to display them together.

2.3 โ€” Send to customer

Automatically email the receipt to your customer:

  1. Add another Action step
  2. Choose Gmail, Outlook, or SMTP by Zapier
  3. Select "Send Email"
  4. Set the To field to Stripe's Receipt Email
  5. Subject: Receipt for your payment - [Description]
  6. Attach the PDF URL from the TemplateFox action
  7. Turn on your Zap

Suggested email template

Subject: Receipt for your payment - [Product Name]

Hi [Customer Name],

Thank you for your payment of [Amount].

Please find your receipt attached to this email.

If you have any questions, reply to this email or contact us at [support email].

Best,
[Your Company]

Done! Every time a payment succeeds in Stripe, your customer automatically gets a branded PDF receipt in their inbox.

Other payment platforms

The same workflow works with any payment platform that has a Zapier integration. Here are the triggers and key fields for popular platforms:

P

PayPal

Trigger: Successful Sale

Key fields:

  • โ€ข Transaction ID โ†’ receipt number
  • โ€ข Payer Email โ†’ customer email
  • โ€ข Gross Amount โ†’ amount (already in dollars)
  • โ€ข Payment Date โ†’ payment date
S

Square

Trigger: Payment Completed

Key fields:

  • โ€ข Payment ID โ†’ receipt number
  • โ€ข Receipt URL โ†’ verification link
  • โ€ข Total Money Amount โ†’ amount (in cents)
  • โ€ข Card Details Last4 โ†’ card last 4
G

Gumroad

Trigger: New Sale

Key fields:

  • โ€ข Sale ID โ†’ receipt number
  • โ€ข Email โ†’ customer email
  • โ€ข Price โ†’ amount (in dollars)
  • โ€ข Product Name โ†’ description
L

LemonSqueezy

Trigger: New Order

Key fields:

  • โ€ข Order ID โ†’ receipt number
  • โ€ข User Email โ†’ customer email
  • โ€ข Total โ†’ amount (in dollars)
  • โ€ข Product Name โ†’ description

All supported payment platforms

S
Stripe
P
PayPal
S
Square
G
Gumroad
L
LemonSqueezy
P
Paddle
S
Shopify
W
WooCommerce
C
Chargebee

Frequently asked questions

What's the difference between a receipt and an invoice?

An invoice is sent before payment to request money ("You owe $500"). A receipt is sent after payment to confirm the transaction ("You paid $500"). Receipts serve as proof of purchase for accounting and tax purposes.

Which payment platforms can I connect?

Any payment platform with a Zapier integration: Stripe, PayPal, Square, Gumroad, LemonSqueezy, Paddle, Shopify, and 100+ more. If it has a "Payment Succeeded" or "New Sale" trigger, it works.

How do I handle Stripe amounts in cents?

Stripe sends amounts in cents (e.g., 4999 for $49.99). Use Zapier's Formatter action with Numbers โ†’ Spreadsheet-Style Formula and the formula [amount] / 100 to convert before passing to TemplateFox.

Can I show the last 4 digits of the card used?

Yes. Stripe's Charges Data Card Last4 field contains the last 4 digits. Map it to the {{card_last_four}} field in your template to display it alongside the card brand.

How do I number receipts sequentially?

Use the transaction ID from your payment platform (e.g., Stripe's payment_intent ID) as a unique receipt number. For sequential numbering like "RCP-0001", use a Google Sheet to track the last number and Zapier's Formatter to increment it.

Can I generate receipts for recurring subscriptions?

Yes. Use Stripe's Invoice Payment Succeeded trigger for subscriptions. Each recurring payment triggers a new receipt with the current billing period, amount, and subscription details.

How do I handle multiple currencies?

Your payment platform sends the currency code (USD, EUR, GBP) with each transaction. Map it to your template and use conditional formatting to display the correct currency symbol.

How much does it cost?

TemplateFox offers 60 free PDFs per month. Paid plans start at $19/month for higher volume. View pricing.

Automate your PDF generation

Complete documentation, no-code integrations, and a powerful API to help you generate PDFs at scale. Let us handle the boring stuff.

ย