XRechnung

XRechnung is the German government's mandatory electronic invoice standard for business-to-government (B2G) transactions, based on the European standard EN 16931. It is a pure XML format (UBL or CII syntax) with no visual layout, built for straight-through processing by public-sector accounts payable systems. Since November 2020, it has been required for invoicing most German federal, and increasingly state and municipal, public entities.

Key Takeaways

  • XRechnung is a pure XML invoice format based on EN 16931, required for invoicing German public-sector buyers.
  • Unlike ZUGFeRD, XRechnung has no human-readable PDF layout; it is designed purely for machine processing by government AP systems.
  • Every XRechnung invoice needs a Leitweg-ID, a routing code that identifies the exact public-sector recipient.
  • Since 1 January 2025, domestic German B2B businesses must be able to receive structured, EN 16931-compliant e-invoices, while the obligation to issue them phases in later by revenue threshold (2027 and 2028), widening the relevance of both XRechnung and ZUGFeRD.
  • Suppliers submit XRechnung invoices through approved government portals or the Peppol network, not as email attachments.

What Is XRechnung?

XRechnung is Germany's standard for electronic invoices to public-sector buyers, built on the European standard EN 16931. It is a pure XML format, available in UBL or CII syntax, that carries invoice data as structured fields rather than a printed layout. Public administration accounts payable systems read the XML directly, so there is no visual invoice to open and review; the data itself is the invoice.

The format was developed by KoSIT, the German coordination office for IT standards, and has been mandatory since November 2020 for invoicing most federal government entities. Several German states and municipalities have since adopted equivalent or stricter requirements under their own e-invoicing laws.

How XRechnung Works

Every XRechnung invoice follows a fixed data schema with mandatory and conditional fields: seller and buyer details, line items, tax breakdowns, payment terms, and bank details. One field is specific to this use case: the Leitweg-ID, a routing code that identifies the exact public-sector agency or cost center that should receive the invoice.

Suppliers do not email XRechnung invoices as attachments. They submit them through a designated receipt platform, such as the federal Zentrale Rechnungseingangsplattform (ZRE), a state-level equivalent, or the Peppol network, which validates the XML against the schema before accepting it. Invoices that fail validation are rejected back to the sender rather than queued for manual review.

XRechnung vs. ZUGFeRD: What Is the Difference?

This is the question most finance teams actually need answered. XRechnung and ZUGFeRD are both German implementations of EN 16931, but they solve different problems:

  • XRechnung is pure XML with no embedded visual layout. It is built for B2G invoicing and is the required format for German public-sector buyers.
  • ZUGFeRD is a hybrid format: a PDF/A-3 file with an EN 16931-compliant XML file embedded inside it. A person can open and read the PDF, while software extracts the XML for automated processing.
  • ZUGFeRD supports multiple profiles, from BASIC to EXTENDED, one of which mirrors the XRechnung data model closely enough to satisfy B2G requirements in some states while remaining usable for ordinary B2B invoicing.
  • In practice, use XRechnung when the buyer requires pure structured XML through a government portal. Use ZUGFeRD when a human-readable invoice alongside the machine-readable data is preferred, for example for B2B customers or public-sector buyers who accept the hybrid profile.

Why XRechnung Matters for AR and O2C Teams

If any part of your customer base is a German public-sector entity, XRechnung is not optional; it is the format your invoices must take to be legally accepted and paid. Getting the Leitweg-ID, tax codes, or reference numbers wrong at invoice creation causes rejections at the portal, which delays payment before the invoice ever reaches an approver, and directly extends DSO.

The upside of structured e-invoicing shows up downstream. Because XRechnung invoices carry clean, structured reference data, the payment information that comes back from public-sector buyers tends to be more complete than typical B2B remittance advice. That makes automated cash application more reliable for this segment of receivables, with fewer invoices landing in a suspense queue for manual matching.

Since 1 January 2025, every domestic German B2B business must be able to receive structured, EN 16931-compliant e-invoices, while the obligation to issue them phases in later by revenue threshold (2027 for larger companies, 2028 for the rest). That makes this more than a niche public-sector concern. Finance teams that already handle XRechnung and ZUGFeRD correctly on the B2G side have a head start on B2B compliance, and on the AR side they are also better positioned to reduce deductions and disputes tied to invoice data errors, and to keep dunning workflows accurate since invoice status data is unambiguous.

An AI-native AR platform like Transformance can generate compliant XRechnung output from existing invoice data, validate Leitweg-ID and reference fields before submission, and use the structured remittance data that public-sector buyers return to auto-match payments in Vero, reducing the manual work that format complexity would otherwise create.

Frequently Asked Questions

Is XRechnung the same as ZUGFeRD?

No. XRechnung is pure XML with no visual layout and is used exclusively for B2G invoicing in Germany, while ZUGFeRD is a hybrid PDF plus embedded XML format usable for both B2B and B2G.

Who has to use XRechnung?

Any supplier invoicing German federal public-sector entities, and increasingly state or municipal ones depending on local law, must submit invoices in XRechnung or another EN 16931-compliant structured format.

What is a Leitweg-ID?

It is a routing identifier included in an XRechnung invoice that tells the receiving portal exactly which public-sector agency or cost center should receive the invoice.

Can I still send a PDF invoice to German government agencies?

Generally no. For in-scope B2G transactions, a standard PDF is not accepted; invoices must be submitted as structured XRechnung XML through an approved channel.

Does XRechnung apply to B2B invoices too?

Not directly, but since 1 January 2025 every domestic German B2B business must be able to receive structured, EN 16931-compliant e-invoices; the obligation to issue them phases in later by revenue threshold (2027 for larger companies, 2028 for the rest). Many companies use ZUGFeRD or XRechnung-syntax XML to comply.

How do I submit an XRechnung invoice?

Typically through a government receipt platform such as the federal ZRE, a state-level portal, or the Peppol network, rather than by email.

Continue learning