AttestwireRule referenceBR-DE-15

BR-DE-15 XRechnung requires a buyer reference

noun · XRechnung · fatal · BT-10

a reference your customer never gave you.

Your invoice was refused because it is missing a buyer reference. German public bodies use this field to route an incoming invoice to the right office, so their systems reject anything that arrives without it. This is the most common rejection on German invoices and it is a one-field fix.

Diese Regel auf Deutsch: BR-DE-15 — auf Deutsch erklärt.

Business term
BT-10 — Buyer reference
Severity
fatal
Applies to
xrechnung-ubl, xrechnung-cii

The fix

Ask your customer for their Leitweg-ID, or for a business customer the order or customer reference you agreed, and put it in the buyer reference field, which is buyerReference in this library. Then capture it at onboarding rather than at invoicing time: it is a property of the customer, not of the invoice.

Add a required field to your German customer records and store the Leitweg-ID verbatim, hyphens and all, because some portals compare it as a literal string.

What the rule requires

The value you need is called a Leitweg-ID, the routing code a German public body gives its suppliers. Your customer has one, and if your contact does not know it their accounts-payable or procurement desk will. Put it in the buyer reference field just as they give it to you, hyphens included, and send the invoice again.

If you want the background: every field in a European e-invoice has a number, and the buyer reference is field 10, written BT-10. The German version of the standard, called XRechnung, makes that field mandatory, and BR-DE-15 is the name of the rule that checks it. In the European standard itself the field is optional; the BR-DE- prefix marks a German addition.

A Leitweg-ID looks like 04011000-1234512345-06: a coarse address, a fine address and a check digit. The buyer issues it; you cannot derive it or make one up. Business customers can give you any order or customer reference instead of a Leitweg-ID (a purchase-order number, a contract number, a customer number), but the field cannot be empty.

Das Element „Buyer reference“ (BT-10) muss übermittelt werden.

BR-DE-15 — XRechnung CIUS, KoSIT XRechnung-UBL-validation.sch

Failing and passing

Fails — XRechnung profile with no buyerReference
validateInput({
  profile: "xrechnung-ubl",
  invoiceNumber: "2026-000142",
  issueDate: "2026-08-09",
  currency: "EUR",
  // buyerReference omitted   <- BR-DE-15
  seller: { /* ... */ },
  buyer:  { /* ... */ },
  lines:  [ /* ... */ ],
});
// -> { valid: false, errors: [ { rule: "BR-DE-15", ... } ] }
Passes
validateInput({
  profile: "xrechnung-ubl",
  invoiceNumber: "2026-000142",
  issueDate: "2026-08-09",
  currency: "EUR",
  buyerReference: "04011000-1234512345-06",
  seller: { /* ... */ },
  buyer:  { /* ... */ },
  lines:  [ /* ... */ ],
});
// -> { valid: true, errors: [] }

Why it exists

German authorities do not route invoices by recipient name or VAT number. The Leitweg-ID is the routing key inside the ZRE and OZG-RE portals, the federal and state invoice intakes, so an XRechnung without a buyer reference has nowhere to be delivered and is rejected at intake rather than landing in front of a person who might have worked it out.

Making the field mandatory moves that failure forward to a point where you can still do something about it.

What the library returns

The full error returned by @attestwire/en16931. It includes the rule ID, affected field and suggested correction. Developers can use this object in their application:

TeachingError
{
  "rule": "BR-DE-15",
  "field": "BT-10",
  "severity": "fatal",
  "message": "XRechnung requires a buyer reference (BT-10). For German public-sector buyers this is the Leitweg-ID; business buyers may supply any reference, but the field must be present.",
  "fix": "Ask your client for their Leitweg-ID (public sector) or an order/customer reference, and set buyerReference.",
  "example": "\"buyerReference\": \"04011000-1234512345-06\"",
  "xpath": "/ubl:Invoice/cbc:BuyerReference",
  "docsUrl": "https://attestwire.com/rules/BR-DE-15"
}

xpath is always a UBL path. On a CII invoice, look for the matching CII field instead.

How our check differs

Our check is presence-only. It does not validate the Leitweg-ID’s structure or its check digit, so a typo will pass here and be rejected later by the portal. Read a green result as “the field is filled in”, not as “the routing ID is correct”.