
80 × 220 mm
Receipts
Thermal POS receipt (80 mm)
A narrow 80 mm point-of-sale receipt for a café and bookshop, printed in black only. Items carry modifiers, the GST included in the total is derived from the lines, and the transaction ID is encoded as a Code 128 barcode.
PDFCustom sizeLocale en-AUHTML + Jinja
Opens Dynamic Document API with this template preloaded in a free workspace.
Generating this from your own data? See the Receipt Generation API.
Template language features
- Loops
- Conditionals
- Macros
- Filters
- Barcode
- Currency formatting
- Date formatting
- Number formatting
Filters such as format_currency and qrcode are described in the template language reference.
Variables
Derived from the sample data: 6 top-level fields, 35 paths in total. Send the same shape as data.
| Path | Type | Example |
|---|---|---|
| store | object | |
| store.name | string | "Wattle & Quill" |
| store.tagline | string | "Books · Coffee · Paper goods" |
| store.address | string | "Shop 3, 41 Jacaranda Arcade ⏎ Paddington QLD 4…" |
| store.abn | string | "12 345 678 901" |
| store.website | string | "wattleandquill.example.com" |
| sale | object | |
| sale.transaction_id | string | "WQ2-260917-0142" |
| sale.datetime | date | "2026-09-17T08:42:00+10:00" |
| sale.timezone | string | "Australia/Brisbane" |
| sale.register | string | "Till 2" |
| sale.served_by | string | "Jasmin" |
| sale.order_type | string | "Eat in · Table 6" |
| sale.currency | string | "AUD" |
| sale.locale | string | "en-AU" |
| sale.gst_rate | number | 0.1 |
| items | array<object> · 7 | |
| items[].name | string | "Flat white" |
| items[].variant | string | "Regular" |
| items[].quantity | number | 2 |
| items[].unit_price | number | 5.2 |
| items[].modifiers | array<object> · 1 | |
| items[].modifiers[].name | string | "Oat milk" |
| items[].modifiers[].price | number | 0.8 |
| items[].amount | number | 12 |
| payment | object | |
| payment.method | string | "EFTPOS" |
| payment.entry_mode | string | "Contactless" |
| payment.card | string | "Debit •••• 4821" |
| payment.auth_code | string | "063914" |
| loyalty | object | |
| loyalty.program | string | "Coffee card" |
| loyalty.stamps | number | 7 |
| loyalty.card_size | number | 10 |
| footer_lines | array<string> · 2 | "Books can be exchanged within 14 days with thi…" |
Render it with the API
After adding the template to your workspace, render it by ID and pass your data. Arrays are shortened here.
curl -X POST https://api-eu.dynamicdocumentapi.com/v1/renders \
-H "Authorization: Bearer $DYNAMIC_DOCUMENT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
},
"data": {
"store": {
"name": "Wattle & Quill",
"tagline": "Books · Coffee · Paper goods",
"address": "Shop 3, 41 Jacaranda Arcade\nPaddington QLD 4064",
"abn": "12 345 678 901",
"website": "wattleandquill.example.com"
},
"sale": {
"transaction_id": "WQ2-260917-0142",
"datetime": "2026-09-17T08:42:00+10:00",
"timezone": "Australia/Brisbane",
"register": "Till 2",
"served_by": "Jasmin",
"order_type": "Eat in · Table 6",
"currency": "AUD",
"locale": "en-AU",
"gst_rate": 0.1
},
"items": [
{
"name": "Flat white",
"variant": "Regular",
"quantity": 2,
"unit_price": 5.2,
"modifiers": [
{
"name": "Oat milk",
"price": 0.8
}
],
"amount": 12
},
{
"name": "Chai latte",
"variant": "Large",
"quantity": 1,
"unit_price": 6.2,
"modifiers": [
{
"name": "Soy milk",
"price": 0.8
},
{
"name": "Extra hot",
"price": 0
}
],
"amount": 7
}
],
"payment": {
"method": "EFTPOS",
"entry_mode": "Contactless",
"card": "Debit •••• 4821",
"auth_code": "063914"
},
"loyalty": {
"program": "Coffee card",
"stamps": 7,
"card_size": 10
},
"footer_lines": [
"Books can be exchanged within 14 days with this receipt.",
"Poetry night: first Thursday of the month, 6.30 pm."
]
},
"output": {
"format": "pdf",
"filename": "receipt-thermal-80mm.pdf"
}
}'const response = await fetch("https://api-eu.dynamicdocumentapi.com/v1/renders", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DYNAMIC_DOCUMENT_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
},
"data": {
"store": {
"name": "Wattle & Quill",
"tagline": "Books · Coffee · Paper goods",
"address": "Shop 3, 41 Jacaranda Arcade\nPaddington QLD 4064",
"abn": "12 345 678 901",
"website": "wattleandquill.example.com"
},
"sale": {
"transaction_id": "WQ2-260917-0142",
"datetime": "2026-09-17T08:42:00+10:00",
"timezone": "Australia/Brisbane",
"register": "Till 2",
"served_by": "Jasmin",
"order_type": "Eat in · Table 6",
"currency": "AUD",
"locale": "en-AU",
"gst_rate": 0.1
},
"items": [
{
"name": "Flat white",
"variant": "Regular",
"quantity": 2,
"unit_price": 5.2,
"modifiers": [
{
"name": "Oat milk",
"price": 0.8
}
],
"amount": 12
},
{
"name": "Chai latte",
"variant": "Large",
"quantity": 1,
"unit_price": 6.2,
"modifiers": [
{
"name": "Soy milk",
"price": 0.8
},
{
"name": "Extra hot",
"price": 0
}
],
"amount": 7
}
],
"payment": {
"method": "EFTPOS",
"entry_mode": "Contactless",
"card": "Debit •••• 4821",
"auth_code": "063914"
},
"loyalty": {
"program": "Coffee card",
"stamps": 7,
"card_size": 10
},
"footer_lines": [
"Books can be exchanged within 14 days with this receipt.",
"Poetry night: first Thursday of the month, 6.30 pm."
]
},
"output": {
"format": "pdf",
"filename": "receipt-thermal-80mm.pdf"
}
}),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const result = await response.json();
console.log(result);import os
import uuid
import requests
response = requests.post(
"https://api-eu.dynamicdocumentapi.com/v1/renders",
headers={
"Authorization": f"Bearer {os.environ['DYNAMIC_DOCUMENT_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C",
},
"data": {
"store": {
"name": "Wattle & Quill",
"tagline": "Books · Coffee · Paper goods",
"address": "Shop 3, 41 Jacaranda Arcade\nPaddington QLD 4064",
"abn": "12 345 678 901",
"website": "wattleandquill.example.com",
},
"sale": {
"transaction_id": "WQ2-260917-0142",
"datetime": "2026-09-17T08:42:00+10:00",
"timezone": "Australia/Brisbane",
"register": "Till 2",
"served_by": "Jasmin",
"order_type": "Eat in · Table 6",
"currency": "AUD",
"locale": "en-AU",
"gst_rate": 0.1,
},
"items": [
{
"name": "Flat white",
"variant": "Regular",
"quantity": 2,
"unit_price": 5.2,
"modifiers": [
{
"name": "Oat milk",
"price": 0.8,
},
],
"amount": 12,
},
{
"name": "Chai latte",
"variant": "Large",
"quantity": 1,
"unit_price": 6.2,
"modifiers": [
{
"name": "Soy milk",
"price": 0.8,
},
{
"name": "Extra hot",
"price": 0,
},
],
"amount": 7,
},
],
"payment": {
"method": "EFTPOS",
"entry_mode": "Contactless",
"card": "Debit •••• 4821",
"auth_code": "063914",
},
"loyalty": {
"program": "Coffee card",
"stamps": 7,
"card_size": 10,
},
"footer_lines": ["Books can be exchanged within 14 days with this receipt.", "Poetry night: first Thursday of the month, 6.30 pm."],
},
"output": {
"format": "pdf",
"filename": "receipt-thermal-80mm.pdf",
},
},
timeout=90,
)
response.raise_for_status()
print(response.json())