Invoicing a public authority or public sector buyer

An XRechnung the invoice portal accepts — Leitweg-ID included.

Public sector buyers receive invoices electronically, through their invoice portal and in the XRechnung format. What makes an otherwise correct invoice fail there is nearly always the same spot: the Leitweg-ID. It is not a customer number, it arrives with the order or from the procurement portal, and without it rule BR-DE-15 fires. This page walks from invoice data to send-ready UBL XML — and the check before it.

What comes in

Invoice data as for any other invoice

The recipient's Leitweg-ID (BT-10) from the order or the procurement portal

Order or contract number, where the buyer requires it

A reachable seller contact — name and phone or email

What this solves

01

The Leitweg-ID sits in the right place

countrySpecific.leitwegId lands as BT-10 in the UBL. Without it, BR-DE-15 fires — during the check before dispatch instead of later in the authority's portal.

02

Checked against the official KoSIT rules

Checking happens against the KoSIT Schematron, not against a house interpretation. The response names the rule code and the field involved, so the fix has an address.

03

BR-DE-2: the contact is mandatory

The most common reason a first XRechnung is rejected is not a miscalculation but a missing seller contact. Name plus phone or email is enough — but it has to be a field.

04

The result is send-ready XML

The response is the finished UBL document. It goes to the invoice portal unchanged; a detour via a PDF is not needed.

One real example

An excerpt from the recipe “Invoice to a public authority” — Leitweg-ID and contact, the two fields it fails on.

json
{
"invoice": {
"invoiceNumber": "RE-2025-001",
"countrySpecific": {
"countryCode": "DE",
"leitwegId": "991-12345-67"
},
"seller": {
"name": "Muster GmbH",
"email": "info@muster.de",
"phone": "+49 30 12345678"
},
"total": 1785
}
}

POST /api/v1/invoice/DE/xrechnung/generate

Response: the finished UBL XML of an XRechnung carrying Leitweg-ID 991-12345-67 as BT-10 and a total of 1,785.00 € — ready for the invoice portal.

The full recipe

The endpoints involved

  • Invoice Creator

    POST /api/v1/invoice/{countryCode}/{format}/generate

    Live
  • Validator

    POST /api/v1/invoice/{countryCode}/validate

    Live

Compared to the alternative

The alternative is the portal's web form: fine once a month, not for fifty invoices. How the different API routes model XRechnung is in the comparison.

Read the comparison

How it runs

  1. 1

    Ask the recipient for the Leitweg-ID — it comes with the order or the procurement portal, not from your master data.

  2. 2

    POST /api/v1/invoice/DE/validate — reports BR-DE-15 and BR-DE-2 before the portal does.

  3. 3

    POST /api/v1/invoice/DE/xrechnung/generate and hand the UBL XML to the invoice portal.

What it costs at this volume

Around 200 invoices per month fit the Starter plan at 23 € per month.

All prices net, plus VAT · 20 % off when billed annually · Free tier without a credit card

All plans

Limits

  • Handing the file to the portal stays your step: Peppol dispatch is not available yet (planned 2027).
  • The Leitweg-ID can neither be computed nor guessed; it comes from the buyer.
  • What is checked is the conformance of the invoice, not whether your amounts are right.

Frequently asked questions

Where do I get the Leitweg-ID?

From the buyer: it is in the order, the contract or the procurement portal. There is no directory it could be derived from.

Is a ZUGFeRD PDF enough for a public body?

Ask the recipient. The federal and several state invoice portals expect XRechnung; which format and which transmission route applies is something the buyer tells you.

What does BR-DE-15 mean?

The KoSIT rule that requires a Leitweg-ID. The code appears in the validate endpoint's response; the error reference explains it in context.

The first XRechnung to a public sector buyer — without a bounce.