Skip to main content

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.

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:
DateObligation
1 January 2025All businesses in Germany must be able to receive EN 16931 e-invoices
1 January 2027Businesses with annual turnover > €800,000 must issue structured e-invoices
1 January 2028All 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:

SyntaxFile extensionNotes
XRechnung-CII.xmlUN/CEFACT Cross Industry Invoice.
XRechnung-UBL.xmlOASIS 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 center
  • 90 — check digits computed with modulo 97-10 (ISO/IEC 7064)
Leitweg-ID validation

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​

  1. Open the client record in Clients.
  2. Enable B2G Client (Public Administration).
  3. Enter the code in the Leitweg-ID (Germany) field.
  4. 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:

  1. Create and issue the invoice as usual.
  2. From the invoice actions, choose Export e-invoice.
  3. In the export dialog, choose XRechnung CII (B2G) or XRechnung UBL.
  4. Download the .xml file.

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:

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:

  1. Via PEPPOL: authorities connected to the PEPPOL network receive the invoice directly through their PEPPOL ID (0088:... or 0204:... based on the Leitweg-ID).
  2. Web upload or XML submission: upload the .xml file 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:

  1. In the invoice export dialog, select Factur-X EN16931.
  2. 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). Category AE (reverse charge, Steuerschuldnerschaft des Leistungsempfängers) is not assigned automatically: check with your tax advisor which category applies to each transaction.

Official references​