XRechnung e-Invoicing Format? How to Create, Examples, Specifications

Updated on: Mar 24th, 2026

|

16 min read

Switch Language

social iconssocial iconssocial iconssocial icons

XRechnung is the legally mandated XML-based e-invoicing format for public contracting authorities in Germany. It is based on EN 16931, contains structured mandatory information, and is machine-validated and processed automatically.

Key takeaways

  • XRechnung has been mandatory in the B2G sector (invoices to public bodies) since November 2020.
  • From 2025, the B2B e-invoicing obligation in Germany begins, with transitional periods through 2028.
  • XRechnung contains only structured data (no PDF) and is automatically validated.
  • Its technical basis is a CIUS (Core Invoice Usage Specification) of EN 16931, with additional mandatory fields such as the Leitweg-ID.

What is an XRechnung?

XRechnung is the legal and technical standard for sending invoices as structured XML data instead of unstructured documents according to the official e-invoicing guidelines published by the German Federal Tax Authority (Bundeszentralamt für Steuern). It is a machine-readable XML invoice designed so accounting and public procurement systems can automatically read, validate, route, and process invoice data.

XRechnung was introduced as Germany’s implementation of the European e-invoicing standard EN 16931 and became the core format for invoicing the public sector (B2G). That means if a supplier invoices many German authorities, the invoice usually has to be sent in this structured format rather than as a normal PDF.

A simple way to understand it:

  • Purpose: standardize invoice data so systems can exchange it automatically
  • Format: XML, usually using UBL 2.1 or UN/CEFACT CII syntax
  • Use case: especially mandatory for public authorities, and increasingly relevant for B2B e-invoicing in Germany
  • Key requirement: it includes strict mandatory fields such as invoice details, tax data, and often the Leitweg-ID for public-sector routing

How does XRechnung work?

XRechnung works by turning invoice details into a structured XML file that systems can read, validate, send, and process automatically. It uses machine-readable data so invoices can move directly from the seller’s system into the buyer’s ERP or accounts payable workflow. This reduces manual entry, speeds approvals, and lowers rejection risk.

  • Data capture: The seller enters all required invoice details, including legal and tax information. For public-sector invoices, the Leitweg-ID is crucial because it helps route the invoice correctly.
  • XML creation: The billing system generates an XRechnung XML file in a compliant syntax such as UBL or CII.
  • Validation: The file is checked against official XRechnung rules. Missing fields or format errors can cause rejection.
  • Transmission: The XML is sent through approved channels such as portals, email, Peppol, or EDI-related workflows.
  • Receipt and processing: The buyer’s system receives the XML, validates it again if needed, and imports it for approval and payment.
  • Archiving: Both seller and buyer must store the invoice electronically for record-keeping.

XRechnung Format: Technical Specification 

XRechnung is based on the EN 16931 standard and is a German CIUS (Core Invoice Usage Specification).

Feature

Description

File format

XML

Syntax

UBL 2.1

Standard

EN 16931

Extension

German CIUS (XRechnung)

Version

currently 3.x

Mandatory information in the XRechnung format

XRechnung contains all mandatory information pursuant to Section 14 of the German VAT Act (UStG), as well as additional routing data.

Essential mandatory fields: 

  • Invoice number
  • Invoice date
  • Delivery date
  • Name and address of supplier and recipient of the service
  • VAT ID or tax number
  • Description of services/goods
  • Net, tax, and gross amounts
  • Tax rate
  • Payment terms
  • Leitweg-ID (mandatory in B2G)

If one of these fields is missing, the XRechnung is rejected by the system.

XRechnung Format Example (XML)

An XRechnung consists of structured XML tags. Below is a simplified XRechnung XML example:

<Invoice>

  <cbc:ID>INV-2025-001</cbc:ID>

  <cbc:IssueDate>2025-01-15</cbc:IssueDate>

  <cac:AccountingSupplierParty>

    <cac:Party>

      <cbc:Name>Mustermann GmbH</cbc:Name>

      <cbc:CompanyID>DE123456789</cbc:CompanyID>

    </cac:Party>

  </cac:AccountingSupplierParty>

  <cac:AccountingCustomerParty>

    <cac:Party>

      <cbc:EndpointID>Leitweg-ID-12345</cbc:EndpointID>

    </cac:Party>

  </cac:AccountingCustomerParty>

</Invoice>

Important: An XRechnung does not contain a PDF component (difference from ZUGFeRD).

Creating and sending XRechnungen

To create and transmit an XRechnung, companies need suitable software solutions and a validated transmission channel.

1. Create an XRechnung using software

Companies need:

  • ERP system with XRechnung module
  • E-invoicing tool with XML generator
  • PEPPOL access point (optional)

2. Transmission channels

Possible transmission channels are:

  • ZRE portal
  • OZG-RE
  • PEPPOL (see project file)

3. Validation before transmission

Before submission, every XRechnung should be checked for:

  • Schema conformity (EN 16931)
  • Completeness of mandatory information
  • Correct Leitweg-ID

e-Invoicing and XRechnung obligation in Germany

In the B2G sector, XRechnung has been mandatory since November 2020. It applies to all suppliers issuing invoices to federal authorities.

In the B2B sector, mandatory implementation begins gradually from 2025. Initially, there is an obligation to receive invoices; from 2027, an obligation to issue invoices applies for companies with annual turnover above €800,000; and from 2028, for all companies:

B2G (Business-to-Government)

  • Mandatory since November 2020
  • Applies to invoices sent to federal authorities
  • Affects all suppliers to public contracting authorities

B2B (Business-to-Business)

From 2025, the e-invoicing obligation in B2B begins:

  • 2025: obligation to receive
  • 2027: obligation for companies with turnover > €800,000
  • 2028: obligation for all companies

XRechnung vs ZUGFeRD: Key Differences and Best Use Cases

XRechnung and ZUGFeRD are both based on EN 16931, but they are designed for different practical needs. XRechnung is a pure XML invoice format built for strict machine processing and is the mandatory standard for many B2G invoices in Germany. ZUGFeRD, by contrast, is a hybrid format that combines a human-readable PDF with embedded XML, making it especially useful in B2B scenarios where both people and systems need to read the invoice. 

Conclusion

The introduction of XRechnung changes not only the invoice format, but the entire invoice processing workflow. Companies must ensure that their systems can correctly generate, validate, and archive structured XML data. Incorrect invoices are automatically rejected, which delays payment processes. A technically clean implementation reduces rejection rates, accelerates cash flow, and minimizes tax risks within the framework of increasing digital oversight.

Frequently Asked Questions

What is XRechnung standard?

The XRechnung standard is an EN 16931-compliant XML invoice without a PDF component that contains all mandatory fields, including the Leitweg-ID.

How do I create an XRechnung?

With an ERP system or e-invoicing tool that generates XML in UBL format and validates it against EN 16931.

Is an XRechnung an e-invoice?

Yes. XRechnung is a legally recognized structured e-invoicing format.

What requirements apply to an XRechnung?

An XRechnung must be a structured XML invoice compliant with EN 16931, contain all mandatory invoice and tax details, include the Leitweg-ID for public-sector invoices, pass validation checks, be sent electronically through an accepted channel, and be archived in a compliant, unchanged format.

Index