Skip to content
PreviewFix
Accessibility, e-invoicing & product passports8 min readReviewed

Structured EN 16931 e-invoices across European mandates.

How the European semantic invoice model (EN 16931-1) maps into UBL 2.1, UN/CEFACT CII and national clearance/billing records across Peppol BIS 3.0, German XRechnung/ZUGFeRD, Spanish Veri*factu and Polish KSeF.

  • EN 16931
  • Peppol BIS 3.0
  • XRechnung / ZUGFeRD
  • Veri*factu & KSeF

Key engineering takeaways

Summary
  • A PDF attached to an email is not an electronic invoice under EN 16931 or national B2B e-invoicing mandates; systems expect machine-parseable XML (or hybrid PDF/A-3 with embedded XML).
  • Peppol BIS Billing 3.0, XRechnung and ZUGFeRD Extended/EN16931 share the same EN 16931-1 semantic business terms (BT-1 to BT-165), whereas Spain's Veri*factu and Poland's KSeF enforce distinct national XML schemas.
  • Tax-category arithmetic rules (BR-CO-10 through BR-CO-17 and BR-S-*) reject XML files where line net sums and VAT subtotals differ by even 0.01.
  • Schema and Schematron validation confirms technical file conformance; transmission through an accredited Peppol Access Point, AEAT certificate endpoint or KSeF session remains a separate transport step.

Published by MeWeBe Limited · Factual engineering reference

1. EN 16931 semantic model versus national XML syntaxes

European standard EN 16931-1 defines a single semantic data model of business terms (BT-*, such as BT-1 Invoice number, BT-2 Issue date, BT-31 Seller VAT identifier) and business groups (BG-*) originally created for B2G public procurement under Directive 2014/55/EU and now adopted as the backbone of European B2B e-invoicing.

Two normative XML syntax bindings implement EN 16931: OASIS UBL 2.1 (Invoice / CreditNote) and UN/CEFACT Cross-Industry Invoice (CII D16B). Alongside pure EN 16931 profiles (CIUS), several EU Member States operate national fiscal-integrity or central-clearance schemas with additional fields:

  • Peppol BIS Billing 3.0 (UBL 2.1): Cross-border CIUS requiring Electronic Address Scheme (EAS) participant identifiers (cbc:EndpointID/@schemeID), ISO 4217 currencies, UN/ECE Recommendation 20 unit codes (C62, H87, HUR) and strict Schematron validation.
  • XRechnung & ZUGFeRD 2.x / Factur-X (Germany & France): Germany's B2B e-invoice receipt obligation (phased from 1 January 2025 under the Wachstumschancengesetz) accepts EN 16931-conformant formats including XRechnung (requiring BT-10 buyer reference / Leitweg-ID on public contracts) and ZUGFeRD (PDF/A-3 embedding factur-x.xml CII).
  • Spain Veri*factu (Real Decreto 1007/2023 & Orden HAC/1177/2024): Targets billing software integrity (SIF) under Spain's Anti-Fraud Law (Ley 11/2021) rather than Peppol UBL: each invoice record (RegistroAlta) computes a SHA-256 chain hash linking to the prior record, embeds a verifiable AEAT QR URL, and can be remitted immediately in VERI*FACTU mode.
  • Poland KSeF (Krajowy System e-Faktur): Centralised clearance platform using Poland's national FA structured XML schema (FA(2) / FA(3)), where legal issuance ties to KSeF validation and assignment of a unique KSeF identification number.

2. Why Schematron rejects invoices that pass XSD validation

Validating an XML invoice against the W3C XSD grammar only proves that XML tags appear in the permitted sequence and data types. Every EN 16931 and Peppol Access Point gateway runs a second, stricter layer: XSLT / Schematron business rules.

The most common rejection reason in ERP exports is mixing per-line tax rounding with document-level VAT calculation. Under EN 16931: BT-106 (Sum of Invoice line net amounts) must equal the exact sum of every BT-131 (cbc:LineExtensionAmount, rounded to 2 decimals per line); BT-109 (Invoice total without VAT) equals BT-106 - BT-107 (allowances) + BT-108 (charges); and each BG-23 VAT breakdown group computes BT-117 = round(BT-116 × rate, 2) at the category subtotal level.

Peppol BIS Billing 3.0 UBL 2.1 monetary & tax-subtotal structureSpecimen
<cac:TaxTotal>
  <cbc:TaxAmount currencyID="EUR">238.00</cbc:TaxAmount>
  <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="EUR">1252.63</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="EUR">238.00</cbc:TaxAmount>
    <cac:TaxCategory>
      <cbc:ID>S</cbc:ID>
      <cbc:Percent>19.00</cbc:Percent>
      <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
    </cac:TaxCategory>
  </cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
  <cbc:LineExtensionAmount currencyID="EUR">1252.63</cbc:LineExtensionAmount>
  <cbc:TaxExclusiveAmount currencyID="EUR">1252.63</cbc:TaxExclusiveAmount>
  <cbc:TaxInclusiveAmount currencyID="EUR">1490.63</cbc:TaxInclusiveAmount>
  <cbc:PayableAmount currencyID="EUR">1490.63</cbc:PayableAmount>
</cac:LegalMonetaryTotal>

3. Generating and validating structured XML deterministically

Our engine exposes two stateless operations for finance and ERP teams: POST /api/v1/engines/einvoice/build (1 credit unit, deterministic, zero LLM involvement) serialises a typed invoice object into peppol-bis-3, xrechnung, zugferd, verifactu or ksef XML and immediately runs rule checks; POST /api/v1/engines/einvoice/validate (0 credit units) validates an existing XML document and returns { valid, violations: { rule, severity, message, location }[] }.

Important boundary: XML construction and validation confirm technical syntax and EN 16931 / national schema rules. Determining whether a cross-border supply is standard-rated, zero-rated export (K intra-Community supply / G export) or subject to reverse charge (AE), and transmitting records using your organisation's qualified tax certificate or Peppol Access Point, remain with your finance team and accountant.

SPEC · EINV-EN16931 · Reviewed 18 November 2026

Structured e-invoice profile comparison

Core syntax, buyer addressing and validation layer across the five supported profiles

Engineering checklist
ProfileXML syntaxMandatory identifier / integrity fieldValidation check
Peppol BIS Billing 3.0OASIS UBL 2.1EndpointID (@schemeID EAS) + CustomizationIDEN 16931 + Peppol Schematron
XRechnung (DE)UBL 2.1 or UN/CEFACT CIIBT-10 Buyer reference (Leitweg-ID for B2G)KoSIT CIUS rules
ZUGFeRD 2.x / Factur-XUN/CEFACT CII inside PDF/A-3Embedded factur-x.xml XMP metadata conformance levelCII + EN 16931 rules
Spain Veri*factuAEAT RegistroFacturacion XMLPrevious-record SHA-256 chain fingerprint + QR URLRD 1007/2023 + Orden HAC/1177/2024
Poland KSeFMinistry of Finance FA XMLSeller NIP, P_1 issue date & structured tax rate fieldsFA XSD + business rules

Data fields your ERP must capture before generating structured XML

  • Seller and buyer legal names, ISO 3166-1 alpha-2 country codes, postal addresses and validated VAT numbers (BT-31, BT-48).
  • Buyer Peppol Participant ID (EAS:Identifier) or BT-10 buyer reference / purchase order reference.
  • UN/ECE Rec 20 unit-of-measure code per SKU (H87 piece, KGM kilogram, HUR hour) rather than free-text 'pcs'.
  • Explicit VAT exemption reason code (VATEX-*) and legal text (BT-120) whenever 0% VAT (AE, K, G, E) is used.

Technical syntax and arithmetic reference only — not tax, VAT or statutory accounting advice.

Technical questions

Common edge cases & boundaries

Does validating XML transmit the invoice to Peppol, AEAT or KSeF?
No. Validation (einvoice.validate) and generation (einvoice.build) operate purely on the XML payload so you can verify syntax and rounding before sending through your Peppol Access Point or national tax gateway.
Why did our invoice fail rule BR-CO-15 when the total looks right?
BR-CO-15 requires TaxInclusiveAmount (BT-112) to equal TaxExclusiveAmount (BT-109) plus TaxTotal (BT-110). It usually fails when an ERP sums individually VAT-rounded gross lines instead of adding the category VAT subtotal to the net total.
Is Spain's Veri*factu the same law as Spain's Crea y Crece B2B e-invoicing mandate?
No. Veri*factu (Real Decreto 1007/2023 under the Anti-Fraud Law) governs tamper-evident billing software records and AEAT reporting, whereas Ley 18/2022 (Crea y Crece) is a separate B2B electronic invoicing mandate awaiting its final implementing technical regulation.

Run on your own input

Paired services & previews.

Every digital deliverable starts with a free preview on your own file, URL or domain; managed services lock your quote upfront and hold supplier payout until completion proof clears.

Continue reading

Related technical guides.

7 min read

Omnibus 30-day prior price & VIES VAT

How to compute the lowest price applied during the preceding 30 days under Directive (EU) 2019/2161 (Article 6a) in integer minor units, avoid fake strikethrough RRP traps, and validate EU/NI B2B VAT numbers via VIES.

7 min read

Wholesale PDF to ERP & storefront CSVs

How multi-page PDF table geometry, multilingual column header normalisation and integer minor-unit arithmetic work together so wholesale catalogues and supplier bills import cleanly into Shopify, WooCommerce, Xero and NetSuite.

7 min read

EU Digital Product Passport & GS1 Digital Link

How to encode GTIN, batch/lot and serial identifiers in GS1 Digital Link URIs and JSON-LD product records across active EU rules (Regulation (EU) 2023/988 GPSR and Regulation (EU) 2023/1542 Batteries) while ESPR delegated acts remain in progress.

Test before checkout

Inspect a free preview first.

Run our deterministic checks or live quote tool on your own file, URL, domain or postcode before paying a penny.