XRechnung 3.0
Germany · B2G live, B2B 2027–2028XRechnung is Germany's CIUS on EN 16931 — a UBL or CII invoice with strict German public-sector rules, most notably a mandatory routing identifier (Leitweg-ID). It's already required for invoicing German public administrations, with B2B issuance becoming mandatory in stages from 2027.
What it is
XRechnung 3.0.2 defines the exact fields, code lists and business rules a German invoice must satisfy, on either UBL or CII syntax. It's maintained by KoSIT, and CrateAPI validates against KoSIT's own validation artefacts — the same ones your recipient's system uses.
Where it's mandatory
Germany: public-sector (B2G) e-invoicing is already live. B2B issuance becomes mandatory from 2027 for businesses over €800k turnover, and for everyone from 2028 — see our mandate tracker for the details.
What we don't do. Leitweg-ID — the routing code a German public-sector buyer needs — maps directly to the canonical model's buyer_reference field (BT-10). It's a standard EN 16931 field that XRechnung simply makes mandatory, not an XRechnung-specific extra.
Try it
curl -X POST "$BASE/v1/generate/ubl?profile=xrechnung" \ -H "X-API-Key: $KEY" -H "Content-Type: application/json" \ -d @invoice.json -o invoice.xml
Relevant endpoints
| Endpoint | Notes |
|---|---|
POST /v1/generate/ubl?profile=xrechnung | UBL syntax, XRechnung 3.0.2 rules. |
POST /v1/generate/cii?profile=xrechnung | CII syntax — same rules, different XML shape. |
POST /v1/validate/{ubl,cii}?profile=xrechnungfree | KoSIT's own validation artefacts, the same ones your recipient checks against. |
POST /v1/render/{html,pdf}?lang=de | For the invoices you receive and can't read as raw XML. |
Samples & docs
Download a validated XRechnung sample from our sample library, or read the full API reference.
FAQ
UBL or CII for XRechnung?
Either — XRechnung is defined on both syntaxes and CrateAPI generates and validates both. Use whichever your trading partner or portal expects.
Is this the same as ZUGFeRD?
No, but related: ZUGFeRD 2.x is Germany's hybrid PDF+XML format and shares its XML core (CII) with Factur-X. If you need the hybrid-PDF version rather than plain XML, see our Factur-X page.
Do I need a special field for Leitweg-ID?
No — it's the canonical model's standard buyer_reference field (BT-10), which XRechnung requires and other profiles leave optional.