XRechnung: Germany's XML e-invoice, explained for developers
XRechnung is the German national standard for e-invoices: pure XML, no PDF, in either UBL or CII syntax. German public authorities require it, and it is one of the two usual formats for invoices between German businesses.
Updated 19 October 2026
What XRechnung is
XRechnung is a CIUS (Core Invoice Usage Specification) of the European standard EN 16931: it takes the European core invoice and tightens it with German business rules. It is maintained by KoSIT, the Koordinierungsstelle für IT-Standards, on behalf of the IT-Planungsrat, and published at xeinkauf.de.
- Two syntaxes: OASIS UBL 2.1 (Invoice or CreditNote) and UN/CEFACT CII. Both carry the same data and both are valid XRechnung.
- No visual part. An XRechnung is a single XML file. To read one, people use a viewer, for example the tax authority's e-invoice viewer on ELSTER.
- An identifier tells the receiver what it is. The specification identifier (BT-24) of version 3.0 is
urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0. The XRechnung extension, which allows a few extra fields, usesurn:cen.eu:en16931:2017#conformant#urn:xeinkauf.de:kosit:extension:xrechnung_3.0.
Versions
- XRechnung 3.0 came into force on 1 February 2024 and stays valid until at least 31 July 2027. The current patch release is 3.0.2.
- XRechnung 4.0 was published as a pre-version in September 2026; the final version is expected in spring 2027 (KoSIT).
Files should carry the 3.0 identifier. One that still says xrechnung_2.3 is not checked against the XRechnung 3.0 rules.
UBL or CII?
Both are equally valid. Pick by what else you produce:
- CII if you also produce ZUGFeRD or Factur-X: they use the same syntax, so one XML writer covers both, and a ZUGFeRD PDF with the XRECHNUNG profile is simply XRechnung CII inside a PDF.
- UBL if you also send through Peppol: Peppol BIS Billing 3.0 is UBL, so your mapping work carries over. Note that an XRechnung UBL file is not a Peppol BIS file; the identifiers and some rules differ.
The German rules (BR-DE)
On top of the EN 16931 rules, XRechnung adds its own. Most of them make optional EN 16931 fields mandatory. The ones that catch people most often:
BR-DE-15Buyer reference (BT-10) must be present- For public authorities this is the Leitweg-ID, the routing ID of the receiving office. Between businesses no Leitweg-ID is needed (BMF FAQ, question 6), but XRechnung still requires BT-10, so put the reference your customer gave you.
BR-DE-2,BR-DE-5,BR-DE-6,BR-DE-7Seller contact- A seller contact group with a contact point, a telephone number and an email address.
BR-DE-1Payment instructions (BG-16)- Every XRechnung states how to pay, typically a credit transfer with IBAN.
BR-DE-3,BR-DE-4,BR-DE-8,BR-DE-9Cities and post codes- Seller and buyer addresses need a city and a post code.
BR-DE-16Seller VAT ID or tax number- Required whenever a VAT category such as S (standard rate), Z, E or AE (reverse charge) is used.
More rules and fixes are on Validate an XRechnung.
When you need XRechnung
- German public sector (B2G): suppliers to federal authorities have had to invoice electronically since 27 November 2020 under the E-Rechnungsverordnung (ERechV); the states have their own rules. Public authorities give you a Leitweg-ID and tell you which portal or channel (including Peppol) to use.
- German businesses (B2B): XRechnung and ZUGFeRD (from 2.0.1, except MINIMUM and BASIC WL) both meet the legal requirements (BMF FAQ, question 7). See the German mandate for the dates.
Validating XRechnung
The reference is the open-source KoSIT validator with the official XRechnung configuration. It checks the XML schema, the EN 16931 rules and the BR-DE rules, and reports each finding with its rule ID. Invoir's validator runs exactly that, without rules of its own, and names the configuration version in every report.
XRechnung API
curl https://validate.invoir.dev/api/v1/validate \
-H "Authorization: Bearer inv_YOUR_KEY" \
-F [email protected]
The response lists every error with rule ID, message, XPath and line number (API docs). Use it in your test suite so no invoice that fails the official rules leaves your system. Generating XRechnung UBL and CII from JSON is in development.
Check a file in your browser, or over the API. The free validator runs the official rules (KoSIT, CEN and Peppol Schematron, Mustang, veraPDF) and lists every error with its rule ID. Nothing is stored. The same check is one HTTP call with a free API key: 25 documents a month, no credit card.
Sources
- KoSIT: XRechnung, versions and validity; validator configuration (rule texts).
- Bundesministerium der Finanzen: FAQ E-Rechnung, as of March 2026 (questions 4a, 6, 7, 12a).
- E-Rechnungsverordnung (ERechV).