
210 × 297 mm
Invoices
E-Rechnung (ZUGFeRD / XRechnung)
A German A4 invoice rendered straight from the EN 16931 invoice model, so the same data produces the visible invoice and the embedded Factur-X / ZUGFeRD or XRechnung XML (output.einvoice.invoice_path = "invoice"). It prints the engine's computed amounts, lists VAT per rate, the Leitweg-ID and the bank details.
Opens Dynamic Document API with this template preloaded in a free workspace.
Generating this from your own data? See the Invoice PDF API.
Template language features
- Loops
- Conditionals
- Macros
- Filters
- Currency formatting
- Date formatting
- Grouping
- Repeating table headers
- Header & footer
- Page numbers
Filters such as format_currency and qrcode are described in the template language reference.
Variables
Derived from the sample data: 1 top-level field, 64 paths in total. Send the same shape as data.
| Path | Type | Example |
|---|---|---|
| invoice | object | |
| invoice.number | string | "XR-2026-0007" |
| invoice.issue_date | date | "2026-09-23" |
| invoice.due_date | date | "2026-10-23" |
| invoice.currency | string | "EUR" |
| invoice.buyer_reference | string | "04011000-12345-34" |
| invoice.payment_terms | string | "Zahlbar innerhalb von 30 Tagen ohne Abzug." |
| invoice.invoice_period | object | |
| invoice.invoice_period.start | date | "2026-09-01" |
| invoice.invoice_period.end | date | "2026-09-30" |
| invoice.delivery | object | |
| invoice.delivery.date | date | "2026-09-30" |
| invoice.seller | object | |
| invoice.seller.name | string | "Größenwahn GmbH" |
| invoice.seller.vat_id | string | "DE123456789" |
| invoice.seller.tax_number | string | "30/123/45678" |
| invoice.seller.legal_registration | object | |
| invoice.seller.legal_registration.id | string | "HRB 12345" |
| invoice.seller.electronic_address | object | |
| invoice.seller.electronic_address.id | string | "rechnung@groessenwahn.example" |
| invoice.seller.electronic_address.scheme | string | "EM" |
| invoice.seller.address | object | |
| invoice.seller.address.line1 | string | "Beispielstraße 1" |
| invoice.seller.address.city | string | "Berlin" |
| invoice.seller.address.postcode | string | "10115" |
| invoice.seller.address.country | string | "DE" |
| invoice.seller.contact | object | |
| invoice.seller.contact.name | string | "Erika Muster" |
| invoice.seller.contact.phone | string | "+49 30 1234567" |
| invoice.seller.contact.email | string | "erika.muster@groessenwahn.example" |
| invoice.buyer | object | |
| invoice.buyer.name | string | "Bundesamt für Beispiele" |
| invoice.buyer.electronic_address | object | |
| invoice.buyer.electronic_address.id | string | "04011000-12345-34" |
| invoice.buyer.electronic_address.scheme | string | "0204" |
| invoice.buyer.address | object | |
| invoice.buyer.address.line1 | string | "Amtsweg 2" |
| invoice.buyer.address.city | string | "Bonn" |
| invoice.buyer.address.postcode | string | "53113" |
| invoice.buyer.address.country | string | "DE" |
| invoice.payment | object | |
| invoice.payment.means_code | string | "58" |
| invoice.payment.remittance_information | string | "XR-2026-0007" |
| invoice.payment.credit_transfers | array<object> · 1 | |
| invoice.payment.credit_transfers[].account_id | string | "DE02120300000000202051" |
| invoice.payment.credit_transfers[].account_name | string | "Größenwahn GmbH" |
| invoice.lines | array<object> · 2 | |
| invoice.lines[].quantity | string | "8" |
| invoice.lines[].unit | string | "HUR" |
| invoice.lines[].price | object | |
| invoice.lines[].price.net | string | "95.00" |
| invoice.lines[].tax | object | |
| invoice.lines[].tax.category | string | "S" |
| invoice.lines[].tax.rate | string | "19" |
| invoice.lines[].item | object | |
| invoice.lines[].item.name | string | "Softwarewartung" |
| invoice.lines[].item.description | string | "Wartung Fachverfahren, September 2026" |
| invoice.lines[].allowances? | array<object> · 1 | |
| invoice.lines[].allowances[].amount | string | "25.00" |
| invoice.lines[].allowances[].reason | string | "Rabatt" |
| invoice.notes | array<object> · 1 | |
| invoice.notes[].text | string | "Leistungen gemäß Rahmenvertrag RV-2025-17." |
| invoice.notes[].subject_code | string | "AAI" |
| invoice.contract_reference | string | "RV-2025-17" |
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": "XR-2026-0007",
"issue_date": "2026-09-23",
"due_date": "2026-10-23",
"currency": "EUR",
"buyer_reference": "04011000-12345-34",
"payment_terms": "Zahlbar innerhalb von 30 Tagen ohne Abzug.",
"invoice_period": {
"start": "2026-09-01",
"end": "2026-09-30"
},
"delivery": {
"date": "2026-09-30"
},
"seller": {
"name": "Größenwahn GmbH",
"vat_id": "DE123456789",
"tax_number": "30/123/45678",
"legal_registration": {
"id": "HRB 12345"
},
"electronic_address": {
"id": "rechnung@groessenwahn.example",
"scheme": "EM"
},
"address": {
"line1": "Beispielstraße 1",
"city": "Berlin",
"postcode": "10115",
"country": "DE"
},
"contact": {
"name": "Erika Muster",
"phone": "+49 30 1234567",
"email": "erika.muster@groessenwahn.example"
}
},
"buyer": {
"name": "Bundesamt für Beispiele",
"electronic_address": {
"id": "04011000-12345-34",
"scheme": "0204"
},
"address": {
"line1": "Amtsweg 2",
"city": "Bonn",
"postcode": "53113",
"country": "DE"
}
},
"payment": {
"means_code": "58",
"remittance_information": "XR-2026-0007",
"credit_transfers": [
{
"account_id": "DE02120300000000202051",
"account_name": "Größenwahn GmbH"
}
]
},
"lines": [
{
"quantity": "8",
"unit": "HUR",
"price": {
"net": "95.00"
},
"tax": {
"category": "S",
"rate": "19"
},
"item": {
"name": "Softwarewartung",
"description": "Wartung Fachverfahren, September 2026"
}
},
{
"quantity": "1",
"unit": "C62",
"price": {
"net": "250.00"
},
"tax": {
"category": "S",
"rate": "19"
},
"item": {
"name": "Lizenz Modul Statistik"
},
"allowances": [
{
"amount": "25.00",
"reason": "Rabatt"
}
]
}
],
"notes": [
{
"text": "Leistungen gemäß Rahmenvertrag RV-2025-17.",
"subject_code": "AAI"
}
],
"contract_reference": "RV-2025-17"
}
},
"output": {
"format": "pdf",
"filename": "invoice-e-rechnung.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": {
"invoice": {
"number": "XR-2026-0007",
"issue_date": "2026-09-23",
"due_date": "2026-10-23",
"currency": "EUR",
"buyer_reference": "04011000-12345-34",
"payment_terms": "Zahlbar innerhalb von 30 Tagen ohne Abzug.",
"invoice_period": {
"start": "2026-09-01",
"end": "2026-09-30"
},
"delivery": {
"date": "2026-09-30"
},
"seller": {
"name": "Größenwahn GmbH",
"vat_id": "DE123456789",
"tax_number": "30/123/45678",
"legal_registration": {
"id": "HRB 12345"
},
"electronic_address": {
"id": "rechnung@groessenwahn.example",
"scheme": "EM"
},
"address": {
"line1": "Beispielstraße 1",
"city": "Berlin",
"postcode": "10115",
"country": "DE"
},
"contact": {
"name": "Erika Muster",
"phone": "+49 30 1234567",
"email": "erika.muster@groessenwahn.example"
}
},
"buyer": {
"name": "Bundesamt für Beispiele",
"electronic_address": {
"id": "04011000-12345-34",
"scheme": "0204"
},
"address": {
"line1": "Amtsweg 2",
"city": "Bonn",
"postcode": "53113",
"country": "DE"
}
},
"payment": {
"means_code": "58",
"remittance_information": "XR-2026-0007",
"credit_transfers": [
{
"account_id": "DE02120300000000202051",
"account_name": "Größenwahn GmbH"
}
]
},
"lines": [
{
"quantity": "8",
"unit": "HUR",
"price": {
"net": "95.00"
},
"tax": {
"category": "S",
"rate": "19"
},
"item": {
"name": "Softwarewartung",
"description": "Wartung Fachverfahren, September 2026"
}
},
{
"quantity": "1",
"unit": "C62",
"price": {
"net": "250.00"
},
"tax": {
"category": "S",
"rate": "19"
},
"item": {
"name": "Lizenz Modul Statistik"
},
"allowances": [
{
"amount": "25.00",
"reason": "Rabatt"
}
]
}
],
"notes": [
{
"text": "Leistungen gemäß Rahmenvertrag RV-2025-17.",
"subject_code": "AAI"
}
],
"contract_reference": "RV-2025-17"
}
},
"output": {
"format": "pdf",
"filename": "invoice-e-rechnung.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": {
"invoice": {
"number": "XR-2026-0007",
"issue_date": "2026-09-23",
"due_date": "2026-10-23",
"currency": "EUR",
"buyer_reference": "04011000-12345-34",
"payment_terms": "Zahlbar innerhalb von 30 Tagen ohne Abzug.",
"invoice_period": {
"start": "2026-09-01",
"end": "2026-09-30",
},
"delivery": {
"date": "2026-09-30",
},
"seller": {
"name": "Größenwahn GmbH",
"vat_id": "DE123456789",
"tax_number": "30/123/45678",
"legal_registration": {
"id": "HRB 12345",
},
"electronic_address": {
"id": "rechnung@groessenwahn.example",
"scheme": "EM",
},
"address": {
"line1": "Beispielstraße 1",
"city": "Berlin",
"postcode": "10115",
"country": "DE",
},
"contact": {
"name": "Erika Muster",
"phone": "+49 30 1234567",
"email": "erika.muster@groessenwahn.example",
},
},
"buyer": {
"name": "Bundesamt für Beispiele",
"electronic_address": {
"id": "04011000-12345-34",
"scheme": "0204",
},
"address": {
"line1": "Amtsweg 2",
"city": "Bonn",
"postcode": "53113",
"country": "DE",
},
},
"payment": {
"means_code": "58",
"remittance_information": "XR-2026-0007",
"credit_transfers": [
{
"account_id": "DE02120300000000202051",
"account_name": "Größenwahn GmbH",
},
],
},
"lines": [
{
"quantity": "8",
"unit": "HUR",
"price": {
"net": "95.00",
},
"tax": {
"category": "S",
"rate": "19",
},
"item": {
"name": "Softwarewartung",
"description": "Wartung Fachverfahren, September 2026",
},
},
{
"quantity": "1",
"unit": "C62",
"price": {
"net": "250.00",
},
"tax": {
"category": "S",
"rate": "19",
},
"item": {
"name": "Lizenz Modul Statistik",
},
"allowances": [
{
"amount": "25.00",
"reason": "Rabatt",
},
],
},
],
"notes": [
{
"text": "Leistungen gemäß Rahmenvertrag RV-2025-17.",
"subject_code": "AAI",
},
],
"contract_reference": "RV-2025-17",
},
},
"output": {
"format": "pdf",
"filename": "invoice-e-rechnung.pdf",
},
},
timeout=90,
)
response.raise_for_status()
print(response.json())More invoices templates

Bold brand invoice
A4A confident, colourful A4 invoice for studios and product companies: a brand-coloured hero with the amount due, brand colours you set from data, itemised EN 16931 lines, VAT, a pay-by-link QR code and the same data embedded as ZUGFeRD / Factur-X EN 16931 XML.

EU reverse-charge invoice
A4An A4 invoice for cross-border B2B services within the EU, rendered from the EN 16931 invoice model: both VAT IDs, the date of supply, VAT category AE (reverse charge) with its exemption reason and notice, the total in words, bank transfer details and the same data embedded as ZUGFeRD / Factur-X EN 16931 XML.

Freelancer invoice
A4A friendly A4 invoice for freelancers, easy to edit visually: a wordmark heading, bill-to and project details, service lines, VAT totals, bank details with a pay-by-link QR code, a personal thank-you note and page numbers. Embeds ZUGFeRD / Factur-X EN 16931 XML.