Germany XRechnung B2G & B2B e-invoicing with Frihet
Germany requires structured e-invoices for all public sector transactions (B2G) and is rolling out mandatory B2B e-invoicing under the Wachstumschancengesetz (Growth Opportunities Act). Frihet generates XRechnung-CII, XRechnung-UBL and Factur-X EN 16931 (XML) invoices, checks the mandatory EN 16931 fields before download, and gives you the XML ready to submit to German public bodies and businesses.
Legal framework
German e-invoicing rules stem from two legislative sources:
- EU Directive 2014/55/EU: required national, regional and local public authorities in the Member States to accept structured e-invoices compliant with EN 16931.
- Wachstumschancengesetz (Growth Opportunities Act): enacted in March 2024, extends the obligation to B2B transactions with the following timeline:
| Date | Obligation |
|---|---|
| 1 January 2025 | All businesses in Germany must be able to receive EN 16931 e-invoices |
| 1 January 2027 | Businesses with annual turnover > €800,000 must issue structured e-invoices |
| 1 January 2028 | All remaining businesses must issue structured e-invoices |
The B2B receive obligation has applied since 1 January 2025 to businesses established in Germany (registered office, place of management, or a permanent establishment involved in the transaction).
XRechnung — the mandatory national standard
XRechnung is the German national profile of the European standard EN 16931 (Core Invoice Usage Specification — CIUS). It supports two equivalent technical syntaxes:
| Syntax | File extension | Notes |
|---|---|---|
| XRechnung-CII | .xml | UN/CEFACT Cross Industry Invoice. |
| XRechnung-UBL | .xml | OASIS UBL 2.1. |
Both syntaxes (CII and UBL) are valid for XRechnung. They express the same semantic data model (XRechnung 3.0.2), governed by KoSIT (Koordinierungsstelle für IT-Standards).
Factur-X / ZUGFeRD 2.3 is also EN 16931 compliant and fully accepted in B2B transactions. It embeds an EN16931-CII XML file inside a PDF/A-3 document, combining human readability and automated processing.
Leitweg-ID — mandatory routing identifier for B2G
Every XRechnung invoice sent to a German public authority must include a Leitweg-ID in the BuyerReference field (BT-10). This code routes the invoice to the exact administrative unit within the receiving authority.
The Leitweg-ID follows the format {section}-{subsection}-{check}, for example:
04011000-1234-90
Where:
04011000— administrative unit code (Behördenkennzahl)1234— sub-unit or cost center90— check digits computed with modulo 97-10 (ISO/IEC 7064)
A missing Leitweg-ID or one with invalid check digits causes automatic rejection at the receiving authority's OZG-RE or ZRE portal. Always ask the contracting authority for the exact Leitweg-ID before issuing the invoice.
Setting the Leitweg-ID in Frihet
- Open the client record in Clients.
- Enable B2G Client (Public Administration).
- Enter the code in the Leitweg-ID (Germany) field.
- Save the client.
Frihet fills BT-10 automatically in every XRechnung generated for that client.
Generating XRechnung invoices in Frihet
Once the client is configured:
- Create and issue the invoice as usual.
- From the invoice actions, choose Export e-invoice.
- In the export dialog, choose XRechnung CII (B2G) or XRechnung UBL.
- Download the
.xmlfile.
Frihet checks mandatory EN 16931 fields (Leitweg-ID, USt-IdNr., currency…) before download. This check does not replace the official KoSIT validator: validate the exported XML with it before submitting to the portal.
You can also export the XML with the einvoice_export tool of @frihet/mcp-server.
KoSIT validator — pre-submission check
Validate every exported XML before you send it:
- Official KoSIT validator (command line): https://github.com/itplr-kosit/validator
- Third-party online validator (ecosio; not a KoSIT tool): https://ecosio.com/en/peppol-and-xml-document-validator/
Submitting to OZG-RE and ZRE (federal and regional authorities)
OZG-RE (Onlinezugangsgesetz-Rechnungseingangsplattform) and ZRE (Zentrale Rechnungseingangsplattform) are the central e-invoice receiving portals of the German public sector:
- Via PEPPOL: authorities connected to the PEPPOL network receive the invoice directly through their PEPPOL ID (
0088:...or0204:...based on the Leitweg-ID). - Web upload or XML submission: upload the
.xmlfile exported from Frihet directly to the OZG-RE/ZRE portal, or send it to the electronic mailbox named in the procurement documents.
Frihet has no PEPPOL transport of its own today: download the XML and submit it on the portal or through a PEPPOL Access Point provider.
Factur-X / ZUGFeRD for B2B
For German B2B customers who work with Factur-X / ZUGFeRD:
- In the invoice export dialog, select Factur-X EN16931.
- Frihet downloads the EN 16931 XML (CII), which is valid on its own.
Frihet does not generate the hybrid PDF/A-3.
German VAT handling (Umsatzsteuer)
German e-invoices must include:
- Supplier and buyer VAT identification numbers (
BT-31,BT-48, e.g.DE123456789). - VAT breakdown per rate (
BG-23). - German rates: 19% (standard) and 7% (reduced).
- On 0% invoices to customers in another EU Member State, Frihet assigns EN 16931 category
K(UNCL5305: exempt as an intra-community supply of goods and services in the EEA). CategoryAE(reverse charge, Steuerschuldnerschaft des Leistungsempfängers) is not assigned automatically: check with your tax advisor which category applies to each transaction.
Official references
- XRechnung specification (KoSIT): https://xeinkauf.de/xrechnung/
- KoSIT validator: https://www.kosit.org
- OZG-RE federal portal: https://www.e-rechnung-bund.de
- EN 16931 standard: https://www.en16931.eu
- Federal Ministry of Finance FAQ on the E-Rechnung: https://www.bundesfinanzministerium.de/Content/DE/FAQ/e-rechnung.html