Invoir
  1. Home
  2. Guides
  3. XRechnung

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.

Versions

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:

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-15 Buyer 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-7 Seller contact
A seller contact group with a contact point, a telephone number and an email address.
BR-DE-1 Payment 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-9 Cities and post codes
Seller and buyer addresses need a city and a post code.
BR-DE-16 Seller 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

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

More guides