Guide for developers
EN 16931 explained for developers
EN 16931 is the European semantic standard for electronic invoices. Once you understand it, both XRechnung and ZUGFeRD become much easier to implement and validate.
Need to check a single invoice?
Use the web validator for quick browser-based checks with XML or ZUGFeRD PDF files.
Open validatorNeed to automate e-invoicing?
Use the API for recurring validation, generation, and retrieval inside your software.
Open developer pageWhat is EN 16931?
EN 16931 defines the semantic data model of a compliant electronic invoice. It describes which invoice fields must exist, may exist, or become mandatory under certain conditions, independent of the concrete XML syntax.
The standard is the basis of EU directive 2014/55/EU for electronic invoicing in public procurement. Member states must accept invoices that comply with EN 16931.
Business Terms (BT) and Business Groups (BG)
EN 16931 names invoice fields as Business Terms and groups them into Business Groups. Each term has a stable number, for example:
- → BT-1 - invoice number
- → BT-2 - invoice issue date
- → BT-9 - payment due date
- → BT-31 - seller VAT identifier
- → BG-25 - invoice line
That numbering stays valid across syntaxes. When a validation message mentions a business rule, it points back to the same semantic concept whether you use UBL or CII.
EN 16931 versus concrete invoice formats
EN 16931 only defines the semantic model, not the wire format. Concrete implementations map the same semantic data into different syntaxes:
- → XRechnung - the German CIUS based on UBL 2.1 or CII D16B.
- → ZUGFeRD / Factur-X - a PDF/A-3 document with embedded CII XML and different profiles.
- → Peppol BIS Billing 3.0 - an international CIUS on top of UBL.
What developers actually need to care about
In day-to-day implementation, a few topics matter most:
- → Mandatory versus optional versus conditional fields.
- → Business rules that govern tax handling, totals, identifiers, and date consistency.
- → Cardinality, meaning whether a field may appear once or multiple times.
- → Code lists such as ISO currency codes, country codes, and tax category values.
Validating against EN 16931
Official EN 16931 validation is typically implemented with Schematron rules. XInvoice uses the official validation artifacts and returns structured findings including rule identifiers and the affected document path.
That lets you add compliance checks to your own integration or production pipeline without running your own validation toolchain.