Back to Blog
E-Invoicing 7 min readPublished April 15, 2025· Updated April 23, 2025

What Is a Leitweg-ID? The Essential Guide to German B2G Invoicing

The Leitweg-ID is a mandatory routing identifier for all XRechnung invoices sent to German government authorities. Learn what it is, its format, and how to get one.

If you invoice any German government authority, you have likely encountered KOSIT validation error BR-DE-2: "The Buyer reference must be present." The cause is almost always a missing or incorrect Leitweg-ID. This article explains exactly what the Leitweg-ID is, why it exists, how to read its format, and how to obtain the correct value for your invoicing recipient.

What Is the Leitweg-ID?

The Leitweg-ID (routing identifier, literally 'routing path ID') is a unique numerical identifier assigned to each German government entity or department that receives electronic invoices. It serves as a routing address within the German government's invoice processing infrastructure, ensuring that your XRechnung reaches exactly the right accounting department rather than being lost in a central mailbox.

In XRechnung, the Leitweg-ID is placed in business term BT-10 (Käuferreferenz / Buyer Reference). This field is mandatory under German XRechnung rules — an invoice without a Leitweg-ID will fail KOSIT validation with a Critical error (BR-DE-2).

The Structure of a Leitweg-ID

A Leitweg-ID consists of three segments separated by hyphens:

  • Segment 1 (Area Code / Bereichscode): A numerical code identifying the federal state or area. For example, 04 represents Hamburg, 09 represents Bavaria, and 11 represents Berlin. The code 0 represents federal (Bundesbehörden) entities.
  • Segment 2 (Institution Code / Einrichtungscode): A longer numerical code identifying the specific institution or department within the area.
  • Segment 3 (Check Digit / Prüfziffer): A two-digit check digit calculated from the preceding segments to verify the Leitweg-ID's integrity.

Example: 04011000-1234512345-06 — This identifies a specific entity in Hamburg (04), with institution code 011000123451234, and check digit 06.

How to Get the Correct Leitweg-ID

The Leitweg-ID is assigned by the receiving government authority — you cannot generate it yourself. Here is how to obtain it:

  1. Check your contract or purchase order: Government authorities typically include the Leitweg-ID in procurement documents, framework agreements, and purchase orders.
  2. Check the contracting authority's website: Many federal and state agencies publish their Leitweg-IDs on their official websites under sections like 'Rechnungseingang' or 'E-Rechnung'.
  3. Search the Leitweg-ID registry: A central registry is available at leitweg-id.de, where you can search by agency name.
  4. Contact the authority directly: If you cannot find the Leitweg-ID, contact the authority's invoicing or finance department (Rechnungswesen / Buchhaltung).
  5. Ask your project manager: For existing government contracts, the project manager or contract administrator at the authority will know the correct Leitweg-ID.

Leitweg-ID for Federal vs. State Authorities

Federal authorities (Bundesbehörden) use the ZRE (Zentrale Rechnungseingangsplattform) at xrechnung.bund.de. All federal Leitweg-IDs start with 0-.

State and municipal authorities use either OZG-RE (the federated portal) or their own state-specific portals. Each German state has implemented e-invoicing acceptance to varying degrees. The Leitweg-ID structure is the same across all levels of government.

Common Leitweg-ID Mistakes

  • Using an outdated Leitweg-ID: Authorities occasionally change their Leitweg-IDs when departments are reorganized. Always verify the current ID for each invoice cycle.
  • Formatting errors: The Leitweg-ID must be entered exactly as provided — including all hyphens. Do not add or remove characters.
  • Placing it in the wrong field: The Leitweg-ID belongs in BT-10 (Buyer Reference), not BT-46 (Buyer identifier) or any other field.
  • Using a Leitweg-ID for a different department: Large ministries may have multiple Leitweg-IDs for different cost centers. Ensure you use the ID specific to your project.
  • Confusing it with the Auftragsnummer: The purchase order number (BT-13) is separate from the Leitweg-ID (BT-10). Both may be required simultaneously.

Frequently Asked Questions

Is the Leitweg-ID required for B2B invoices?

No. The Leitweg-ID is only required for invoices submitted to German government authorities (B2G). For B2B invoices, BT-10 is optional and can be used for other buyer reference numbers such as purchase order numbers or contract references.

What if I use the wrong Leitweg-ID?

If the Leitweg-ID is invalid (fails the check digit verification), KOSIT validation will reject the invoice. If the Leitweg-ID is valid but belongs to the wrong department, the invoice may be accepted by the portal but routed to the wrong recipient — causing payment delays.

Does the Leitweg-ID expire?

Leitweg-IDs can be retired or reassigned when agencies are restructured. For long-running contracts, verify the Leitweg-ID at least once per year or whenever you receive updated contract documents from the authority.

Leitweg-IDXRechnungB2GGovernmentGermany