Since 1 January 2025, every business in Germany has to be able to receive e-invoices. From 1 January 2027, the first ones also have to send them, and from 2028 everyone does. If you build or maintain an invoicing feature, the question no longer comes only from accounting but from the product side: which format do we actually send?
A disclosure up front, because it's relevant: I work on Dynamic Document API, which among other things generates ZUGFeRD, Factur-X and XRechnung invoices. This article is still meant as a decision guide; the deadlines and formats below come from the official sources (the German Federal Ministry of Finance, FeRD, FNFE-MPE and the EU).
What an e-invoice is – and what it isn't
An e-invoice is the invoice as machine-readable XML following the European standard EN 16931. The format is structured so that software can process the invoice without asking questions: line items, tax rates, amounts, all as fields.
That leads to the most common misconception: a PDF without XML is not an e-invoice, however good it looks. And a PDF with attached XML only counts if the PDF is properly built as PDF/A-3 (more on that below). "E-invoice" is a legal term, not a design choice – and the difference between "we email PDFs" and "we meet the requirement" is exactly that XML file.
Three names, two forms
ZUGFeRD is a hybrid: a PDF/A-3 with the XML embedded as an attachment. People read the PDF, software reads the XML. The big practical advantage: nobody has to do without the invoice just because their system can't read structured data yet.
Factur-X is technically identical to ZUGFeRD 2.x – the same data container, the same PDF structure, just the French name. If you can do ZUGFeRD, you can do Factur-X. The versions are published together (currently ZUGFeRD 2.5.x / Factur-X 1.09.x).
XRechnung is the opposite: pure XML, no PDF. It is the German profile of EN 16931 with its own business rules (the BR-DE-* rules), and the reason German public authorities have been receiving structured invoices at all since 2020.
In the right profiles, all three are EN 16931 compliant. The difference isn't data quality, but who sits at the other end.
Which recipient needs what
| Recipient | Format | Note |
|---|---|---|
| Public sector in Germany | XRechnung | The default, usually with a Leitweg-ID (the buyer's routing ID). Federal rules also allow other formats that meet EN 16931, such as ZUGFeRD in the XRECHNUNG profile; the federal states have their own rules. When in doubt, check the tender documents. |
| Businesses in Germany | either | ZUGFeRD if someone at the customer still reads the PDF; XRechnung if their system only wants data. When in doubt, ask the customer – that's allowed and saves weeks. |
| France | Factur-X | One of the accepted formats. Invoices are exchanged through certified platforms ("plateformes agréées"), not by email. |
| Cross-border B2B within the EU | EN 16931 | Mandatory from 1 July 2030 under the EU's ViDA rules. |
The practical consequence: there is no single "right" format, only one format per recipient. If you hard-code one into your data model, you're building yourself a migration.
The deadlines
Germany:
- 1 January 2025 – receiving is mandatory for all businesses. An email inbox is enough for that, by the way.
- 2025 to 2026 – transition period: everyone may still send paper or PDF invoices (PDF only with the recipient's consent). Businesses with up to €800,000 in prior-year revenue may continue to do so in 2027.
- 1 January 2027 – sending becomes mandatory for businesses with more than €800,000 in prior-year revenue.
- 1 January 2028 – sending becomes mandatory for everyone who invoices other businesses in Germany.
France:
- 1 September 2026 – receiving is mandatory for all businesses; large and mid-sized businesses must also start sending.
- 1 September 2027 – small and micro businesses follow for sending.
So if you're building an invoicing feature today, you have a year or two, depending on your customers – but not five.
Five pitfalls that cost a lot of time
1. MINIMUM and BASIC WL are not e-invoices. Both profiles carry only totals, no line items. The German Federal Ministry of Finance explicitly accepts ZUGFeRD from version 2.0.1 except these two profiles. If you send them, you don't meet the requirement – even if the file says "ZUGFeRD". For B2B, BASIC, EN 16931 (formerly COMFORT) or EXTENDED are the safe choices.
2. A PDF with attached XML is not a hybrid. PDF/A-3 requires, among other things, an output intent with an ICC profile, XMP metadata and a correctly declared relationship for the embedded file (AFRelationship). Bolting the XML on afterwards shows up in validation.
3. In hybrid invoices, the XML counts, not the PDF. Since 2025, the structured part is authoritative. If the PDF differs, the XML wins – a good reason to generate both parts from the same data source instead of maintaining them in parallel.
4. XRechnung has its own rules. The BR-DE-* rules require things nobody misses in B2B: a seller phone number (BR-DE-6), and for public-sector buyers the Leitweg-ID as the buyer reference. If it's missing, the invoice is invalid – not "almost valid".
5. Validate, don't hope. For the XML, the KoSIT validator is the reference; for the PDF/A-3, veraPDF. Both are free and fit into a CI pipeline. An invoice that fails at the customer costs more than any test run.
And the structural trap: if you maintain a separate invoice variant per customer, you'll eventually have five versions of the truth. Better to keep one data model and generate the right output format from it.
How to generate it
There are three realistic routes, and all of them are legitimate:
Open source. For Java, Mustang is the usual choice: it writes the CII XML, builds the PDF/A-3 and embeds the file. For Python there's factur-x, for .NET ZUGFeRD-csharp. The effort lies less in the XML than in the details – PDF/A conformance, profile rules, a correct tax breakdown.
Commercial libraries (iText, PDFlib and others) solve the PDF/A-3 problem cleanly, but cost licence fees and often still need your own work on the data model.
An API. If the invoice comes from a web app anyway, the format part is rarely what you want to build yourself. With Dynamic Document API, you send the invoice data as JSON and get back a ZUGFeRD/Factur-X PDF, validated with KoSIT and veraPDF along the way. Roughly like this:
{
"input": { "type": "template", "template_id": "tpl_…" },
"data": { "invoice": { "number": "NW-2026-0042", "seller": { … }, "lines": [ … ] } },
"output": {
"format": "pdf",
"einvoice": { "profile": "EN16931", "invoice_path": "invoice" }
}
}
Same data object, a different profile value: EN16931 gives you a ZUGFeRD/Factur-X invoice, XRECHNUNG a PDF that carries an XRechnung. For portals that only accept plain XML, a separate endpoint returns the same invoice as a standalone XRechnung file. The step-by-step tutorial with cURL, Node.js and Python is here: ZUGFeRD, Factur-X and XRechnung invoices with an API.
Conclusion
For German public authorities: XRechnung. For German businesses: ZUGFeRD if people at the customer still read along, otherwise XRechnung – and when in doubt, ask. For France: Factur-X through a certified platform.
Technically, the decision is smaller than it looks: all three formats carry the same EN 16931 data. The real work is modelling that data once, completely and correctly – the rest is an output parameter.
I originally wrote this article in German; the English version was translated with AI assistance.
Top comments (0)