Dokmatiq DOKMATIQ

ZUGFeRD

A German-French hybrid e-invoice format: a PDF/A-3 document with an embedded machine-readable CII XML file.

Also known as: ZUGFeRD 2.3, Factur-X, hybrid invoice

Short definition

ZUGFeRD (Zentraler User Guide des Forums elektronische Rechnung Deutschland) is a hybrid invoice format. A ZUGFeRD invoice is a PDF/A-3 file with an embedded XML attachment — humans and machines read the same document.

The XML is based on the UN/CEFACT Cross Industry Invoice (CII) standard. The French equivalent Factur-X is technically identical to ZUGFeRD 2.x.

Profiles

ZUGFeRD defines five conformance levels, from purely visual PDF to fully structured B2B invoice:

ProfileStructureTypical use
MINIMUMmaster data onlyaccounting headers
BASIC WLno line itemstax/total amounts
BASICincl. line itemssmall invoices
EN 16931 / COMFORTEU-norm compliantstandard B2B
EXTENDEDindustry extensionscomplex invoices
XRECHNUNGGerman CIUSB2G in Germany

Since ZUGFeRD 2.1 the XRECHNUNG profile is part of the specification — a ZUGFeRD invoice can simultaneously be a valid XRechnung.

Versions at a glance

  • ZUGFeRD 1.0 (2014) — deprecated, older CII version
  • ZUGFeRD 2.0 / 2.1 (2019/2020) — EN 16931 compliant, compatible with Factur-X 1.0
  • ZUGFeRD 2.2 / 2.3 (2022/2024) — current versions, extended profiles

For the German e-invoicing mandate from 2025 onward, at minimum ZUGFeRD 2.x in profile EN 16931 or XRECHNUNG is relevant.

Creating ZUGFeRD with the Dokmatiq API

A ZUGFeRD PDF is produced in two steps: send invoice data to the e-invoicing API, receive a PDF/A-3 with an embedded CII XML.

curl -X POST https://api.dokmatiq.com/v1/einvoice/zugferd \
  -H "Authorization: Bearer $DOKMATIQ_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profile": "EN16931",
    "invoice": {
      "id": "2026-0042",
      "issueDate": "2026-04-17",
      "seller": { "name": "Example GmbH", "vatId": "DE123456789" },
      "buyer": { "name": "Customer AG", "vatId": "DE987654321" },
      "lines": [{ "description": "Consulting", "quantity": 8, "unitPrice": 120.0 }]
    }
  }'

The response is an application/pdf with a properly embedded factur-x.xml (or zugferd-invoice.xml on 1.x).

ZUGFeRD vs. XRechnung

  • ZUGFeRD is hybrid (PDF + XML); XRechnung is XML-only
  • ZUGFeRD is more flexible for B2B; XRechnung is mandatory for B2G in Germany
  • A ZUGFeRD invoice in the XRECHNUNG profile satisfies both worlds

Common pitfalls

  1. PDF/A-3 is required — a plain PDF with an XML attachment is not a valid ZUGFeRD invoice
  2. The embedded XML must carry the correct file name (factur-x.xml from 2.1 onward)
  3. The XML must validate against the official Schematron — wrong codes, missing tax details or incorrect BT fields will be rejected by the recipient

Ready to use it via API?

Get started for free. No credit card. 100 documents per month included.