XRechnung: structure, version 3.0 and Leitweg-ID

XRechnung is the German standard for e-invoices: a plain XML file under EN 16931 in UBL or CII syntax. Invoices to federal authorities generally follow it and carry a Leitweg-ID.

Last updated

Publisher KoSIT (Coordination Office for IT Standards)
Valid version XRechnung 3.0, currently 3.0.2; in force since Feb 1, 2024, at least until Jul 31, 2027
Next version XRechnung 4.0, preview since September 2026, final version expected in spring 2027
Invoices to the federal government generally in XRechnung format (§ 4 ERechV)
Leitweg-ID mandatory in invoices to the federal government (§ 5 ERechV)

Structure

An XRechnung is an XML file without a PDF, so you need a viewer to read it. It follows the EN 16931 data model and uses one of the two syntaxes, UBL or CII (UBL vs CII).

Technically, XRechnung is a specialization of EN 16931 (CIUS). It narrows the standard and adds its own rules. You can recognize it by the specification identifier (BT-24): urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0.

Valid XRechnung files in UBL and CII to download are listed under e-invoice examples.

The German rules (BR-DE)

Rules with the prefix BR-DE are added to the EN 16931 rules. Most of them make fields mandatory that the standard leaves optional. Four examples:

Rule What it requires Severity
BR-DE-1 payment instructions (BG-16) error
BR-DE-2 seller contact (BG-6) error
BR-DE-15 buyer reference (BT-10) error
BR-DE-21 the XRechnung 3.0 identifier (BT-24) warning

An invoice with a message of severity error fails the check.

Invoices to public authorities and the Leitweg-ID

Since Nov 27, 2020, invoices to federal authorities must be electronic (BMF, question 4a). The E-Rechnungsverordnung (ERechV) generally requires XRechnung for them, except for direct orders up to €1,000 (§ 3 ERechV). The federal states and municipalities have their own rules.

The Leitweg-ID routes the invoice to a specific authority and sits in the buyer reference (BT-10). It has 5 to 46 characters in three parts, separated by hyphens (KoSIT format specification 2.0.2):

Part Content
Coarse address 2 to 12 digits, mandatory
Fine address up to 30 letters or digits, optional
Check digits 2 digits, mandatory

Between businesses, no Leitweg-ID is needed. For VAT purposes, a placeholder in BT-10 is enough there, according to the BMF (question 6). If the structure or the check digits of a Leitweg-ID are wrong, invowerk shows a hint (IW-LEITWEG).

You can check a Leitweg-ID on the Leitweg-ID page, which also shows its structure and an example.

Versions

XRechnung 3.0 has been in force since Feb 1, 2024; the current edition is 3.0.2. There was no normative release in summer 2026, so 3.0 remains valid until at least Jul 31, 2027. The preview of XRechnung 4.0 was published in September 2026.

Besides the specification, KoSIT publishes validation rules that can change under the same version. The rule set invowerk applies is listed on the test bench.

Check an XRechnung

At invowerk, an XRechnung is checked by the KoSIT validator, the validation program of the Coordination Office for IT Standards (KoSIT). For each message, invowerk links an explanation with the cause and the fix.

Check an XRechnung for free