XRechnung guide

Creating, validating and sending an XRechnung

The XRechnung is the German standard for the e-invoice (E-Rechnung) and mandatory for invoices to public contracting authorities. Here you can read how an XRechnung is structured, what details it needs and how to create a valid XRechnung.

What is the XRechnung?

The XRechnung is the German specification (CIUS) of the European standard EN 16931 for electronic invoices. It is published by the Koordinierungsstelle für IT-Standards (KoSIT, Coordination Office for IT Standards) on behalf of the IT-Planungsrat (IT Planning Council). An XRechnung is a pure XML file: it contains all the invoice data in precisely defined fields, but no visual layout.

Technically, the XRechnung exists in two syntaxes: UBL (Universal Business Language) and UN/CEFACT CII (Cross Industry Invoice). Both are equivalent; the public sector’s invoice receipt platforms accept both.

What is the XRechnung needed for?

  • Invoices to the federal government: since 27 November 2020, suppliers to the federal administration have had to submit e-invoices, generally as an XRechnung via the federal government’s invoice receipt platforms.
  • Invoices to federal states and municipalities: many federal states have their own rules with comparable requirements.
  • Invoices to businesses: under the e-invoicing obligation (E-Rechnungspflicht), the XRechnung is also a permitted format in B2B transactions.

The Leitweg-ID

Public contracting authorities require a Leitweg-ID in the XRechnung. It identifies the body to which the invoice is going and is held in the ‘Käuferreferenz’ field (Buyer Reference, BT-10). You receive the Leitweg-ID from your contracting authority, usually with the contract or the purchase order. If it is missing, the invoice is generally rejected.

What details does an XRechnung need?

In addition to the usual invoice details under § 14 UStG, the XRechnung requires some additional fields. The following are often forgotten:

  • Buyer reference or Leitweg-ID (BT-10)
  • electronic address of seller and buyer, usually the email address (BT-34, BT-49)
  • Contact details of the seller: contact person, telephone, email
  • Payment details with IBAN for credit transfers
  • Unit codes for quantities and the VAT category for each line item

Validating an XRechnung: validation with the KoSIT validator

Whether an XRechnung is valid can be checked by machine. For this purpose KoSIT provides an official validator with the current validation rules. It checks the XML schema, the business rules of EN 16931 and the additional rules of the XRechnung. An invoice that shows errors here is often rejected by invoice receipt platforms – which is why the check belongs before every dispatch.

Reading and displaying an XRechnung

Because the XRechnung contains no visual layout, the recipient needs a program that displays the XML data in readable form. Good software displays the invoice in the familiar way, checks it and transfers the data into accounting.

Creating an XRechnung with e-rechnung pro

  • Outgoing invoices as XRechnung 3.0 in the UBL syntax, credit notes as a separate CreditNote document
  • Mandatory fields such as Leitweg-ID, contact details and payment details directly in the form
  • built-in check in accordance with EN 16931 and additionally, automatically, with the official KoSIT validator
  • Read in incoming invoices in XRechnung format, display them in readable form and approve them
  • additionally as a ZUGFeRD invoice (PDF/A-3, XRECHNUNG profile) for recipients who want a visual layout

The software runs online in the browser or locally on Windows.

XRechnung example to download

Our sample invoices show what an XRechnung looks like as XML: invoice, progress and final invoice, credit note and cancellation invoice – each file checked with the KoSIT validator, to download and verify.

Frequently asked questions

What is an XRechnung?

The XRechnung is the German standard for electronic invoices. It implements the European standard EN 16931 and consists of a pure XML file in the UBL or CII syntax.

Who has to issue an XRechnung?

Suppliers to federal public contracting authorities have had to submit e-invoices (E-Rechnungen) since November 2020, generally as an XRechnung. In B2B transactions the XRechnung is one of several formats permitted under the e-invoicing obligation.

What is the Leitweg-ID?

The Leitweg-ID assigns an invoice to the correct public body. In the XRechnung it is held in the buyer reference field (BT-10) and is communicated by the contracting authority.

How do I check whether my XRechnung is valid?

With the official KoSIT validator. It checks the schema, the business rules of EN 16931 and the XRechnung-specific rules. e-rechnung pro uses it to check every outgoing invoice automatically.

Can I open an XRechnung as a PDF?

An XRechnung is an XML file without a visual layout. Viewer software is needed to read it. e-rechnung pro displays incoming XRechnung invoices in readable form.

What is the difference between XRechnung and ZUGFeRD?

The XRechnung is a pure XML file. ZUGFeRD combines a readable PDF with embedded XML data. Both meet EN 16931; public contracting authorities mostly require the XRechnung.

Is every XRechnung checked automatically?

Yes. e-rechnung pro checks every XRechnung when it is created, using the built-in check and additionally, automatically, the official KoSIT validator. The result is shown on the invoice; an XRechnung that fails there is not sent.

Can I generate XRechnung invoices from the data in my own invoicing program?

Yes. You supply the invoice data as a CSV file. e-rechnung pro first checks it without creating anything and generates XRechnung invoices in a batch from the error-free invoices.

What do a credit note and a cancellation look like as an XRechnung?

Both are separate documents of document type 381 and state the number and date of the original invoice. Examples to download are available at e-rechnung-b2b.de/beispiele.

Create e-invoices (E-Rechnungen) yourself now

Try e-rechnung pro for 28 days with the full range of functions – online in your browser or locally on your computer.

Use online Download for Windows Watch training videos

Online €9.50 plus VAT per user per month · annual licence €98 plus VAT · Prices & licence