Leitweg-ID Explained: The Routing Code German Public Buyers Will Ask You For
Your invoice to a German authority can be correct in every line and still never reach the person who approves it. Leave out one code, or get one digit wrong, and the portal rejects it automatically. That code is the leitweg-id.
For AR managers, the leitweg-id is the difference between an invoice that gets paid and one that bounces back with a validation error. Here is what it is, how it is built, where it goes and how to stop it from blocking payment.
What is a Leitweg-ID?
A leitweg-id (literally "routing ID") is the electronic address of a German public-sector invoice recipient. It tells the receiving portal which authority, department or cost centre an e-invoice belongs to. Without it, the invoice has no destination.
Who issues it
The buyer issues it, not you. Federal authorities receive their leitweg-id from the Central Finance Office of the Federal Government (Zentrales Finanzwesen des Bundes, ZFB). States and municipalities assign their own. There is no public central directory, so the only reliable source is the contracting authority itself.
Leitweg-ID and the B2B mandate are not the same thing
The leitweg-id belongs to B2G invoicing. Germany's B2B e-invoicing mandate, with issuing obligations from 2027 and 2028, does not require one. If a private German customer asks for a leitweg-id, they are most likely asking for a buyer reference such as a supplier or PO number. Our Germany e-invoicing overview covers the B2B timeline in full.
How a Leitweg-ID is structured
The format is defined in the Leitweg-ID format specification published by KoSIT. Every leitweg-id has up to three parts, separated by hyphens.

Grobadressierung (coarse addressing)
Mandatory, 2 to 12 digits. The first two digits identify the federal state, with 99 reserved for the federal level. The remaining digits narrow the recipient down to district or municipality.
Feinadressierung (fine addressing)
Optional, up to 30 characters. Authorities use it to route invoices to a specific department or cost centre. Its structure is not standardised, so each authority defines its own.
Prüfziffer (check digits)
Mandatory, always two digits. They are calculated over the preceding characters using ISO 7064 MOD 97-10, the same method used for IBANs. A single mistyped character produces a different check value, so systems can detect the error before submission.
Example: the federal OZG-RE test ID 99661-WEBSERVICEOZG-28 breaks down as Grobadressierung 99661, Feinadressierung WEBSERVICEOZG and Prüfziffer 28.
Where the Leitweg-ID goes on your invoice

In the XRechnung: BT-10 Buyer reference
In an XRechnung, the leitweg-id belongs in business term BT-10, Buyer reference. It is a structured data field, not text in a note or on a PDF cover page. Placing it anywhere else means the receiving system cannot read it.
On the Peppol network: the 0204 prefix
For public bodies connected to the federal OZG-RE portal, the Peppol receiver ID is the leitweg-id preceded by the scheme code 0204, for example 0204:99661-WEBSERVICEOZG-28. The invoice itself keeps the plain leitweg-id in BT-10. For recipients in some federal states, the Peppol ID and the leitweg-id can differ, so confirm both. A certified Peppol Access Point handles this addressing for you.
Through the portals
At federal level, OZG-RE has been the only submission portal since the older ZRE portal was decommissioned in September 2025. Many states run their own portals, and each expects the same leitweg-id logic.
Five Leitweg-ID errors that block payment
Missing ID. XRechnung's German business rules require BT-10. An empty field fails validation before anyone sees the invoice.
Wrong check digits. One transposed character invalidates the ID.
Outdated ID. Authorities restructure. An ID that worked last year may no longer route.
Wrong field. The ID sits in a note, a PO reference field or only on the PDF, not in BT-10.
Wrong Peppol receiver ID. BT-10 is correct, but the 0204 receiver ID does not match the recipient's registration.

Running every outbound XRechnung through a validator before sending catches most of these. Our free XML and e-invoice validator checks XRechnung files against the official schema and business rules.
Managing Leitweg-IDs at scale
One public customer is manageable by hand. Twenty, each with several cost centres, is not. Three habits keep AR teams out of trouble:
Capture the ID at contract or PO stage. Make it a required field in your public-sector customer onboarding.
Store it in the ERP customer master, per invoice address or cost centre, not in an invoice template or an email thread.
Validate before sending, including the check digits, so errors surface in your system, not in the authority's portal.
You do not need a new ERP for this. HubBroker works as an integration layer on top of your existing system: it reads the leitweg-id from your customer data, maps it to BT-10, sets the matching Peppol receiver ID and validates the XRechnung before delivery. If you run SAP Business One, our guide to SAP B1 XRechnung readiness lists the master-data gaps to close, including the leitweg-id.
Frequently asked questions
Where do I get a buyer's Leitweg-ID?
From the buyer. The contracting authority provides it, usually in the contract, the purchase order or on request from its accounts payable team. There is no public directory covering all authorities.
Do private German customers need a Leitweg-ID?
No. The leitweg-id is a public-sector identifier. However, BT-10 Buyer reference is mandatory in every XRechnung, so B2B customers who request XRechnung may give you another reference for that field, such as a PO or supplier number.
Is a Leitweg-ID the same as a Peppol ID?
Not quite. For OZG-RE-connected recipients, the Peppol receiver ID is the leitweg-id with the prefix 0204. The leitweg-id is the buyer reference inside the invoice; the Peppol ID is the network address.
Can one authority have several Leitweg-IDs?
Yes. Authorities can use the Feinadressierung to route invoices to different departments or cost centres, each with its own leitweg-id. Use the one stated for the specific order or contract.
What happens if the Leitweg-ID is wrong?
The portal or receiving system rejects the invoice, and it does not enter the authority's approval workflow. The payment term does not start until a valid invoice is received.
Get public-sector invoices right the first time
If your team invoices German authorities and the leitweg-id lives in spreadsheets or email threads, it is worth checking how it reaches your invoices today. Book a short demo and we will walk through how HubBroker maps it from your existing ERP.