XRechnung 8 min readPublished · Updated

What Is a Leitweg-ID? Structure, Examples and Who Needs One

What is a Leitweg-ID? Its structure, a worked check-digit example, where it goes in BT-10 and why only public authorities need one, not their suppliers.

docutools.pro Editorial TeamEditorial Team

Key takeaways

  • A Leitweg-ID routes e-invoices to a German public-sector recipient and goes into the XRechnung field BT-10 (buyer reference); if it is missing, validation reports BR-DE-15.
  • It has a coarse address of 2–12 digits, an optional fine address of up to 30 characters (A–Z, 0–9) and a two-digit check digit, 5 to 46 characters in total.
  • The first two digits identify the federal state (01 to 16) or the federal government (99); federal recipients start with 991, 992 or 993.
  • The check digit uses ISO/IEC 7064 MOD 97-10, the same method as the IBAN; for 04011000-1234512345 it is 06.
  • Only public bodies are assigned a Leitweg-ID; businesses never need their own, including for German B2B e-invoicing since 1 January 2025.
On this page

A Leitweg-ID is the electronic address of a German public-sector invoice recipient. Every XRechnung sent to a German authority carries it in field BT-10 (buyer reference). It consists of a coarse address, an optional fine address and a two-digit check digit and is assigned by the administration. Suppliers never need their own Leitweg-ID, not even for B2B invoices.

Last reviewed: September 2026

What is a Leitweg-ID?

The term translates roughly as "routing ID"; the full German name is Leitweg-Identifikationsnummer. It tells the invoice-receipt platform where inside the public administration an e-invoice has to go. The platform reads the ID from the invoice and forwards the file to the accounting or approval system of the responsible authority. Without it, the platform could not tell which office or department should process the invoice.

The format was agreed between the federal government, the 16 states (Länder) and local authorities and is laid down in the Leitweg-ID format specification published by KoSIT (opens in a new tab) (version 2.0.2 of 28 July 2021). Assigning the individual IDs is left to the federal government and each state. Since 30 September 2019 the Leitweg-ID has also been registered in the international ISO/IEC 6523 code list under the code 0204, which is why it can double as an address in the Peppol network.

For invoices to federal authorities, the Leitweg-ID is a mandatory item under § 5 of the federal E-Invoicing Ordinance (E-Rechnungsverordnung, E-RechV). The European standard EN 16931 treats the buyer reference BT-10 as optional. XRechnung, the German implementation of the standard, makes it mandatory through business rule BR-DE-15.

Leitweg-ID format: the three parts

A Leitweg-ID consists of three components separated by the hyphen-minus character (Unicode U+002D). The coarse address and the check digit are mandatory; the fine address is optional:

PartMandatoryLengthCharactersIn the example 04011000-1234512345-06
Coarse address (Grobadressierung)yes2 to 12digits only04011000
Fine address (Feinadressierung)noup to 30letters A–Z and digits, not case-sensitive1234512345
Check digit (Prüfziffer)yesexactly 2digits06

Including hyphens, a Leitweg-ID is therefore between 5 and 46 characters long. Without a fine address the middle hyphen disappears, and the ID is just the coarse address, one hyphen and the check digit.

Coarse address: state, district, county, municipality

The coarse address follows the regional key (Regionalschlüssel) and the official municipality key (Amtlicher Gemeindeschlüssel) of the Federal Statistical Office. It is built from up to four elements:

  1. Code of the federal state or the federal government (2 digits, mandatory)
  2. Code of the administrative district (Regierungsbezirk); at federal level an ordering code (1 digit)
  3. Code of the county (Landkreis) (2 digits)
  4. Municipal association and/or municipality code (3, 4 or 7 digits)

Elements 2 to 4 are optional but build on each other: if a county is given, the district must be given too. The first two digits therefore always show which state an office belongs to, or whether it is part of the federal administration:

CodeStateCodeState
01Schleswig-Holstein10Saarland
02Hamburg11Berlin
03Lower Saxony12Brandenburg
04Bremen13Mecklenburg-Western Pomerania
05North Rhine-Westphalia14Saxony
06Hesse15Saxony-Anhalt
07Rhineland-Palatinate16Thuringia
08Baden-Württemberg99Federal government
09Bavaria

Federal administration: 991, 992 and 993

At federal level the 99 is followed by an ordering code. According to the federal e-invoicing FAQ (opens in a new tab), the coarse address shows how a recipient is connected:

Coarse addressRecipientReceiving channel
991direct federal administration or a constitutional bodyOZG-RE
992indirect federal administrationOZG-RE
993indirect federal administrationown solution, not the OZG-RE

Since 19 September 2025 the OZG-RE has been the only federal invoice-receipt platform; the former ZRE was merged into it. States and municipalities run their own portals with their own rules.

Fine address: free to design

There is no nationwide rule for the fine address. The federal government and the states use it to mirror their internal invoice processing, for example individual offices or budget units. One authority can therefore have several Leitweg-IDs. The specification recommends starting the fine address with a letter; the calculation below shows why.

Leitweg-ID examples explained

Example 1 comes from the KoSIT specification: 04011000-1234512345-06. The coarse address 04011000 starts with 04 for Bremen, followed by the district (0), county (11) and municipality code (000). 1234512345 is a purely numeric fine address and 06 is the check digit. It is an illustration, not an address to send invoices to.

Example 2 is the official test Leitweg-ID of the OZG-RE reference environment: 99661-WEBSERVICEOZG-28. The coarse address starts with 99 for the federal government, the fine address WEBSERVICEOZG consists only of letters, and 28 is the check digit. It is meant for test invoices only.

How is the check digit calculated?

The check digit follows ISO/IEC 7064:2003, method MOD 97-10, the same method used to validate an IBAN. The input is the coarse and fine address without hyphens. Here is example 1 worked through:

  1. Take the coarse address: 04011000
  2. Append the fine address without the hyphen: 1234512345. It contains only digits, so it stays as it is.
  3. Append two zeros as placeholders for the check digit: 04011000123451234500
  4. Divide by 97 and keep the remainder: 04011000123451234500 mod 97 = 92
  5. Subtract the remainder from 98: 98 − 92 = 6, written with two digits as 06

Result: 04011000-1234512345-06. Because the remainder is always between 0 and 96, the check digit is always a number from 02 to 98.

A 20-digit number exceeds the precision of a spreadsheet, which handles only about 15 significant digits. To calculate by hand, work in pieces as with an IBAN: take the remainder of the first nine digits, put it in front of the next seven digits, divide by 97 again and repeat until all digits are used.

040110001                      mod 97 = 16
16 + 2345123   ->  162345123   mod 97 = 6
06 + 4500      ->  064500      mod 97 = 92
Check digit: 98 - 92 = 06

Example with letters: 99661-WEBSERVICEOZG-28

If the fine address contains letters, replace each letter with a number: A = 10, B = 11 and so on up to Z = 35. WEBSERVICEOZG becomes W = 32, E = 14, B = 11, S = 28, E = 14, R = 27, V = 31, I = 18, C = 12, E = 14, O = 24, Z = 35, G = 16. Then calculate as above:

coarse + fine (converted) + 00:
99661 | 32141128142731181214243516 | 00
= 996613214112814273118121424351600

996613214112814273118121424351600 mod 97 = 70
Check digit: 98 - 70 = 28

The result, 28, matches the published test ID. We verified both examples with a script.

The cross-check: remainder 1

To check an existing ID, append its check digit instead of the two zeros: 04011000123451234506 mod 97 gives 1. Every valid Leitweg-ID leaves a remainder of 1. A transposition error shows up immediately: swap the last two digits of the fine address to 1234512354 and the check with 06 gives a remainder of 28 instead of 1.

A misplaced hyphen, on the other hand, goes unnoticed, because hyphens are not part of the calculation. The string 0401100-01234512345-06 passes the check just like the original, yet it points to a different office that usually does not exist. According to KoSIT, a fine address that starts with a letter improves the detection of this kind of input error.

You do not have to do the arithmetic yourself. The Leitweg-ID validator checks the structure and the check digit in your browser, and its "calculate check digit" tab (Prüfziffer berechnen) produces the missing check digit for a coarse and fine address.

Where does the Leitweg-ID go in an XRechnung?

The Leitweg-ID belongs in field BT-10 Buyer reference (in German Käuferreferenz). In the two XRechnung syntaxes it looks like this:

<!-- UBL 2.1: directly under ubl:Invoice or ubl:CreditNote -->
<cbc:BuyerReference>04011000-1234512345-06</cbc:BuyerReference>

<!-- UN/CEFACT CII: first child of ram:ApplicableHeaderTradeAgreement -->
<ram:ApplicableHeaderTradeAgreement>
  <ram:BuyerReference>04011000-1234512345-06</ram:BuyerReference>
  <!-- followed by ram:SellerTradeParty, ram:BuyerTradeParty ... -->
</ram:ApplicableHeaderTradeAgreement>

The full CII path is /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerReference. A ZUGFeRD invoice in the XRECHNUNG profile uses the same CII element.

Three fields are often mixed up:

  • BT-10 Buyer reference: the recipient's Leitweg-ID
  • BT-13 Purchase order reference: the order number issued by the authority
  • BT-46 Buyer identifier: an identifier of the buyer itself, not a routing address

If BT-10 is empty, validation against the KoSIT rules reports BR-DE-15. Upload the XML file to the xrechnung viewer to see whether the buyer reference is filled and whether every other rule passes. If you are creating the invoice from scratch, enter the ID in the "Buyer reference / Leitweg-ID" field of our e-invoice generator.

Who needs a Leitweg-ID?

Only public contracting authorities have a Leitweg-ID. It is assigned to them before they are connected to an invoice-receipt platform: at federal level by the Zentrales Finanzwesen des Bundes (ZFB), in the states by the office each state designates. Every federal invoice recipient has at least one Leitweg-ID, and larger authorities often have several.

Businesses and freelancers that supply public bodies do not need a Leitweg-ID of their own. They enter the ID of their customer, which the authority provides with the order. The same applies to German B2B e-invoicing, which has been in force since 1 January 2025: the Leitweg-ID addresses recipients in the public administration only.

What about B2B invoices?

In an XRechnung between two businesses, BT-10 stays mandatory because BR-DE-15 applies to every XRechnung. It does not hold a Leitweg-ID, though, but whatever reference the customer asks for, such as a cost centre, a project code or the name of the person who ordered. ZUGFeRD invoices in the other profiles are not subject to the German XRechnung rules, so BT-10 is optional there. Which formats are allowed between German businesses is covered in our guide to the German e-invoicing mandate, and the comparison XRechnung vs. ZUGFeRD explains how the two formats differ.

Leitweg-ID and Peppol

Because the Leitweg-ID is registered under code 0204, it can serve as a Peppol participant identifier. For the direct federal administration and for bodies and cooperating states connected to the OZG-RE, the Peppol ID is "0204:" followed by the Leitweg-ID. For the test environment that is 0204:99661-WEBSERVICEOZG-28. Other states may use Peppol IDs that differ from the Leitweg-ID.

The prefix belongs only in the technical envelope of the Peppol transmission. Field BT-10 of the invoice itself contains the bare Leitweg-ID without "0204:".

Common Leitweg-ID mistakes

MistakeConsequenceHow to avoid it
BT-10 left emptyerror BR-DE-15, rejection by the platformcopy the ID from the order into BT-10
Hyphen in the wrong place, spaces before or after the IDthe OZG-RE reports "Leitweg-ID ist nicht valide" (Leitweg-ID not valid)copy the ID exactly as given, remove spaces
Transposed digitscheck digit does not matchcheck before sending
ID of a different officeinvoice ends up in the wrong department or is rejecteduse only the ID from the specific order
Leitweg-ID in BT-13 or BT-46 instead of BT-10BT-10 missing, routing failskeep the fields apart
"0204:" in BT-10value does not match the formatput the prefix only in the Peppol envelope
Letter O instead of digit 0 in the coarse addressformat errorthe coarse address contains digits only

Typos, invalid characters and a wrong check digit are caught before sending if you run the ID through a leitweg id validator. No check digit can tell you whether the ID actually belongs to your order; only the authority knows that. Other frequent validation problems are covered in how to fix XRechnung validation errors.

Finding or applying for a Leitweg-ID

How suppliers find the right ID, where to enter it and how a public body applies for a new Leitweg-ID is explained step by step in how to get a Leitweg-ID. That guide also covers what to do when the OZG-RE rejects an ID and how to test with the test ID. In short: the ID is in the purchase order or contract; if it is missing, ask the authority's invoice office. More background on the format is collected in the XRechnung category.

Tags:Leitweg-IDXRechnungB2GBT-10Check Digit

Tools for this article

Frequently asked questions

What is a Leitweg-ID?

A Leitweg-ID is the electronic address of a German public-sector invoice recipient. Invoice-receipt platforms such as the federal OZG-RE read it from field BT-10 (buyer reference) of an XRechnung and forward the invoice to the responsible office. The format is defined in the KoSIT Leitweg-ID format specification 2.0.2; the IDs themselves are assigned by the federal government and the states. It is mandatory on invoices to federal authorities.

What is the Leitweg-ID format?

A Leitweg-ID has three parts separated by hyphens: a coarse address (Grobadressierung) of 2 to 12 digits, an optional fine address (Feinadressierung) of up to 30 letters or digits, and a two-digit check digit. The coarse address starts with the code of the federal state (01 to 16) or of the federal government (99). The example used in the KoSIT specification is 04011000-1234512345-06.

How is the Leitweg-ID check digit calculated?

It follows ISO/IEC 7064 MOD 97-10. Join the coarse and fine address without hyphens, replace letters with numbers (A = 10 to Z = 35), append two zeros, divide by 97 and subtract the remainder from 98. For 04011000-1234512345 the remainder is 92, so the check digit is 06. To verify a complete ID, the full number divided by 97 must leave a remainder of 1.

Does my company need its own Leitweg-ID?

No. Leitweg-IDs are assigned only to public contracting authorities; at federal level the central finance service (Zentrales Finanzwesen des Bundes, ZFB) is responsible. Businesses and freelancers that supply authorities enter the Leitweg-ID their customer gives them with the order. The federal e-invoicing FAQ states explicitly that companies do not need their own Leitweg-ID for German B2B e-invoicing either.

Is a Leitweg-ID required on B2B invoices?

No, Leitweg-IDs exist only for public bodies. In an XRechnung, however, field BT-10 must always be filled because of business rule BR-DE-15. On B2B invoices it carries another buyer reference that the customer specifies, such as a cost centre, a project code or the name of the person who placed the order. On ZUGFeRD invoices outside the XRECHNUNG profile, BT-10 is optional.

Topic hubMore on XRechnungStructure, mandatory fields, Leitweg-ID and submission of XRechnung, Germany's standard for structured e-invoices.