Skip to main content
Complyance is Officially Listed as a UAE Approved Accredited Service Provider
XRechnung: The Complete Guide 2026

XRechnung: The Complete Guide 2026

Swathy
Published on Jul 23, 2026
XRechnung: The Complete Guide 2026

Selling to the German public sector? Then you need to know XRechnung, Germany's mandatory e-invoicing standard for government suppliers.

But XRechnung is no longer just a B2G story. With Germany's 2025 to 2028 B2B e-invoicing rollout, every company doing business in Germany needs to understand this standard.

This guide covers everything: what XRechnung is, how it works technically, how to create and validate one, and exactly who needs to comply and when.

Key Takeaways:
1. XRechnung is Germany's national e-invoicing standard, built on the European norm EN 16931.
2. It has been mandatory for B2G invoicing (invoices to federal government) since November 27, 2020.
3. XRechnung uses pure XML (UBL 2.1 or UN/CEFACT CII) with no PDF component.
4. Every XRechnung must include a valid Leitweg-ID to route the invoice to the correct public authority.
5. The official KoSIT Validator checks your invoice against schema rules, business rules, and code lists.
6. Starting in 2025 to 2028, XRechnung is becoming relevant for B2B transactions as well.

What Is XRechnung?

XRechnung ("X-Invoice") is Germany's national standard for electronic invoicing. It was developed on behalf of the IT Planning Council (IT-Planungsrat) and is maintained by the Coordination Office for IT Standards (KoSIT).

At its core, an XRechnung is a structured XML file designed for automated, machine-to-machine processing. Unlike a PDF invoice, it contains zero visual formatting — it is purely data.

Legal basis:

XRechnung implements EU Directive 2014/55/EU, which requires all EU member states to accept electronic invoices in public procurement. The technical foundation is the European standard EN 16931.

Germany transposed this into national law through the E-Invoicing Act (E-Rechnungsgesetz, ERechG) of April 4, 2017, and the accompanying E-Invoicing Ordinance (ERechV).

Important distinction: XRechnung is not a standalone standard. It is a CIUS (Core Invoice Usage Specification), a national refinement of EN 16931.

XRechnung vs. E-Rechnung: Clarifying the Relationship

FeatureE-Rechnung (umbrella term)XRechnung
DefinitionAny electronic invoice per EN 16931Germany's specific national standard
StandardBased on EN 16931A CIUS of EN 16931
FormatsZUGFeRD, XRechnung, Factur-X, Peppol BIS, etc.UBL 2.1 or UN/CEFACT CII only
ScopeNational and internationalPrimarily Germany (B2G mandatory)
Visual componentSometimes (e.g., ZUGFeRD has PDF)None — pure XML

In short: Every XRechnung is an e-invoice. But not every e-invoice is an XRechnung.

History and Versions

VersionReleasedKey Changes
XRechnung 1.0June 2017Initial release; basic EN 16931 implementation
XRechnung 1.2December 2018Added national business rules (BR-DE rules)
XRechnung 2.0June 2020Switched to UBL 2.1 as primary syntax
XRechnung 2.1 to 2.32021 to 2023Incremental improvements
XRechnung 3.0February 2024Major overhaul; new business rules
XRechnung 3.0.2January 2025Bug fixes, updated code lists
Watch out: Public authorities can and do reject invoices using outdated versions. As of April 2026, XRechnung 3.0.2 is the binding version for federal invoicing.

Technical Structure of XRechnung

XRechnung supports two syntaxes defined by EN 16931:

  1. UBL 2.1 (Universal Business Language) — the preferred syntax
  2. UN/CEFACT CII (Cross-Industry Invoice) — also permitted

Mandatory Fields (Key BT Numbers)

BT NumberNameDescription
BT-1Invoice numberUnique identifier for the invoice
BT-2Invoice issue dateDate the invoice was issued
BT-3Invoice type codeCode per UNTDID 1001 (e.g., 380)
BT-5Invoice currency codeISO 4217 (e.g., EUR)
BT-10Buyer reference (Leitweg-ID)Mandatory routing ID
BT-24Specification identifierIdentifies the CIUS used
BT-27Seller nameLegal name of the invoice issuer
BT-30Seller tax identifierVAT ID or tax number
BT-44Buyer nameLegal name of the invoice recipient
BT-109Invoice total net amountSum of all line net amounts
BT-112Amount due for paymentTotal amount including VAT

Sample XML (UBL 2.1, simplified)

XML
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
         xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
         xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">

  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
  <cbc:ID>INV-2026-00042</cbc:ID>
  <cbc:IssueDate>2026-04-15</cbc:IssueDate>
  <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
  <cbc:BuyerReference>04011000-12345-67</cbc:BuyerReference>

  <cac:AccountingSupplierParty>
    <cac:Party>
      <cac:PartyName>
        <cbc:Name>Muster GmbH</cbc:Name>
      </cac:PartyName>
      <cac:PostalAddress>
        <cbc:StreetName>Musterstrasse 1</cbc:StreetName>
        <cbc:CityName>Berlin</cbc:CityName>
        <cbc:PostalZone>10115</cbc:PostalZone>
        <cac:Country>
          <cbc:IdentificationCode>DE</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyTaxScheme>
        <cbc:CompanyID>DE123456789</cbc:CompanyID>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:PartyTaxScheme>
    </cac:Party>
  </cac:AccountingSupplierParty>
</Invoice>

Who Must Use XRechnung?

B2G: Mandatory Since November 2020

Since November 27, 2020, all suppliers to the German federal government must submit invoices in XRechnung format.

LevelMandatory SinceNotes
Federal (Bund)Nov 27, 2020Mandatory for federal suppliers under ERechV
States (Laender)2020 to 2024 (varies)State-specific laws
Municipalities2024 to 2025 (varies)Implementation differs by state

B2B: Growing Importance from 2025

Germany's Growth Opportunities Act introduced mandatory e-invoicing for B2B:

  • From January 1, 2025: All businesses must be able to receive e-invoices
  • From January 1, 2027: Businesses with prior-year revenue > EUR 800,000 must send e-invoices
  • From January 1, 2028: Mandatory sending for all businesses

How to Create an XRechnung: 3 Methods

Method 1: Manual XML Creation

Best for: Developers, one-off testing

Pros: No tools required, deep understanding

Cons: Extremely time-consuming, high error rate, does not scale

Method 2: Accounting Software with XRechnung Export

Best for: SMEs with regular invoicing volume

DATEV, Lexware, sevDesk, or Complyance include built-in XRechnung generation.

Pros: User-friendly, built-in validation, automatic updates

Cons: License fees, vendor dependency

Method 3: API Integration

Best for: Large enterprises with high invoice volumes

A REST API lets you generate and transmit XRechnung files automatically from your ERP system.

Pros: Full automation, high scalability, seamless ERP integration

Cons: Upfront development costs, requires technical expertise

Leitweg-ID Explained

The Leitweg-ID is a unique routing identifier that points to a specific public authority. It goes in the BT-10 (Buyer Reference) field and is mandatory for all B2G XRechnung invoices.

Structure

JAVASCRIPT
[Coarse routing]-[Fine routing]-[Check digit]

Example: 04011000-12345-67

Critical: The Leitweg-ID is provided to you by the public buyer — you cannot generate it yourself. If missing or incorrect, your invoice will be automatically rejected.

Validating XRechnung with KoSIT

Before submitting an XRechnung, always validate it. KoSIT provides the official KoSIT Validator.

What Does the Validator Check?

  1. Schema validation: Does the XML conform to UBL 2.1 or CII?
  2. Schematron rules: Are the EN 16931 core rules and national XRechnung rules (BR-DE) satisfied?
  3. Code list validation: Are all codes valid?

How to Validate

Online: Use the official validator at https://erechnungsvalidator.service.bund.de/

Locally:

BASH
java -jar validationtool-1.5.0-standalone.jar -s scenarios.xml -o results/ invoice.xml

Via API: Integrate validation directly into your invoicing pipeline.

XRechnung vs. ZUGFeRD Comparison

FeatureXRechnungZUGFeRD 2.x
FormatPure XML (UBL 2.1 / CII)PDF/A-3 with embedded XML
ReadabilityMachine onlyMachine + human
EN 16931 compliantYesYes (from profile EN 16931)
Accepted for B2GYes (mandatory federal standard)Yes, from "XRechnung" profile
Suited for B2BYesYes
Visual invoiceNoYes

When to Choose XRechnung

  • You invoice federal government agencies or state authorities
  • Your buyer processes invoices purely through automated systems
  • You use Peppol as your transmission channel

When ZUGFeRD Makes More Sense

  • Your buyer needs a visual invoice (human-readable PDF)
  • You primarily invoice B2B to mid-market companies
  • Your buyers cannot yet process raw XML files

Transmission Channels

1. Peppol Network

The Pan-European Public Procurement OnLine (Peppol) network is the preferred transmission channel:

  • Standardized delivery via certified Access Points
  • Automatic routing to the correct recipient
  • Delivery confirmation
  • Internationally recognized across the EU

2. Central Invoice Submission Platforms

  • Zentrale Rechnungseingangsplattform (ZRE) for direct federal authorities
  • OZG-konforme Rechnungseingangsplattform (OZG-RE) for indirect federal administration
  • Many federal states run their own portals

3. Email

At state and municipal level, XRechnung files can be sent as email attachments. However, this channel offers no delivery confirmation.

Recommendation: For federal authorities, use Peppol or the ZRE/OZG-RE platforms.

Common Mistakes: Do's and Don'ts

Do's

  • Always validate with the KoSIT Validator before sending.
  • Get the Leitweg-ID right — copy exactly as provided.
  • Use the current version (as of April 2026: XRechnung 3.0.2).
  • Set the CustomizationID correctly.
  • Include your VAT ID (BT-31 is mandatory).
  • Test before going live.

Don'ts

  • Don't send a PDF instead of XML.
  • Don't use an outdated version.
  • Don't skip mandatory fields.
  • Don't invent codes.
  • Don't make up a Leitweg-ID.
  • Don't guess the transmission channel.

Next Steps

XRechnung is the foundation of digital invoicing in Germany. Whether you are invoicing the public sector today or preparing for the B2B mandate, acting now saves time and compliance headaches.

Your action plan:

  1. Check whether your current software supports XRechnung 3.0.2
  2. Obtain the Leitweg-ID from your public sector buyers
  3. Create a test invoice and validate it with the KoSIT Validator
  4. Set up the correct transmission channel (Peppol or government portal)
  5. Train your team and automate the process
Share

Frequently Asked Questions

XRechnung is a structured XML file that contains all invoice data in a machine-readable format. It is created according to the XRechnung standard, validated against official rules, and transmitted electronically (via Peppol, a government portal, or email).

For invoices to the German federal government, XRechnung has been mandatory since November 27, 2020. In B2B, all businesses have been required to receive e-invoices since January 1, 2025. Sending: 2027 (revenue > EUR 800,000) and 2028 (all businesses).

"E-invoice" is the umbrella term. XRechnung is one specific format — Germany's national standard. Other e-invoice formats include ZUGFeRD, Factur-X, and Peppol BIS Billing.

Every supplier invoicing the German federal government has been required to use XRechnung since November 2020.

Not exactly. ZUGFeRD in the "XRechnung" profile is compliant with the XRechnung standard. However, ZUGFeRD in other profiles is not XRechnung-compliant.

The standard itself is free. Costs come from software or service providers: cloud solutions start at around EUR 10 per month.

The Leitweg-ID is a unique routing identifier for the public buyer, provided by them. Without a valid Leitweg-ID, your XRechnung will be rejected.

Yes. Use the official KoSIT Validator online or download it as a Java application.

About the Author

Swathy

Swathy

Content Marketer

I’m a Content Marketer at Complyance, focused on e-invoicing. Over the years, I’ve created a wide range of content, including blog posts, whitepapers, and product guides, which have supported Complyance’s growth across markets such as the UAE and EU regions. My goal is to deliver content that is comprehensive, clear, accurate, and easy to understand, no matter how complex the topic.

Related Posts

Complyance Logo

One API for Global E-invoicing