Skip to content
Preview of the E-Rechnung (ZUGFeRD / XRechnung) template

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.

PDFA4 portraitLocale de-DEHTML + JinjaHeader & footer

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.

PathTypeExample
invoiceobject
invoice.numberstring"XR-2026-0007"
invoice.issue_datedate"2026-09-23"
invoice.due_datedate"2026-10-23"
invoice.currencystring"EUR"
invoice.buyer_referencestring"04011000-12345-34"
invoice.payment_termsstring"Zahlbar innerhalb von 30 Tagen ohne Abzug."
invoice.invoice_periodobject
invoice.invoice_period.startdate"2026-09-01"
invoice.invoice_period.enddate"2026-09-30"
invoice.deliveryobject
invoice.delivery.datedate"2026-09-30"
invoice.sellerobject
invoice.seller.namestring"Größenwahn GmbH"
invoice.seller.vat_idstring"DE123456789"
invoice.seller.tax_numberstring"30/123/45678"
invoice.seller.legal_registrationobject
invoice.seller.legal_registration.idstring"HRB 12345"
invoice.seller.electronic_addressobject
invoice.seller.electronic_address.idstring"rechnung@groessenwahn.example"
invoice.seller.electronic_address.schemestring"EM"
invoice.seller.addressobject
invoice.seller.address.line1string"Beispielstraße 1"
invoice.seller.address.citystring"Berlin"
invoice.seller.address.postcodestring"10115"
invoice.seller.address.countrystring"DE"
invoice.seller.contactobject
invoice.seller.contact.namestring"Erika Muster"
invoice.seller.contact.phonestring"+49 30 1234567"
invoice.seller.contact.emailstring"erika.muster@groessenwahn.example"
invoice.buyerobject
invoice.buyer.namestring"Bundesamt für Beispiele"
invoice.buyer.electronic_addressobject
invoice.buyer.electronic_address.idstring"04011000-12345-34"
invoice.buyer.electronic_address.schemestring"0204"
invoice.buyer.addressobject
invoice.buyer.address.line1string"Amtsweg 2"
invoice.buyer.address.citystring"Bonn"
invoice.buyer.address.postcodestring"53113"
invoice.buyer.address.countrystring"DE"
invoice.paymentobject
invoice.payment.means_codestring"58"
invoice.payment.remittance_informationstring"XR-2026-0007"
invoice.payment.credit_transfersarray<object> · 1
invoice.payment.credit_transfers[].account_idstring"DE02120300000000202051"
invoice.payment.credit_transfers[].account_namestring"Größenwahn GmbH"
invoice.linesarray<object> · 2
invoice.lines[].quantitystring"8"
invoice.lines[].unitstring"HUR"
invoice.lines[].priceobject
invoice.lines[].price.netstring"95.00"
invoice.lines[].taxobject
invoice.lines[].tax.categorystring"S"
invoice.lines[].tax.ratestring"19"
invoice.lines[].itemobject
invoice.lines[].item.namestring"Softwarewartung"
invoice.lines[].item.descriptionstring"Wartung Fachverfahren, September 2026"
invoice.lines[].allowances?array<object> · 1
invoice.lines[].allowances[].amountstring"25.00"
invoice.lines[].allowances[].reasonstring"Rabatt"
invoice.notesarray<object> · 1
invoice.notes[].textstring"Leistungen gemäß Rahmenvertrag RV-2025-17."
invoice.notes[].subject_codestring"AAI"
invoice.contract_referencestring"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"
  }
}'