---
title: "Order Confirmation Email Template: 7 Examples With Code"
description: An order confirmation email template needs the order number, items, total, payment, address and delivery date. 7 copyable HTML and text examples.
canonical: https://sendhq.cc/blog/order-confirmation-email-templates
last-updated: 2026-11-16
author: Dhrumil Barot
author_bio: Dhrumil is an email marketing expert. Dhrumil built SendHQ so developers and AI agents can send, receive and track email without fighting deliverability on their own.
published: 2026-11-16
updated: 2026-11-16
---
# Order Confirmation Email Template: 7 Examples With Code

By [Dhrumil Barot](https://sendhq.cc/about.md#founder), Founder

An order confirmation email template needs the order number, items, total, payment, address and delivery date. 7 copyable HTML and text examples.

Published November 16, 2026 · Updated November 16, 2026

**TL;DR:** A good order confirmation email template puts the order number, items, total, payment method, delivery address and expected delivery date at the very top, and sends within seconds of checkout. Below are 7 copyable templates (physical goods, digital downloads, subscriptions, pre-orders, partial shipments, failed payments, B2B purchase orders), each in HTML or plain text. SendHQ can store any of them as a hosted template with typed variables and send it by key from one API call.

[Create a SendHQ workspace and send your first order confirmation](https://sendhq.cc/pricing.md)

An order confirmation email is the message a store sends right after checkout to confirm what the buyer agreed to pay for. Under US law it is a transactional message: CAN-SPAM defines those as email whose primary purpose is "to facilitate, complete, or confirm a commercial transaction that the recipient has previously agreed to enter into with the sender" ([15 U.S.C. 7702](https://www.law.cornell.edu/uscode/text/15/7702)). That status holds only while the order details stay at the top and promotion stays small. Every template below follows that rule, ships with a plain text part, and uses the same variable names so you can swap one for another.

## What should an order confirmation email include?

An order confirmation email should include the fields a buyer would need to check or dispute the order later. The [schema.org Order type](https://schema.org/Order) describes an order as "a confirmation of a transaction (a receipt)" and lists the same fields stores use:

| Field | Variable used below | Why it matters |
| --- | --- | --- |
| Order number | `{{order_number}}` | Support lookups, disputes |
| Order date | `{{order_date}}` | Return windows start here |
| Line items, quantity, price | `{{#items}}` | The buyer checks what they bought |
| Subtotal, shipping, tax, total | `{{total}}` | Matches the card statement |
| Payment method (last 4 digits) | `{{card_last4}}` | Recognises the charge |
| Shipping and billing address | `{{shipping_address}}` | Catches typos before dispatch |
| Expected delivery date | `{{delivery_estimate}}` | Sets the promise you must keep |
| Order status link | `{{order_url}}` | Self-service instead of tickets |
| Support contact | `{{support_email}}` | Reply-to that a human reads |

Delivery dates are not decoration. The FTC Mail Order Rule requires US sellers to ship within the time they state, or within 30 days when they state none (50 days when the buyer applies for credit) ([16 CFR 435.2](https://www.law.cornell.edu/cfr/text/16/435.2)). In the EU, goods are due within 30 days when no date was agreed ([Directive 2011/83/EU](https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32011L0083)), and the contract confirmation must reach the buyer on a "durable medium", which an email they keep satisfies.

![The order confirmation fires from the payment event and its delivery is tracked](https://cdn.sanity.io/images/l4lj7ros/production/b7a9902d94fdb604f2b3038014e0c366076ed9a4-1344x326.png?w=1280&auto=format)

Send from the payment event, then watch the delivery event, not just the API response.

## Why run these templates on SendHQ?

SendHQ is an email API for products and AI agents. For this job it adds four specifics:

- **Hosted templates with typed variables.** Declare `order_number`, `items` and the rest with types and required flags. A render fails with a 422 when data breaks the published contract, so a confirmation with an empty total never goes out. Inserted values are escaped by context ([hosted templates docs](https://sendhq.cc/docs/templates.md)).
- **Immutable releases and provenance.** Publishing freezes a release. Each send records the template, release and rendered-content hash, so you can show exactly what a disputed email said.
- **Events and replies in one place.** Delivery events and inbound email come with every plan: a bounce appears as an event, a customer reply lands in the same workspace.
- **Price.** Starter Transactional is $9 a month for 50,000 emails and 25 verified domains ([pricing](https://sendhq.cc/pricing.md)).

```
await fetch("https://sendhq.cc/api/v1/emails", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SENDHQ_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": `order-confirmation-${order.id}`
  },
  body: JSON.stringify({
    from: "orders@shop.example",
    to: [order.email],
    template: {
      key: "order-confirmation",
      data: {
        first_name: order.firstName,
        order_number: order.number,
        total: order.totalFormatted,
        delivery_estimate: order.deliveryEstimate,
        order_url: order.url
      }
    }
  })
});
```

The `Idempotency-Key` header carries the order ID; a retry must reuse that key with an identical payload, which stops a retried webhook from emailing the customer twice ([errors and retries](https://sendhq.cc/docs/errors.md)). A personalized template send takes exactly one To recipient and no Cc or Bcc; use the batch endpoint for many orders at once. SendHQ does not provide a drag-and-drop template gallery: you bring the HTML, it versions, validates and sends it.

## 1. Physical goods order confirmation (HTML)

Scenario: a store ships a parcel. This is the default template; the others are variations of it.

```
<!doctype html>
<html lang="en">
<body style="margin:0;background:#f4f4f5;font-family:Arial,sans-serif;color:#18181b">
  <table role="presentation" width="100%" cellpadding="0" cellspacing="0">
    <tr><td align="center" style="padding:24px">
      <table role="presentation" width="560" cellpadding="0" cellspacing="0" style="background:#ffffff;border-radius:8px">
        <tr><td style="padding:24px">
          <h1 style="font-size:20px;margin:0 0 8px">Thanks, {{first_name}}. Your order is confirmed.</h1>
          <p style="margin:0 0 16px">Order <strong>#{{order_number}}</strong>, placed {{order_date}}.
             Expected delivery: <strong>{{delivery_estimate}}</strong>.</p>
          <table role="presentation" width="100%" cellpadding="6" style="border-collapse:collapse">
            {{#items}}
            <tr><td>{{name}} x {{quantity}}</td><td align="right">{{line_total}}</td></tr>
            {{/items}}
            <tr><td>Shipping</td><td align="right">{{shipping}}</td></tr>
            <tr><td>Tax</td><td align="right">{{tax}}</td></tr>
            <tr><td><strong>Total</strong></td><td align="right"><strong>{{total}}</strong></td></tr>
          </table>
          <p>Paid with card ending {{card_last4}}.<br>Shipping to: {{shipping_address}}</p>
          <p><a href="{{order_url}}" style="background:#18181b;color:#ffffff;padding:10px 16px;text-decoration:none;border-radius:6px">View your order</a></p>
          <p style="font-size:13px;color:#52525b">Wrong address? Reply to this email before {{cutoff_time}} and we will fix it.</p>
        </td></tr>
      </table>
    </td></tr>
  </table>
</body>
</html>
```

What it shows: order number, delivery promise and total in the first screen; one button; a reply path for address fixes. Adapt it by swapping the colours and adding your logo above the H1. Keep tables for layout because many email clients still render table layout more reliably than CSS grid.

## 2. Plain text version of the same order

Scenario: every HTML confirmation should carry a text part. Some readers and filters only see this.

```
Thanks, {{first_name}}. Your order is confirmed.

Order #{{order_number}}, placed {{order_date}}
Expected delivery: {{delivery_estimate}}

{{#items}}
- {{name}} x {{quantity}}: {{line_total}}
{{/items}}
Shipping: {{shipping}}
Tax: {{tax}}
Total: {{total}}

Paid with card ending {{card_last4}}
Shipping to: {{shipping_address}}

View your order: {{order_url}}
Questions? Reply to this email or write to {{support_email}}.
```

What it shows: the same facts in the same order, with the link written out. Adapt it by keeping the line order identical to the HTML, so support can read either one.

## 3. Digital download confirmation

Scenario: an ebook, course or software licence. There is no shipping, so the delivery is the link.

```
Subject: Your download for order #{{order_number}} is ready

Hi {{first_name}},

Thanks for buying {{product_name}} ({{total}}, card ending {{card_last4}}).

Download it here: {{download_url}}
This link works {{download_limit}} times and expires on {{expires_on}}.

Licence key: {{licence_key}}

Lost the link later? Your library keeps every purchase: {{library_url}}
```

What it shows: the thing they paid for in the first lines. Adapt it by stating link expiry plainly; an expired link with no warning is the most common support ticket for digital goods.

## 4. Subscription start confirmation

Scenario: the first charge of a monthly or yearly plan.

```
Subject: You're subscribed to {{plan_name}}

Hi {{first_name}},

Your {{plan_name}} subscription started on {{start_date}}.
You paid {{total}} today with card ending {{card_last4}}.
Next charge: {{next_charge_amount}} on {{next_charge_date}}.

Manage or cancel any time: {{billing_url}}
Order reference: #{{order_number}}
```

What it shows: the next charge date and amount, and the cancel link, up front. Adapt it for free trials by adding the date the trial converts to paid; that line prevents most "I didn't agree to this" chargebacks.

## 5. Pre-order confirmation

Scenario: the item is not in stock yet. Under the [FTC Mail Order Rule](https://www.law.cornell.edu/cfr/text/16/435.2), the date you state is the date you must meet or explain.

```
Subject: Pre-order #{{order_number}} confirmed: ships {{ship_window}}

Hi {{first_name}},

You've pre-ordered {{product_name}}.
Expected to ship: {{ship_window}}
{{#charged_now}}You paid {{total}} today.{{/charged_now}}
{{^charged_now}}We'll charge {{total}} to card ending {{card_last4}} when it ships.{{/charged_now}}

If the date moves, we'll email you with a new date and the choice to cancel for a full refund.

Cancel this pre-order: {{order_url}}
```

What it shows: when money moves and what happens on a delay. Adapt it by sending a separate delay notice if the date slips; the rule requires you to offer the buyer the option to consent to the delay or cancel.

## 6. Partial shipment confirmation

Scenario: part of the order ships now, the rest later.

```
Subject: Part of order #{{order_number}} is on its way

Hi {{first_name}},

Shipped today ({{carrier}} {{tracking_number}}):
{{#shipped_items}}
- {{name}} x {{quantity}}
{{/shipped_items}}

Still coming ({{remaining_estimate}}):
{{#pending_items}}
- {{name}} x {{quantity}}
{{/pending_items}}

You won't be charged again. Track everything: {{order_url}}
```

What it shows: two lists, so nobody thinks an item was forgotten. Adapt it by saying whether shipping is charged once or per parcel.

## 7. Failed payment after order

Scenario: an asynchronous payment (bank transfer, a declined renewal) fails after the order was placed.

```
Subject: Action needed: payment for order #{{order_number}} didn't go through

Hi {{first_name}},

We couldn't take payment of {{total}} for order #{{order_number}}.
Reason from your bank: {{decline_reason}}

Update your payment by {{hold_until}} to keep your order: {{payment_url}}
After that, the order is cancelled and nothing is charged.
```

What it shows: the deadline and the consequence. Adapt it by never including card numbers beyond the last four digits, and by sending at most one reminder before the hold ends.

## Which order confirmation template should you use?

| Situation | Template | Must-have line |
| --- | --- | --- |
| Physical product, in stock | 1 + 2 | Expected delivery date |
| Download, course, licence | 3 | Download link and expiry |
| Recurring plan | 4 | Next charge date and amount |
| Not in stock yet | 5 | Ship window and cancel option |
| Split fulfilment | 6 | What shipped vs what is pending |
| Payment failed | 7 | Deadline to fix payment |

## Is an order confirmation email transactional or marketing?

An order confirmation email is transactional when confirming the order is its primary purpose. The FTC rule on mixed messages says a message with both kinds of content counts as commercial when the transactional part does not appear "in whole or in substantial part, at the beginning of the body" ([16 CFR 316.3](https://www.law.cornell.edu/cfr/text/16/316.3)). Placement, proportion, and how colour, graphics and type size highlight the promotion all count. Keep the order details first and any promotion small and last.

![Order details first keeps a message transactional; promotion first makes it commercial](https://cdn.sanity.io/images/l4lj7ros/production/5a8a2393afd1b06728ef166c8534756c866f0aa3-1344x410.png?w=1280&auto=format)

16 CFR 316.3 weighs placement and proportion.

This matters for deliverability as well as law. Google's sender guidelines require one-click unsubscribe for marketing and subscribed messages from senders above 5,000 messages a day to Gmail ([Gmail sender guidelines](https://support.google.com/a/answer/81126)). A pure order confirmation does not need one; an order email that reads like a promotion is treated like one. Send confirmations from a dedicated address such as `orders@` on a domain with [SPF, DKIM and DMARC](https://sendhq.cc/guides/email-dkim-spf-dmarc.md) in place.

## Can I add product recommendations to an order confirmation email?

Yes, if they sit in one short row after the totals, the address and the support line. Three products with image, name and price is a sensible ceiling. Pick them from what was bought (a case for the phone, refills for the filter), not from a sale calendar. Once recommendations outgrow the order details, treat the email as marketing: it then needs consent and an unsubscribe link.

## Adding the Gmail "View order" button

Gmail supports schema.org markup for orders. A JSON-LD block in the HTML with `merchant`, `orderNumber`, `price`, `priceCurrency` and `acceptedOffer`, plus a `url` and `ViewAction`, can show a View Order button ([Gmail Order markup](https://developers.google.com/gmail/markup/reference/order)):

```
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Order",
  "merchant": { "@type": "Organization", "name": "{{store_name}}" },
  "orderNumber": "{{order_number}}",
  "priceCurrency": "{{currency}}",
  "price": "{{total_raw}}",
  "url": "{{order_url}}",
  "potentialAction": { "@type": "ViewAction", "url": "{{order_url}}" }
}
</script>
```

Gmail shows these actions only for registered senders, so treat the button as a bonus, not a dependency.

## FAQ

### When should an order confirmation email be sent?

Send it as soon as payment succeeds, triggered by the payment event rather than a scheduled job. Use the order ID as the idempotency key so a retried webhook cannot send it twice, and check the delivery event, not only the API response.

### Should an order confirmation have a plain text version?

Yes. Send a multipart message with an HTML part and a plain text part carrying the same facts (template 2). The text part is what some clients, screen readers and filters read.

### What is the difference between an order confirmation and a shipping confirmation?

An order confirmation confirms the purchase and the promise (items, total, delivery estimate). A shipping confirmation follows when the parcel leaves and adds the carrier and tracking number. Template 6 covers the case where both happen in parts.

### What subject line should an order confirmation use?

Put the order number in it: "Order #10482 confirmed" or "Your order #10482 is confirmed". Buyers search their inbox by order number when they contact support.

### Do order confirmation emails need an unsubscribe link?

Not when they are transactional. Under CAN-SPAM, a message whose primary purpose is confirming a transaction the recipient agreed to is not a commercial message. Add marketing content and that can change.

### How much does it cost to send order confirmations through an API?

On SendHQ, Starter Transactional is $9 a month for 50,000 emails. Compare providers for your own volume with the [email cost calculator](https://sendhq.cc/tools/email-cost-calculator.md).

Before your first send from a new domain, read the [domain warm-up guide](https://sendhq.cc/guides/domain-warm-up).

[Start with SendHQ: plans from $9 a month](https://sendhq.cc/pricing.md)

## Keep reading

- [Aerosend Review: Aerosend vs SendHQ, Pricing and Limits](https://sendhq.cc/blog/aerosend-review): Aerosend sells managed cold email inboxes at $4 each ($2 past 150). See what it includes, its limits, and when SendHQ fits instead. Read article →
- [SendPortal Review: SendPortal vs SendHQ for Product and Newsletter Email](https://sendhq.cc/blog/sendportal-review): SendPortal is a free, MIT-licensed, self-hosted Laravel app for newsletters. What it costs to run, its limits, and how it compares with Send Read article →
- [SendGrid Pricing vs SendHQ: Cost at 10k to 200k Emails](https://sendhq.cc/blog/sendgrid-pricing-vs-sendhq): SendGrid pricing starts at $19.95/month for Essentials and $89.95 for Pro after a 60-day trial. See the cost at 10k-200k emails next to Send Read article →
