← All Error Rules
error Class A

BR-DE-15 Buyer reference (Leitweg-ID) must be provided

What this rule checks

BR-DE-15 verifies that the field BT-10 (Buyer reference) is present in the invoice and contains a non-empty value. In the context of German public sector invoicing, this value is the Leitweg-ID — a unique routing identifier used to deliver the invoice to the correct government authority or department.

In the UBL representation, the element <cbc:BuyerReference> must exist directly under the root <Invoice> element and contain a non-empty text value.

Why this rule exists

The Leitweg-ID is the central routing mechanism in the German e-invoicing ecosystem. When an e-invoice is submitted via the federal or state invoice receipt platforms (ZRE or OZG-RE), the Leitweg-ID determines which authority the invoice is forwarded to.

The legal basis is Section 3 of the E-Invoicing Ordinance (E-Rechnungsverordnung, E-RechV), which mandates that invoices to public sector contracting authorities must include a Leitweg-ID. Without this field, automatic assignment and routing of the invoice is impossible — the invoice receipt portal will reject it.

What triggers a failure

Validation fails when:

  • The <cbc:BuyerReference> element is completely missing
  • The element is present but empty: <cbc:BuyerReference></cbc:BuyerReference>
  • The element contains only whitespace: <cbc:BuyerReference> </cbc:BuyerReference>

Failing XML example

The following example shows an XRechnung (UBL) where the buyer reference is missing:

<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
         xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
         xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
  <cbc:ID>RE-2024-001</cbc:ID>
  <cbc:IssueDate>2024-01-15</cbc:IssueDate>
  <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
  <!-- ERROR: BuyerReference is completely missing -->
  <cac:AccountingSupplierParty>
    <!-- ... -->
  </cac:AccountingSupplierParty>
</Invoice>

Or with an empty element:

<cbc:BuyerReference></cbc:BuyerReference>

The fix

Add a valid Leitweg-ID in the <cbc:BuyerReference> element. The Leitweg-ID is provided by the public sector contracting authority, typically in the purchase order or contract.

<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
         xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
         xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
  <cbc:ID>RE-2024-001</cbc:ID>
  <cbc:IssueDate>2024-01-15</cbc:IssueDate>
  <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
  <cbc:BuyerReference>04011000-1234512345-06</cbc:BuyerReference>
  <cac:AccountingSupplierParty>
    <!-- ... -->
  </cac:AccountingSupplierParty>
</Invoice>

Structure of the Leitweg-ID

The Leitweg-ID follows this format: CoarseRouting-FineRouting-CheckDigit

ComponentExampleDescription
Coarse routing04011000Identifies the authority (official municipality key or identifier)
Fine routing1234512345Identifies the department or organizational unit
Check digit06Two-digit check digit for error detection

Edge cases and common mistakes

  1. Whitespace-only values: A <cbc:BuyerReference> containing only spaces is treated as empty and triggers the error. Make sure no accidental whitespace is entered instead of the actual Leitweg-ID.

  2. B2B invoices: For business-to-business invoices, the Leitweg-ID is not strictly required. In this context, BT-10 may contain a free-text reference such as a purchase order number. However, BR-DE-15 still applies — the field must not be empty.

  3. Format validation: BR-DE-15 only checks whether a value is present, not whether the Leitweg-ID format is correct. An invalid Leitweg-ID (e.g., wrong check digit) will pass BR-DE-15 but may still be rejected by the receiving platform.

  4. ZUGFeRD/Factur-X: In the CII representation (ZUGFeRD), the buyer reference is located at <ram:BuyerReference> within <rsm:SupplyChainTradeTransaction><ram:ApplicableHeaderTradeAgreement>. The same rule applies.

  5. Multiple contracting authorities: When invoicing different public sector authorities, each has its own Leitweg-ID. Mixing them up will route the invoice to the wrong recipient.