What is XRechnung?
XRechnung is a purely XML-based data format for electronic invoices. It is published by KoSIT, the coordination office for IT standards, on behalf of the federal government and maintained on an ongoing basis. XRechnung meets the requirements of the European standard EN 16931 and has been the standard format for invoices to federal authorities since 27 November 2020 (ERechV); federal states and municipalities set their own rules.
Unlike ZUGFeRD, an XRechnung contains no PDF representation: the data exists only as structured XML. To make the invoice readable for people, the receiving system has to visualize it.
Who is required to use XRechnung?
- Suppliers to the public sector: at federal level XRechnung is the standard format, and other formats conforming to EN 16931 are permitted; federal states and municipalities govern receipt themselves. Invoices are transmitted via the federal invoice receipt platform (OZG-RE) or via the platforms of the individual states.
- B2B companies from 2025: XRechnung is one of the formats permitted under the e-invoicing mandate. It can also be used in purely commercial exchanges.
- Recipients of any invoice: since 1 January 2025 every domestic B2B company has to be able to receive XRechnung files.
How is an XRechnung structured?
An XRechnung consists of a single XML file with a clearly defined structure. The main components:
- Leitweg-ID: unique routing address of the public-sector recipient (mandatory field on invoices to authorities)
- Invoice header: invoice number, date, seller, buyer, VAT ID
- Invoice line items: quantity, unit price and tax rate per item
- Tax breakdown: net amount, tax amount, tax rate
- Payment terms: due date, early payment discount, bank details
Alongside the mandatory fields, the specification defines numerous optional fields. You can add them as long as they are defined in EN 16931.
XRechnung vs. ZUGFeRD: the difference in practice
Both formats meet EN 16931. The decisive difference:
- XRechnung: transmission via public-authority platforms or PEPPOL, with the recipient addressed by Leitweg-ID.
- ZUGFeRD: sent by e-mail as PDF/A-3, with no central platform required. Common in B2B because receiving systems without XML processing can simply open the PDF.
You will find a detailed format comparison on the ZUGFeRD page and in the EN 16931 entry.
Receiving and processing XRechnung with OXS.eco
OXS.eco processes XRechnung files with workflow support:
- Receipt via e-mail inbox, upload or SFTP
- Validation against the current XRechnung specification and EN 16931
- Structured data transfer into the approval workflow. No OCR, no manual data entry
- Archiving aligned with GoBD: the XML file in the original format as received
Before an implementation you can submit an XRechnung through Check an e-invoice free of charge. The feedback points out the typical errors.
Leitweg-ID: the address of the public authority
Invoices to German federal authorities need a Leitweg-ID. It is a mandatory detail there (Section 5 (1) of the E-Invoicing Ordinance, ERechV) and sits in the buyer reference field (BT-10) of the XRechnung. It is used to route the invoice to the right office.
Is XRechnung mandatory?
For invoices to German federal authorities, e-invoicing has been mandatory since 27 November 2020. XRechnung is the default standard there, other formats that comply with EN 16931 are permitted (Sections 3 (1) and 4 (1) ERechV). Direct awards of up to 1,000 euros are exempt (Section 3 (3) ERechV).
Between companies the law requires the e-invoice, not a particular format: what is required is a structured electronic format that complies with the European standard for electronic invoicing (Section 14 (1) of the German VAT Act). XRechnung is one of the formats that meets this, ZUGFeRD is another. When you have to issue e-invoices yourself is explained in the guide to the e-invoicing mandate.
Reading, checking and retaining an XRechnung
An XRechnung is pure XML and hard to read without tools. Whether a file is formally correct is shown by a technical check against EN 16931. With Check an e-invoice for free you can send in an XRechnung by e-mail; we name typical errors in the XML in our reply.
The invoice must be retained for eight years (Section 14b of the German VAT Act), as a rule in the format in which it was received. For an XRechnung that is the XML file itself, not just a printout.
Frequently asked questions about XRechnung
What is an XRechnung?
An XRechnung is an e-invoice as a pure XML file that complies with the European standard EN 16931. It contains the invoice data in structured form and no PDF.
Is XRechnung mandatory?
For invoices to German federal authorities, e-invoicing has been mandatory since 27 November 2020, and XRechnung is the default standard there. Between companies the law requires the e-invoice, not a particular format.
What is the Leitweg-ID?
The Leitweg-ID addresses the public authority that receives the invoice. For invoices to German federal authorities it is a mandatory detail and sits in the buyer reference field (BT-10).
How long does an XRechnung have to be retained?
Eight years (Section 14b of the German VAT Act), as a rule in the format received, which means as an XML file.
Can OXS.eco process XRechnung invoices?
Yes. OXS.eco accepts XRechnung invoices by e-mail, upload or SFTP, checks them technically against EN 16931 and passes the data into the approval process. Approval always comes from your team.
The e-invoicing mandate at a glance ZUGFeRD PEPPOL explained EN 16931 E-invoicing solution Glossary
Receiving XRechnung: clean and audit-ready
15-minute initial call: we go through your incoming e-invoices and discuss how OXS.eco receives and validates XRechnung files and hands them over to approval and archiving aligned with GoBD. The demo with sample data follows in a separate session.
