UBL 2.1 e-invoice format
XML (OASIS Universal Business Language)
The universal syntax for Peppol network delivery — Belgium, the Nordics, the Netherlands, and most B2B/B2G Peppol receivers.
Deadline: Belgium: mandatory B2B since January 2026. Most Peppol receiving obligations are already live.
UBL 2.1 (OASIS Universal Business Language) is one of the two XML syntaxes EN 16931 binds to, and the native format of the Peppol network. If you build invoicing software targeting EU B2B/B2G, UBL is very likely your primary output format.
InvoiceHub generates EN 16931-conformant UBL 2.1 from a clean JSON input — seller, buyer, lines, VAT breakdown, payment terms — computing every monetary total the standard requires, then self-validates the result against the official CEN Schematron before returning it.
Try it
curl -X POST https://api.invoicehub.dev/api/v1/generate \
-H "Authorization: Bearer ih_live_xxx" \
-H "Content-Type: application/json" \
-d '{"invoiceNumber": "INV-2026-0142", "issueDate": "2026-06-19", "currency": "EUR", "seller": {"name": "Acme GmbH", "vatId": "DE123456789", "address": {"city": "Berlin", "postalZone": "10115", "country": "DE"}}, "buyer": {"name": "Buyer SARL", "address": {"city": "Paris", "postalZone": "75001", "country": "FR"}}, "lines": [{"description": "Consulting", "quantity": 1, "unitPrice": 1000, "vatRate": 19}]}'Structure
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" ...>
<cbc:CustomizationID>urn:cen.eu:en16931:2017</cbc:CustomizationID>
<cbc:ID>INV-2026-0142</cbc:ID>
<cbc:IssueDate>2026-06-19</cbc:IssueDate>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cac:AccountingSupplierParty>...</cac:AccountingSupplierParty>
<cac:LegalMonetaryTotal>
<cbc:PayableAmount currencyID="EUR">1190.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>...</cac:InvoiceLine>
</Invoice>Common validation errors
- BR-01 — Missing CustomizationID (BT-24) — required on every EN 16931 invoice.
- BR-CO-15 — TaxInclusiveAmount ≠ TaxExclusiveAmount + TaxAmount.
- BR-S-2 — Standard-rated (category S) line without a seller VAT identifier.
Generate or convert to UBL 2.1
POST /api/v1/generate for structured JSON in, or POST /api/v1/convert from any other supported format.