E-invoice validation rules, explained

Your validator printed « [BR-CO-15]-Invoice total amount with VAT … » or « [BR-DE-15] Das Element "Buyer reference" … muss übermittelt werden »? Find the rule here: each page gives the message, what the rule checks, why invoices fail it, how to fix it, and a failing invoice with its fix, both checked by our validator. 1623 rules from the official files of CEN and KoSIT.

The rule sets

In the overviews, rules in bold have their own explanation and a checked example.

SpecificationPublisherRulesWith a checked example
EN 16931 business rulesCEN/TC 434223219
XRechnung 3.0 rulesKoSIT6138
CII syntax rules (CII-SR, CII-DT)CEN/TC 4345830
UBL syntax rules (UBL-CR, UBL-SR, UBL-DT)CEN/TC 4347560

How a rule page is made

The text, severity, context and test come unmodified from the schematron files our validator runs, in the same release (the CEN artefacts, KoSIT’s XRechnung configuration). The explanation is written per rule, in English and German: what the rule checks, the usual cause, the fix. The example is an invoice from our own generator, changed in one place; both versions run through the validator, and the page shows its real report.

A page is indexed only when it has both: an explanation written for that rule alone, and a checked example. The 1,300 or so syntax rules (UBL-CR, CII-SR …) say the same thing about different elements; they have one explanation per family on their overview, and their own pages are not indexed.

Licences and credits

The BR-*, UBL-* and CII-* rules come from the EN 16931 validation artefacts of CEN/TC 434, published under the European Union Public Licence 1.2; the BR-DE-*, BR-TMP-* and BR-DEX-* rules from KoSIT’s XRechnung schematron, Apache License 2.0. Both are quoted unmodified and credited on every page. The Peppol BIS rules are OpenPeppol’s copyright with no licence to redistribute; their pages will follow if OpenPeppol consents.

Check your own invoice

Drop your XRechnung, ZUGFeRD or Peppol file into a free validator (Peppol BIS, XRechnung, Factur-X): each runs the same rule files and links every finding to its rule page. From your own code, POST /einvoice/validate (reference) returns the same check as JSON, each finding with an explanation field pointing here (5 calls a check, anonymous within the daily allowance).

Sources