Leitweg-ID: what it is for, where to get it, and when it may be missing

The Leitweg-ID routes e-invoices to public authorities. Structure, check digit, and when it may be missing in the B2B sector.

Hand-drawn sketch: an envelope with a curved arrow pointing toward a small government building

The Leitweg-ID is an identifier that routes an electronic invoice to the correct location within an authority, and it is required exclusively for invoices to public contracting authorities. According to the explanation of the structure of the Leitweg-ID by ecosio, it consists of a mandatory coarse addressing with 2 to 12 digits, which identifies the federal state, district, and municipality, an optional fine addressing with up to 30 further characters, and a two-digit check digit. For invoices to commercial customers or private individuals, no Leitweg-ID is required, as it applies exclusively to the B2G sector. As of: August 2026.

What exactly does a Leitweg-ID consist of?

A Leitweg-ID is divided into a maximum of three parts: the coarse addressing, an optional fine addressing, and the check digit at the end. The coarse addressing is the mandatory core component and uniquely assigns the invoice to a federal state, district, and municipal level, while the fine addressing optionally allows an even more precise assignment within an authority, for example to a specific department or cost center. Without fine addressing, the invoice remains at the level specified by the coarse addressing and must be manually forwarded there.

What is the check digit for?

The two-digit check digit is calculated using the ISO 7064 MOD 97-10 method and allows systems to immediately detect typing errors in a Leitweg-ID before an invoice is delivered to the wrong address. In practice, this means that an incorrectly entered Leitweg-ID is usually already noticed during the validation of the invoice, rather than only causing an undeliverable invoice at the recipient. Anyone who enters Leitweg-IDs into invoices in an automated way should mathematically check the check digit before sending, rather than relying solely on the input.

Where exactly does the Leitweg-ID appear in an XRechnung?

In the XRechnung, the Leitweg-ID is, according to the overview of the structure and mandatory field of the Leitweg-ID, stored as the so-called Buyer Reference in field BT-10, which references the buyer or the receiving authority. The responsible coordination office for IT standards (KoSIT) maintains the Leitweg-ID specification and the associated XRechnung profile for Germany, so that the structure and check digit calculation do not differ from one federal state to another. Without a valid Leitweg-ID in field BT-10, an XRechnung addressed to an authority is rejected by many public receiving platforms even before the content review.

When may the Leitweg-ID be missing?

The Leitweg-ID may and must be missing as soon as the invoice recipient is not a public authority, since it is intended exclusively for the B2G sector. For invoices between companies or to private individuals, there is no comparable mandatory addressing field; here, other reference fields such as an order number or customer number regulate the assignment. Anyone who supplies both authorities and commercial customers should therefore distinguish in their own invoicing when a Leitweg-ID is a mandatory field and when it simply makes no sense. For companies that want to automate the sending of invoices to authorities from their ERP or accounting system, this check can be built in as a fixed step into an automation that fills in the appropriate fields depending on the recipient type.

Frequently asked questions about the Leitweg-ID

Where do I get the Leitweg-ID of an authority?

The Leitweg-ID is issued by the respective authority and is usually stated via its procurement office, a central state directory, or directly on a tender or order. You cannot generate it yourself; instead, you must request it from the contracting authority or obtain it from the tender documents.

Is the Leitweg-ID the same length for every invoice to an authority?

No, the length varies because the optional fine addressing is present for some authorities and missing for others. The only fixed elements are that the coarse addressing comprises 2 to 12 digits and the check digit is always two digits at the end.

Can I detect an incorrect Leitweg-ID myself before I send the invoice?

Yes, since the check digit is calculated using a fixed mathematical method, an incorrect Leitweg-ID can be detected mathematically or via an online validator before sending. However, this only prevents typing errors in an otherwise correct ID, not the use of a fundamentally incorrect Leitweg-ID.

Will I also need a Leitweg-ID for private invoices to companies in the future?

No, as things currently stand, the Leitweg-ID remains reserved exclusively for the B2G sector and is not part of the general e-invoicing requirement between companies. Do not confuse it with other reference fields used in the B2B sector for the automatic assignment of an invoice.

About NordFlux

NordFlux UG (haftungsbeschränkt)

NordFlux builds digital employees for organisations: automations and AI agents that take over repetitive work. You stay in control.

More about us
Free initial analysis

Concrete questions about automation or AI?

In a free initial analysis we discuss your case directly. No strings attached.