§ 14 UStG, XRechnung & ZUGFeRD in templates
The visible PDF layer and the structured e-invoicing data must line up. This page shows which fields your template must display and how to handle special cases like B2G, reverse charge or the German small-business rule.

Required fields per § 14 (4) UStG
These fields must be visible on every invoice above € 250. The validator checks them against the payload on the /generate call — a template must not omit them.
| Required field | Source in the template | Status |
|---|---|---|
| Full name & address of the supplier | {{seller.name}} / .street / .postalCode / .city | Required |
| Full name & address of the recipient | {{buyer.name}} / .street / … | Required |
| VAT ID or tax number of the supplier | {{seller.vatId}} or {{seller.taxId}} | Required (one of the two) |
| Issue date | {{issueDate}} | Required |
| Sequential, unique invoice number | {{invoiceNumber}} | Required |
| Quantity and type of goods / services delivered | {{items}} → description, quantity, unit | Required |
| Time of delivery / service | {{deliveryDate}} or note on issue month | Required |
| Consideration, split by tax rate | {{taxSummary}} → netAmount per taxRate | Required |
| Applicable tax rate or note on exemption | {{taxSummary}} → taxRate / taxCategoryCode | Required |
| Statutory notes (e.g. reverse charge, small business) | {{notes}} as free-text field | if applicable |
B2G: Leitweg-ID & buyer reference
Invoices to public-sector buyers need a Leitweg-ID. It lives in the payload under countrySpecific.leitwegId (DE-specific), the buyer reference (BT-10) under countrySpecific.buyerReference. EN 16931 requires at least one of the two. The whole countrySpecific object also needs the required discriminator countryCode: "DE". The B2G block renders via condition only when the Leitweg-ID is set — the same template stays usable for both B2B and B2G.
1{2 "type": "keyvalue",3 "condition": "{{countrySpecific.leitwegId}}",4 "data": {5 "layout": "horizontal",6 "labelWidth": 120,7 "labelBold": true,8 "items": [9 { "label": "Leitweg-ID", "value": "{{countrySpecific.leitwegId}}" },10 { "label": "Buyer reference", "value": "{{countrySpecific.buyerReference}}", "optionalMode": "anyEmpty" }11 ]12 }13}Reverse charge (§ 13b UStG)
Reverse charge isn't signalled by its own boolean — it's driven by the EN-16931 code at line-item and summary level: items[].taxCategoryCode = "AE" and derived taxSummary[].taxCategoryCode. The statutory note text is passed via the free-text field notes.
1// Reverse charge is not signalled by a dedicated flag but via2// items[].taxCategoryCode = "AE" and, derived from it,3// taxSummary[].taxCategoryCode = "AE".4// The statutory note is rendered when notes is populated:5{6 "type": "text",7 "condition": "{{notes}}",8 "data": {9 "content": "{{notes}}",10 "italics": true,11 "fontSize": 9,12 "margin": [0, 8, 0, 0]13 }14}15 16// summary block with dynamic rows per tax category:17{18 "type": "summary",19 "data": {20 "dynamicRows": {21 "dataSource": "{{taxSummary}}",22 "valueField": "taxAmount",23 "valueFormat": "currency",24 "labelTemplate": "VAT {{taxRate}}% ({{taxCategoryCode}})"25 }26 }27}Small business (§ 19 UStG)
For DE invoices there's the boolean flag countrySpecific.isKleinunternehmer. When it's true, the statutory note is rendered automatically via condition.
1{2 "type": "text",3 "condition": "{{countrySpecific.isKleinunternehmer}}",4 "data": {5 "content": "Pursuant to § 19 UStG, no VAT is charged (German small-business rule).",6 "italics": true,7 "fontSize": 9,8 "margin": [0, 12, 0, 0]9 }10}Template layer vs. structured formats
The BlockTemplate only controls the visual representation. The structured data (XRechnung XML, ZUGFeRD, Peppol, Factur-X) is produced from the invoice payload and — for hybrid formats — embedded into the PDF/A-3 automatically.
| Format | What else is needed | Role of the template |
|---|---|---|
| XRechnung (UBL 2.1 / CII) | Leitweg-ID (B2G), BT codes per EN 16931, UNECE units | Structured XML — PDF optional, purely visual |
| ZUGFeRD 2.x | EN-16931 profile, hybrid mode (PDF/A-3 + embedded XML) | The BlockTemplate is the visible layer; XML is embedded automatically on /generate |
| Peppol (BIS Billing 3.0) | EndpointID (0088, 9930 etc.), PartyIdentification | Delivered via the Peppol network; the template produces the visual document |
| Factur-X (FR) | FR-specific profiles (BASIC / EN 16931 / EXTENDED) | Like ZUGFeRD — PDF/A-3 with embedded XML |
Archiving note
E-invoices are subject to a 10-year retention obligation in Germany (§ 147 AO). The rendered PDF and the structured XML should be archived together in an audit-compliant way — the Archive API handles that automatically.