# Order confirmation email template

URL: https://samva.dev/templates/order-receipt

An itemized receipt with a print for each item, invoice-style totals, the card used, and the shipping address. Edit it in the AI email editor.

## Guidance

- Pass the order's items as a list. Each row renders its print, name, details, cadence when it is a subscription, quantity and price. The discount is optional: omit it, as the default fixture does, and the totals close up; long-content adds a discount line.
- Format prices, dates and the order number in your application so the receipt's invoice-style totals match the figures you already print, and send only the last four digits of the card. The roast and ship days are input; the template never reads the clock.
- It is written for Cascara, a fictional coffee roaster that ships on subscription. Replace its mark and the risograph prints with your own images, and restyle through the theme tokens in starter.css. Keep the order link pointing at the customer's signed-in order page.
- Edit the receipt in the AI email editor. Keep shipping updates and declined-charge notices on their own templates.

## Variables

| Variable | Meaning |
| --- | --- |
| customerName | Value for customer name. |
| discount | Value for discount. |
| grindUrl | Link for grind. |
| homeUrl | Link for home. |
| items | Value for items. |
| orderDate | Date for order. |
| orderNumber | Value for order number. |
| orderUrl | Link for order. |
| pauseUrl | Link for pause. |
| paymentBrand | Value for payment brand. |
| paymentLast4 | Value for payment last 4. |
| roastDate | Date for roast. |
| roastDay | Value for roast day. |
| shipDay | Value for ship day. |
| shipping | Value for shipping. |
| shippingAddress | Value for shipping address. |
| skipUrl | Link for skip. |
| subtotal | Value for subtotal. |
| tax | Value for tax. |
| total | Value for total. |
