Invoices email template

Sent whenever a new order is completed, and for recurring subscription payments — order.isRecurringInvoice distinguishes the two.

The template receives:

Variable Type Notes
context string Email, Pdf or Html — lets one template render in multiple contexts.
settings object Store settings — see Settings (signature, businessAddress, logoUrl, includeProductImagesInInvoice, orderHistoryUrl).
order Order The completed order.
refund Refund Present only when the email follows a refund.

What you can access

The data is described by reusable types, each documented once and shared across all order emails:

Path Type
order Order
order.items[] Item
order.billingAddress, order.shippingAddress Address
order.summary Summary
order.summary.taxes[], order.taxes[] Tax
order.discounts[] Discount
order.customFields[], order.items[].customFields[] CustomField
order.refunds[], refund Refund

Minimal example

{
  "context": "Email",
  "settings": { "businessAddress": { "...": "see Address" }, "logoUrl": "..." },
  "order": {
    "invoiceNumber": "SNIP-1001",
    "email": "john.doe@example.com",
    "total": 120,
    "items": [ { "id": "tshirt", "name": "Geek T-Shirt", "quantity": 2, "unitPrice": 50, "categories": [], "metadata": null } ],
    "summary": { "subtotal": 100, "total": 120, "taxes": [] }
  }
}

Full field-by-field detail lives in the linked type pages — kept in one place so every order email (Invoices, Order received, Shipped, Tracking, Refund, Comment) shares a single source of truth.

Was this article helpful?