Skip to content

210 × 297 mm

Invoices

Product sales invoice

A bold A4 invoice for small goods businesses, easy to edit visually: a coloured letterhead, an invoice-number barcode, order and delivery details, striped product lines with SKUs, mixed VAT rates, a highlighted amount due and a received-by signature line. Embeds ZUGFeRD / Factur-X EN 16931 XML.

A4 portraitLocale en-IEHTML + JinjaHeader & footer

Opens Dynamic Document API with this template preloaded in a free workspace.

Template language features

  • Loops
  • Conditionals
  • Currency formatting
  • Date formatting
  • Number formatting
  • Barcode
  • Header & footer
  • Page numbers
  • Repeating table headers
  • signature
  • columns

Filters such as format_currency and qrcode are described in the template language reference.

Variables

Derived from the sample data: 3 top-level fields, 66 paths in total. Send the same shape as data.

PathTypeExample
invoiceobject
invoice.numberstring"MF-2026-0917"
invoice.issue_datedate"2026-09-17"
invoice.due_datedate"2026-10-01"
invoice.currencystring"EUR"
invoice.order_referencestring"BSC-PO-0482"
invoice.payment_termsstring"14 days net. Goods remain our property until p…"
invoice.deliveryobject
invoice.delivery.datedate"2026-09-16"
invoice.delivery.party_namestring"Brambleside Café, Quay Street"
invoice.delivery.addressobject
invoice.delivery.address.line1string"14 Coopers Quay"
invoice.delivery.address.citystring"Cork"
invoice.delivery.address.postcodestring"T12 R7XK"
invoice.delivery.address.countrystring"IE"
invoice.sellerobject
invoice.seller.namestring"Moonfield Coffee Roasters Ltd"
invoice.seller.trading_namestring"Moonfield Coffee Roasters"
invoice.seller.vat_idstring"IE1234567FA"
invoice.seller.electronic_addressobject
invoice.seller.electronic_address.idstring"orders@moonfield.example.com"
invoice.seller.electronic_address.schemestring"EM"
invoice.seller.addressobject
invoice.seller.address.line1string"Unit 5, Ardkeen Craft Yard"
invoice.seller.address.citystring"Galway"
invoice.seller.address.postcodestring"H91 X4F2"
invoice.seller.address.countrystring"IE"
invoice.seller.contactobject
invoice.seller.contact.namestring"Orla Brennan"
invoice.seller.contact.emailstring"orders@moonfield.example.com"
invoice.buyerobject
invoice.buyer.namestring"Brambleside Café Ltd"
invoice.buyer.vat_idstring"IE7654321WA"
invoice.buyer.electronic_addressobject
invoice.buyer.electronic_address.idstring"accounts@brambleside.example.com"
invoice.buyer.electronic_address.schemestring"EM"
invoice.buyer.addressobject
invoice.buyer.address.line1string"9 Merchant's Row"
invoice.buyer.address.line2string"2nd floor"
invoice.buyer.address.citystring"Cork"
invoice.buyer.address.postcodestring"T12 K3PD"
invoice.buyer.address.countrystring"IE"
invoice.buyer.contactobject
invoice.buyer.contact.namestring"Niamh Kearney"
invoice.paymentobject
invoice.payment.means_codestring"58"
invoice.payment.remittance_informationstring"MF-2026-0917"
invoice.payment.credit_transfersarray<object> · 1
invoice.payment.credit_transfers[].account_idstring"IE00EXMP99021512345678"
invoice.payment.credit_transfers[].account_namestring"Moonfield Coffee Roasters Ltd"
invoice.payment.credit_transfers[].bicstring"EXMPIE2D"
invoice.linesarray<object> · 7
invoice.lines[].quantitystring"12"
invoice.lines[].unitstring"H87"
invoice.lines[].net_amountstring"268.80"
invoice.lines[].priceobject
invoice.lines[].price.netstring"22.40"
invoice.lines[].taxobject
invoice.lines[].tax.categorystring"Z"
invoice.lines[].tax.ratestring"0"
invoice.lines[].itemobject
invoice.lines[].item.namestring"House espresso blend, 1 kg"
invoice.lines[].item.descriptionstring"Whole bean · Brazil and Colombia · roasted 12 …"
invoice.lines[].item.seller_idstring"MF-ESP-1000"
taglinestring"Small-batch coffee, roasted in Galway"
bank_namestring"Westerly Mutual Bank"

Sample data

Fictional records used for previews. Replace them with your own data when you call the API.

data.json
{
  "invoice": {
    "number": "MF-2026-0917",
    "issue_date": "2026-09-17",
    "due_date": "2026-10-01",
    "currency": "EUR",
    "order_reference": "BSC-PO-0482",
    "payment_terms": "14 days net. Goods remain our property until paid in full.",
    "delivery": {
      "date": "2026-09-16",
      "party_name": "Brambleside Café, Quay Street",
      "address": {
        "line1": "14 Coopers Quay",
        "city": "Cork",
        "postcode": "T12 R7XK",
        "country": "IE"
      }
    },
    "seller": {
      "name": "Moonfield Coffee Roasters Ltd",
      "trading_name": "Moonfield Coffee Roasters",
      "vat_id": "IE1234567FA",
      "electronic_address": {
        "id": "orders@moonfield.example.com",
        "scheme": "EM"
      },
      "address": {
        "line1": "Unit 5, Ardkeen Craft Yard",
        "city": "Galway",
        "postcode": "H91 X4F2",
        "country": "IE"
      },
      "contact": {
        "name": "Orla Brennan",
        "email": "orders@moonfield.example.com"
      }
    },
    "buyer": {
      "name": "Brambleside Café Ltd",
      "vat_id": "IE7654321WA",
      "electronic_address": {
        "id": "accounts@brambleside.example.com",
        "scheme": "EM"
      },
      "address": {
        "line1": "9 Merchant's Row",
        "line2": "2nd floor",
        "city": "Cork",
        "postcode": "T12 K3PD",
        "country": "IE"
      },
      "contact": {
        "name": "Niamh Kearney"
      }
    },
    "payment": {
      "means_code": "58",
      "remittance_information": "MF-2026-0917",
      "credit_transfers": [
        {
          "account_id": "IE00EXMP99021512345678",
          "account_name": "Moonfield Coffee Roasters Ltd",
          "bic": "EXMPIE2D"
        }
      ]
    },
    "lines": [
      {
        "quantity": "12",
        "unit": "H87",
        "net_amount": "268.80",
        "price": {
          "net": "22.40"
        },
        "tax": {
          "category": "Z",
          "rate": "0"
        },
        "item": {
          "name": "House espresso blend, 1 kg",
          "description": "Whole bean · Brazil and Colombia · roasted 12 Sept",
          "seller_id": "MF-ESP-1000"
        }
      },
      {
        "quantity": "4",
        "unit": "H87",
        "net_amount": "118.40",
        "price": {
          "net": "29.60"
        },
        "tax": {
          "category": "Z",
          "rate": "0"
        },
        "item": {
          "name": "Ethiopia Guji single origin, 1 kg",
          "description": "Whole bean · washed · light roast",
          "seller_id": "MF-ETH-1000"
        }
      },
      {
        "quantity": "3",
        "unit": "H87",
        "net_amount": "80.40",
        "price": {
          "net": "26.80"
        },
        "tax": {
          "category": "Z",
          "rate": "0"
        },
        "item": {
          "name": "Colombia decaf, 1 kg",
          "description": "Whole bean · sugarcane process",
          "seller_id": "MF-DEC-1000"
        }
      },
      {
        "quantity": "24",
        "unit": "H87",
        "net_amount": "166.80",
        "price": {
          "net": "6.95"
        },
        "tax": {
          "category": "Z",
          "rate": "0"
        },
        "item": {
          "name": "Guatemala retail bags, 250 g",
          "description": "Ground for filter · for resale",
          "seller_id": "MF-GUA-0250"
        }
      },
      {
        "quantity": "2",
        "unit": "H87",
        "net_amount": "76.00",
        "price": {
          "net": "38.00"
        },
        "tax": {
          "category": "S",
          "rate": "23"
        },
        "item": {
          "name": "Stoneware espresso cups, set of 6",
          "description": "80 ml · speckled oat glaze",
          "seller_id": "MF-CUP-0080"
        }
      },
      {
        "quantity": "2",
        "unit": "H87",
        "net_amount": "29.00",
        "price": {
          "net": "14.50"
        },
        "tax": {
          "category": "S",
          "rate": "23"
        },
        "item": {
          "name": "Grinder cleaning tablets",
          "description": "430 g tub",
          "seller_id": "MF-CLN-0430"
        }
      },
      {
        "quantity": "10",
        "unit": "H87",
        "net_amount": "45.00",
        "price": {
          "net": "4.50"
        },
        "tax": {
          "category": "S",
          "rate": "23"
        },
        "item": {
          "name": "Paper filters, size 02",
          "description": "Box of 100 · unbleached",
          "seller_id": "MF-FLT-0002"
        }
      }
    ]
  },
  "tagline": "Small-batch coffee, roasted in Galway",
  "bank_name": "Westerly Mutual Bank"
}

Source

The body markup with Jinja, the stylesheet placed in <head> and the header and footer settings.

<div class="letterhead">
  <div>
    <div class="brand">
      <img class="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAAwFBMVEX0sjQAAAB9HUTsqDX0sjT0sjSEJkP0sjT2szP8ti71szOSN0H0sjTShzisVz23ZTzFdzrclDecRED//wDimzb/rTOjTD//v0D/qgB/IET/zDOgSUC/cDueRj8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADvsp2VAAAAMHRSTlP+AP//zI7/ri4STf9v////////Af8P/wQD/w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GEE09oFzG5AQgjqq4SeQAxNAZmUQSwPYJOI7fGcBa341h/T8bwKYLAvv0zwCQvG02Gai3JASAzYZB5TMWLwDJsYy6+uMD2GBFYDwH4gsgqTalhXmVhAaQfGxIC9VHEh7AdpzA//UzASSvm1CC5pCsBeBcFa0eB6XmjYAJYO04YHk/BkByaGL1fhCA9eKA6/0wAOc4WKEyLCvIo2MAhEcAGj4OwBlBwEBQFeyxcQDCaYHSwIdGAgiDADp8NIAzAuGk2GjwA6MBiIoBMPQlAZxrIyPAQJmDxLOKAPgMBQPNi6XRQg8qBeBLDkBtQt5ouacUBPDlB4oJIVdGiz6iLIBvCI1nNJSN8ODDAPjODI1yolCqpgrzZIEAfE+mV6ZZColcNaY6BnyokAD+jYnKmKZRqizzLxp5XpZKNY0xlQ7/NCsA2Jb9APgB8D8H8A87qcQp3hcprQAAAABJRU5ErkJggg==" alt="{{ invoice.seller.trading_name }} logo">
      <div>
        <h1>{{ invoice.seller.trading_name }}</h1>
        <p class="tagline">{{ tagline }}</p>
      </div>
    </div>
    <p class="seller">{{ invoice.seller.address.line1 }}, {{ invoice.seller.address.city }} {{ invoice.seller.address.postcode }}</p>
    <p class="seller">VAT {{ invoice.seller.vat_id }} · {{ invoice.seller.contact.email }}</p>
  </div>
  <div class="doc-info">
    <p class="label">Invoice</p>
    <p class="doc-number">{{ invoice.number }}</p>
    <p class="issued">Issued {{ invoice.issue_date | format_date("long", "en-IE") }}</p>
    <p class="barcode">{{ invoice.number | barcode("code128", module_width=0.24, module_height=8, write_text=false, foreground="#4d0f2b", alt="Barcode " ~ invoice.number) }}</p>
  </div>
</div>

<div class="parties">
  <div>
    <h2 class="label">Bill to</h2>
    <p><strong>{{ invoice.buyer.name }}</strong></p>
    {% if invoice.buyer.contact.name %}<p>Attn. {{ invoice.buyer.contact.name }}</p>{% endif %}
    <p>{{ invoice.buyer.address.line1 }}</p>
    {% if invoice.buyer.address.line2 %}<p>{{ invoice.buyer.address.line2 }}</p>{% endif %}
    <p>{{ invoice.buyer.address.city }} {{ invoice.buyer.address.postcode }}</p>
    {% if invoice.buyer.vat_id %}<p class="muted">VAT {{ invoice.buyer.vat_id }}</p>{% endif %}
  </div>
  <div>
    <h2 class="label">Delivered to</h2>
    {% if invoice.delivery.address %}
    <div>
      <p><strong>{{ invoice.delivery.party_name }}</strong></p>
      <p>{{ invoice.delivery.address.line1 }}</p>
      <p>{{ invoice.delivery.address.city }} {{ invoice.delivery.address.postcode }}</p>
    </div>
    {% endif %}
  </div>
  <div>
    <h2 class="label">Order</h2>
    <table class="facts">
      <tbody>
        {% if invoice.order_reference %}<tr><th scope="row">Your order</th><td><strong>{{ invoice.order_reference }}</strong></td></tr>{% endif %}
        {% if invoice.delivery.date %}<tr><th scope="row">Delivered</th><td>{{ invoice.delivery.date | format_date("long", "en-IE") }}</td></tr>{% endif %}
        <tr><th scope="row">Due date</th><td><strong>{{ invoice.due_date | format_date("long", "en-IE") }}</strong></td></tr>
      </tbody>
    </table>
  </div>
</div>

<table class="items">
  <thead>
    <tr>
      <th class="sku" scope="col">SKU</th>
      <th scope="col">Product</th>
      <th class="qty" scope="col">Qty</th>
      <th class="price" scope="col">Unit price</th>
      <th class="vat" scope="col">VAT</th>
      <th class="amount" scope="col">Amount</th>
    </tr>
  </thead>
  <tbody>
    {% for line in invoice.lines %}
    <tr>
      <td class="sku">{{ line.item.seller_id }}</td>
      <td>
        <p class="item-name">{{ line.item.name }}</p>
        {% if line.item.description %}<p class="item-note">{{ line.item.description }}</p>{% endif %}
      </td>
      <td class="qty">{{ line.quantity | format_number("en-IE") }}</td>
      <td class="price">{{ line.price.net | format_currency(invoice.currency, "en-IE") }}</td>
      <td class="vat">{{ line.tax.rate | format_number("en-IE") }}%</td>
      <td class="amount">{{ render.invoice.lines[loop.index0].net_amount | format_currency(invoice.currency, "en-IE") }}</td>
    </tr>
    {% endfor %}
  </tbody>
</table>

<div class="summary">
  <div>
    <h2 class="label">Payment by bank transfer</h2>
    <table class="facts">
      <tbody>
        {% if bank_name %}<tr><th scope="row">Bank</th><td>{{ bank_name }}</td></tr>{% endif %}
        <tr><th scope="row">Account</th><td>{{ invoice.payment.credit_transfers[0].account_name }}</td></tr>
        <tr><th scope="row">IBAN</th><td><strong>{{ invoice.payment.credit_transfers[0].account_id }}</strong></td></tr>
        <tr><th scope="row">BIC</th><td>{{ invoice.payment.credit_transfers[0].bic }}</td></tr>
        <tr><th scope="row">Reference</th><td><strong>{{ invoice.payment.remittance_information }}</strong></td></tr>
      </tbody>
    </table>
    {% if invoice.payment_terms %}
    <div class="terms">
      <h2 class="label">Terms</h2>
      <p>{{ invoice.payment_terms }}</p>
    </div>
    {% endif %}
  </div>
  <div>
    <table class="totals">
      <tbody>
        <tr><th scope="row">Net total</th><td>{{ render.invoice.totals.line_total | format_currency(invoice.currency, "en-IE") }}</td></tr>
        {% for vat in render.invoice.vat_breakdown %}
        <tr><th scope="row">VAT {{ vat.rate | format_number("en-IE") }}% on {{ vat.basis | format_currency(invoice.currency, "en-IE") }}</th><td>{{ vat.tax | format_currency(invoice.currency, "en-IE") }}</td></tr>
        {% endfor %}
        <tr class="grand-total"><th scope="row">Total</th><td>{{ render.invoice.totals.grand_total | format_currency(invoice.currency, "en-IE") }}</td></tr>
      </tbody>
    </table>
    <div class="amount-due">
      <div>
        <p class="label">Amount due</p>
        <p class="due-date">by {{ invoice.due_date | format_date("long", "en-IE") }}</p>
      </div>
      <p class="amount-due-value">{{ render.invoice.totals.due_payable | format_currency(invoice.currency, "en-IE") }}</p>
    </div>
  </div>
</div>

<div class="confirmation">
  <div>
    <h2 class="label">Delivery confirmation</h2>
    <p>Goods received in good order. Please report damage or shortages within 48 hours of delivery.</p>
  </div>
  <div class="signatures">
    <p class="signature">Received by (name and signature)</p>
    <p class="signature date">Date</p>
  </div>
</div>

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": {
    "invoice": {
      "number": "MF-2026-0917",
      "issue_date": "2026-09-17",
      "due_date": "2026-10-01",
      "currency": "EUR",
      "order_reference": "BSC-PO-0482",
      "payment_terms": "14 days net. Goods remain our property until paid in full.",
      "delivery": {
        "date": "2026-09-16",
        "party_name": "Brambleside Café, Quay Street",
        "address": {
          "line1": "14 Coopers Quay",
          "city": "Cork",
          "postcode": "T12 R7XK",
          "country": "IE"
        }
      },
      "seller": {
        "name": "Moonfield Coffee Roasters Ltd",
        "trading_name": "Moonfield Coffee Roasters",
        "vat_id": "IE1234567FA",
        "electronic_address": {
          "id": "orders@moonfield.example.com",
          "scheme": "EM"
        },
        "address": {
          "line1": "Unit 5, Ardkeen Craft Yard",
          "city": "Galway",
          "postcode": "H91 X4F2",
          "country": "IE"
        },
        "contact": {
          "name": "Orla Brennan",
          "email": "orders@moonfield.example.com"
        }
      },
      "buyer": {
        "name": "Brambleside Café Ltd",
        "vat_id": "IE7654321WA",
        "electronic_address": {
          "id": "accounts@brambleside.example.com",
          "scheme": "EM"
        },
        "address": {
          "line1": "9 Merchant'\''s Row",
          "line2": "2nd floor",
          "city": "Cork",
          "postcode": "T12 K3PD",
          "country": "IE"
        },
        "contact": {
          "name": "Niamh Kearney"
        }
      },
      "payment": {
        "means_code": "58",
        "remittance_information": "MF-2026-0917",
        "credit_transfers": [
          {
            "account_id": "IE00EXMP99021512345678",
            "account_name": "Moonfield Coffee Roasters Ltd",
            "bic": "EXMPIE2D"
          }
        ]
      },
      "lines": [
        {
          "quantity": "12",
          "unit": "H87",
          "net_amount": "268.80",
          "price": {
            "net": "22.40"
          },
          "tax": {
            "category": "Z",
            "rate": "0"
          },
          "item": {
            "name": "House espresso blend, 1 kg",
            "description": "Whole bean · Brazil and Colombia · roasted 12 Sept",
            "seller_id": "MF-ESP-1000"
          }
        },
        {
          "quantity": "4",
          "unit": "H87",
          "net_amount": "118.40",
          "price": {
            "net": "29.60"
          },
          "tax": {
            "category": "Z",
            "rate": "0"
          },
          "item": {
            "name": "Ethiopia Guji single origin, 1 kg",
            "description": "Whole bean · washed · light roast",
            "seller_id": "MF-ETH-1000"
          }
        }
      ]
    },
    "tagline": "Small-batch coffee, roasted in Galway",
    "bank_name": "Westerly Mutual Bank"
  },
  "output": {
    "format": "pdf",
    "filename": "invoice-product-sales.pdf"
  }
}'