UBL Invoice Format: UBL 2.1 XML Example and Field Guide
UBL meaning, a full UBL 2.1 XML invoice and credit note that pass Peppol BIS 3.0 validation, every key field mapped to EN 16931, VAT codes and the errors that get invoices rejected.

Written by
Tom Van Asbroeck
Last updated: · 20 min read
Expert verified

The UBL invoice format is an XML structure for electronic invoices. UBL stands for Universal Business Language, an open standard maintained by OASIS. A UBL invoice is a plain-text .xml file with an Invoice root element. It holds the seller, the buyer, the invoice lines, the VAT breakdown and the totals in fixed, machine-readable fields. Every Peppol e-invoice uses UBL 2.1, under the Peppol BIS Billing 3.0 profile of the European standard EN 16931.
You will also see it called the UBL formaat or UBL bestand in Dutch and format UBL or facture UBL in French. The file is the same. This guide walks through the structure block by block. It then gives a complete UBL 2.1 invoice and a matching credit note. We validated both on 18 November 2026 against the UBL 2.1 XSD, EN 16931 and Peppol BIS Billing 3.0: zero errors, zero warnings.
Quick Reference
- Version: Peppol uses UBL 2.1. The newest OASIS release is UBL 2.5 (August 2026). There is no UBL 3.0.
- Root elements:
Invoice(type code 380) andCreditNote(type code 381). - Main blocks: header, seller (BG-4), buyer (BG-7), payment (BG-16), allowances and charges (BG-20, BG-21), document totals (BG-22), VAT breakdown (BG-23), invoice lines (BG-25).
- Validation: three layers (UBL 2.1 XSD, EN 16931 schematron, Peppol BIS schematron). Check a file with the free Peppol validator or our API.
- Related: UBL Format Explorer | EN16931 Field Mapper | Peppol Invoice Viewer | XML Invoicing Overview
Skip the XML. Send JSON instead.
The e-invoice.be API accepts simple JSON and handles UBL conversion, EN16931 validation, and Peppol delivery automatically. You never have to write XML yourself.
View API documentation1. What is UBL?
UBL stands for Universal Business Language. It is an XML-based standard maintained by OASIS (Organization for the Advancement of Structured Information Standards) for electronic business documents. Think of it as a universal vocabulary for invoices, credit notes, purchase orders, and other commercial documents.
Before UBL, every company and software vendor had their own format for invoices. A Belgian company using one ERP could not automatically exchange invoices with a German company using a different ERP. UBL solves this by defining a single, standardized XML schema that everyone agrees on.
Peppol uses UBL 2.1. It is not the newest release: UBL 2.5 became an OASIS Standard in August 2026. But UBL 2.1 is the version that EN 16931 and Peppol BIS Billing 3.0 are built on, and it is also published as ISO/IEC 19845:2015. UBL 2.1 defines more than 60 document types. For e-invoicing you only need two: the invoice and the credit note.
So what is the UBL format in practical terms? It is a plain-text XML file that follows the UBL 2.1 XSD schema. The file extension is.xml. A single UBL file holds one business document. In Belgium it is the UBL standard behind every B2B e-invoice sent over Peppol since the January 2026 mandate. The same UBL XML works for Belgian, Dutch, French, and German invoices: there is no country variant of the file itself, only of the business rules layered on top. Still issuing PDF invoices? A PDF to UBL invoice converter shows which fields of your PDF map to this XML format.
The same standard is known under different names in different markets. In the Netherlands it underpins Simpler Invoicing and the NLCIUS profile. In Belgium it is the Peppol BIS Billing 3.0 UBL invoice. In French it is the format UBL, and in Dutch the UBL formaat, UBL bestand, or UBL factuur. All of those words point to the same UBL 2.1 XML document described in this guide.
2. UBL in the Peppol network
Peppol does not use raw UBL. It uses a specific profile called Peppol BIS Billing 3.0, which is built on top of UBL 2.1 and compliant with the European standard EN16931. This means every Peppol invoice must satisfy three layers of rules:
UBL 2.1 XML schema
The document must be valid XML that conforms to the UBL 2.1 schema definition. This covers the structure: which elements exist, their order, and their data types.
EN16931 business rules
The European standard defines semantic rules. For example: the total tax amount must equal the sum of all tax subtotals, and every invoice line must have a price and quantity.
Peppol BIS Billing 3.0 rules
Peppol adds its own rules on top. For example: the document must include a specific CustomizationID and ProfileID, and certain fields that are optional in EN16931 become mandatory in Peppol.
UBL, EN 16931 and Peppol BIS: who defines what
These three names are often mixed up. Each one answers a different question.
| Layer | Published by | What it defines | Example rule |
|---|---|---|---|
| UBL 2.1 | OASIS | XML element names, nesting, order and data types (the syntax) | cbc:IssueDate must come before cbc:DueDate |
| EN 16931 | CEN (European Committee for Standardization) | Which business terms (BT-1 to BT-165) an invoice holds, and how the amounts add up | BR-CO-15: total with VAT = total without VAT + VAT |
| Peppol BIS Billing 3.0 | OpenPeppol | Extra rules and code lists for the Peppol network | PEPPOL-EN16931-R020: the seller electronic address is mandatory |
The full document type identifier for a Peppol invoice looks like this:
urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1This identifier tells the receiving system: "This is a UBL Invoice v2, compliant with EN16931:2017, following Peppol BIS Billing 3.0, using syntax version 2.1."
Where to find the UBL 2.1 XSD schema and Peppol BIS Billing 3.0 rules
The Peppol schema is published in two places. The base UBL invoice XSD lives with OASIS, and the Peppol BIS Billing 3.0 rules live with OpenPeppol:
- UBL 2.1 XSD schema: the structural definition of every element and attribute. Published at docs.oasis-open.org/ubl/os-UBL-2.1. The invoice schema file is
UBL-Invoice-2.1.xsd; the credit note schema isUBL-CreditNote-2.1.xsd. - Peppol BIS Billing 3.0 schematron rules: the business rules on top of the XSD. Published by OpenPeppol at docs.peppol.eu/poacc/billing/3.0, including reference Peppol BIS Billing 3.0 XML examples for every document type.
- EN16931 schematron: the European core rules, published by CEN. These are bundled in the same OpenPeppol validation artifacts so you do not have to fetch them separately.
In practice, most teams never download the XSD. They send their UBL XML to a hosted validator that runs all three layers in one pass. The free Peppol Invoice Viewer does exactly that, and the same checks are exposed through the e-invoice.be API validator endpoint. To call it from code, start with our Peppol developer docs and SDKs for TypeScript, Python, PHP, Ruby and Java.
3. UBL invoice structure (with XML examples)
The UBL structure consists of six main sections: header, parties, payment, invoice lines, tax and totals. Two optional blocks, document references and allowances or charges, appear on many real invoices. Let's walk through each one with XML you can reuse. The complete example below puts them all together.
3.0 Element order matters
The UBL 2.1 XSD fixes the order of elements. A valid value in the wrong place fails schema validation, before any business rule runs. The top level of a Peppol invoice follows this order:
-
CustomizationID,ProfileID -
ID,IssueDate,DueDate,InvoiceTypeCode,Note -
TaxPointDate,DocumentCurrencyCode,BuyerReference -
InvoicePeriod,OrderReference,BillingReference,ContractDocumentReference,AdditionalDocumentReference -
AccountingSupplierParty,AccountingCustomerParty,PayeeParty -
Delivery,PaymentMeans,PaymentTerms -
AllowanceCharge,TaxTotal,LegalMonetaryTotal -
InvoiceLine(one or more)
The sections below follow the reading order of an invoice, not always the XSD order. When you build the file, use the list above. This is a shortened list: the UBL Format Explorer shows every element in schema order.
3.1 Header information
The header contains the invoice number, dates, currency, and references. It also includes the CustomizationID and ProfileID that identify this as a Peppol BIS Billing 3.0 document.
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>INV-2026-042</cbc:ID>
<cbc:IssueDate>2026-11-18</cbc:IssueDate>
<cbc:DueDate>2026-12-18</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>Thank you for your business.</cbc:Note>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>DEPT-FIN-07</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>PO-2026-0042</cbc:ID>
</cac:OrderReference>
<!-- parties, payment, tax, totals and lines follow -->
</Invoice>The InvoiceTypeCode 380 means a standard commercial invoice. For credit notes, you use a different root element (CreditNote) with type code 381. The BuyerReference (BT-10) is a reference the buyer gives you, such as a department code or a cost centre. Peppol rule PEPPOL-EN16931-R003 requires a buyer reference or a purchase order reference in OrderReference. Many buyers reject invoices without the reference they asked for, so send both when you have them.
3.2 Party information (seller and buyer)
Every UBL invoice must identify both the seller (AccountingSupplierParty) and the buyer (AccountingCustomerParty). This includes names, addresses, VAT numbers, and optionally Peppol endpoint identifiers.
<!-- Seller -->
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0208">0123456749</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>Acme BV</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Koningsstraat 1</cbc:StreetName>
<cbc:CityName>Brussels</cbc:CityName>
<cbc:PostalZone>1000</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0123456749</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Acme BV</cbc:RegistrationName>
<cbc:CompanyID schemeID="0208">0123456749</cbc:CompanyID>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<!-- Buyer -->
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0208">0987654394</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>Beta NV</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Meir 50</cbc:StreetName>
<cbc:CityName>Antwerp</cbc:CityName>
<cbc:PostalZone>2000</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0987654394</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Beta NV</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>The EndpointID with schemeID="0208" is the Peppol participant identifier for Belgian companies. It uses the KBO/BCE enterprise number. For other countries, different scheme IDs apply. Peppol makes the electronic address mandatory for both parties (rules PEPPOL-EN16931-R020 and R010). Some companies, particularly in retail and healthcare, use a GLN (scheme 0088) instead. Read more in our guide on Peppol Participant Identifiers.
3.3 Payment information
The payment section specifies how the buyer should pay. It includes the payment means code, a payment reference, and optionally the seller's bank account details.
<cac:PaymentMeans>
<cbc:PaymentMeansCode>58</cbc:PaymentMeansCode>
<cbc:PaymentID>INV-2026-042</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>BE68539007547034</cbc:ID>
<cbc:Name>Acme BV</cbc:Name>
<cac:FinancialInstitutionBranch>
<cbc:ID>BBRUBEBB</cbc:ID>
</cac:FinancialInstitutionBranch>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>Net 30 days</cbc:Note>
</cac:PaymentTerms>Payment means code 58 is a SEPA credit transfer, the usual choice in the euro area. Code 30 is a generic credit transfer and code 59 a SEPA direct debit. For a credit transfer, the IBAN in PayeeFinancialAccount/ID (BT-84) is mandatory. A due date or payment terms are optional since Peppol BIS 3.0.21 removed rule BR-CO-25, but most buyers expect one. The PaymentID is the structured payment reference that appears on the bank statement, making reconciliation easier.
3.4 Invoice lines
Each product or service on the invoice is an InvoiceLine. It contains the item description, quantity, unit price, and the applicable tax category. The line extension amount is the quantity multiplied by the unit price.
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">2</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">500.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>Web development services - March 2026</cbc:Description>
<cbc:Name>Web Development</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">250.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>The unitCode attribute uses UN/ECE Recommendation 20 codes. C62 means "unit" (a generic piece/item). See the full unit code reference in section 5 below. The tax category S with 21% is the Belgian standard VAT rate.
3.5 Tax information
The TaxTotal section provides the total tax amount and a breakdown per tax category and rate. If your invoice has lines with different VAT rates, each rate gets its own TaxSubtotal.
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">105.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">500.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">105.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>The TaxAmount at the top level must equal the sum of all TaxSubtotal amounts. This is one of the EN16931 business rules that validators check. Getting this wrong is one of the most common validation errors.
3.6 Monetary totals
The LegalMonetaryTotal summarizes all amounts on the invoice. It includes the total of all line amounts, the tax-exclusive total, the tax-inclusive total, and the payable amount.
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">500.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">500.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">605.00</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="EUR">605.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>These amounts must be mathematically consistent. LineExtensionAmount is the sum of all InvoiceLine amounts. TaxExclusiveAmount is LineExtensionAmount plus any charges minus any allowances. TaxInclusiveAmount is TaxExclusiveAmount plus the total tax. PayableAmount is what the buyer actually needs to pay (after any prepaid amounts are subtracted).
Optional totals sit between them in this order: AllowanceTotalAmount, ChargeTotalAmount, PrepaidAmount and PayableRoundingAmount. Include AllowanceTotalAmount as soon as the invoice has a document-level discount. The validator checks the sums with rules BR-CO-10, BR-CO-13 and BR-CO-15.
3.7 Document references and delivery
References link the invoice to other documents. They sit in the header, right after BuyerReference. The delivery block sits after the buyer party.
| Element | EN 16931 term | Use it for |
|---|---|---|
cac:OrderReference/cbc:ID | BT-13 Purchase order reference | The buyer's purchase order number |
cac:BillingReference/cac:InvoiceDocumentReference | BG-3 Preceding invoice reference | The original invoice that a credit note corrects |
cac:ContractDocumentReference/cbc:ID | BT-12 Contract reference | A framework contract or subscription |
cac:AdditionalDocumentReference | BG-24 Additional supporting documents | Attachments such as a PDF copy or timesheet |
cac:InvoicePeriod | BG-14 Invoicing period | The start and end date of a billed service period |
cac:Delivery/cbc:ActualDeliveryDate | BT-72 Actual delivery date | The date the goods or services were delivered |
<cac:OrderReference>
<cbc:ID>PO-2026-0042</cbc:ID>
</cac:OrderReference>
<cac:ContractDocumentReference>
<cbc:ID>FRAMEWORK-2026-01</cbc:ID>
</cac:ContractDocumentReference>
<!-- after AccountingCustomerParty -->
<cac:Delivery>
<cbc:ActualDeliveryDate>2026-11-14</cbc:ActualDeliveryDate>
</cac:Delivery>3.8 Allowances and charges
An allowance lowers the amount (a discount). A charge raises it (shipping, a handling fee). Both use cac:AllowanceCharge. The only difference is ChargeIndicator: false for an allowance, true for a charge. At document level, each allowance or charge needs a reason (text or code) and its own VAT category.
<!-- Document-level discount of EUR 50 on the 21% items -->
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="EUR">50.00</cbc:Amount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:AllowanceCharge>- Document-level allowances and charges come after
PaymentTermsand beforeTaxTotal. - They change the taxable amount of their VAT category. In the full example, the 21% taxable amount is 950 + 400 − 50 = 1,300.
- Allowance reason codes come from UNCL5189 (95 = discount). Charge reason codes come from UNCL7161 (for example FC = freight service).
- Line-level allowances go inside
InvoiceLineand have noTaxCategory: the line's own VAT category applies.
Complete UBL 2.1 invoice example (validated)
Here is a full UBL XML invoice example. It has three lines, two VAT rates (21% and 6%), a document-level discount, a buyer reference, an order reference, a delivery date and SEPA payment details. On 18 November 2026 it passed the UBL 2.1 XSD, the EN 16931 rules and the Peppol BIS Billing 3.0 rules with zero errors and zero warnings. The company numbers have valid check digits but belong to no real company.
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>INV-2026-042</cbc:ID>
<cbc:IssueDate>2026-11-18</cbc:IssueDate>
<cbc:DueDate>2026-12-18</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>Thank you for your business.</cbc:Note>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>DEPT-FIN-07</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>PO-2026-0042</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0208">0123456749</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>Acme BV</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Koningsstraat 1</cbc:StreetName>
<cbc:CityName>Brussels</cbc:CityName>
<cbc:PostalZone>1000</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0123456749</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Acme BV</cbc:RegistrationName>
<cbc:CompanyID schemeID="0208">0123456749</cbc:CompanyID>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0208">0987654394</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>Beta NV</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Meir 50</cbc:StreetName>
<cbc:CityName>Antwerp</cbc:CityName>
<cbc:PostalZone>2000</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0987654394</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Beta NV</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:Delivery>
<cbc:ActualDeliveryDate>2026-11-14</cbc:ActualDeliveryDate>
</cac:Delivery>
<cac:PaymentMeans>
<cbc:PaymentMeansCode>58</cbc:PaymentMeansCode>
<cbc:PaymentID>INV-2026-042</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>BE68539007547034</cbc:ID>
<cbc:Name>Acme BV</cbc:Name>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>Net 30 days</cbc:Note>
</cac:PaymentTerms>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="EUR">50.00</cbc:Amount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:AllowanceCharge>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">276.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">1300.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">273.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">50.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">3.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>6</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">1400.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">1350.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">1626.00</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID="EUR">50.00</cbc:AllowanceTotalAmount>
<cbc:PayableAmount currencyID="EUR">1626.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="HUR">10</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">950.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Integration consulting</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">95.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>2</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">400.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Software licence, annual</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">400.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>3</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">2</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">50.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Printed user manual</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>6</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">25.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>How the totals add up
Most validation errors come from totals that do not match. This is the arithmetic behind the example above.
| Field | UBL element | Calculation | Value (EUR) |
|---|---|---|---|
| Sum of line net amounts (BT-106) | LineExtensionAmount | 950 + 400 + 50 | 1,400.00 |
| Sum of allowances (BT-107) | AllowanceTotalAmount | one discount | 50.00 |
| Total without VAT (BT-109) | TaxExclusiveAmount | 1,400 − 50 | 1,350.00 |
| VAT at 21% (BT-117) | TaxSubtotal/TaxAmount | (950 + 400 − 50) × 21% | 273.00 |
| VAT at 6% (BT-117) | TaxSubtotal/TaxAmount | 50 × 6% | 3.00 |
| Total VAT (BT-110) | TaxTotal/TaxAmount | 273 + 3 | 276.00 |
| Total with VAT (BT-112) | TaxInclusiveAmount | 1,350 + 276 | 1,626.00 |
| Amount due (BT-115) | PayableAmount | no prepaid amount | 1,626.00 |
Paste the example into the free Peppol validator to check it yourself, or open it in the Peppol Invoice Viewer to see how a receiver displays it. To generate your own sample, use the Peppol invoice generator.
UBL credit note example
A credit note corrects or cancels an invoice. In UBL it is a separate document with its own root element and namespace. It is not an invoice with negative amounts. This credit note cancels the software licence line of the invoice above. It passed the same three validation layers on 18 November 2026.
<?xml version="1.0" encoding="UTF-8"?>
<CreditNote xmlns="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>CN-2026-007</cbc:ID>
<cbc:IssueDate>2026-11-25</cbc:IssueDate>
<cbc:CreditNoteTypeCode>381</cbc:CreditNoteTypeCode>
<cbc:Note>Licence cancelled within the trial period.</cbc:Note>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>DEPT-FIN-07</cbc:BuyerReference>
<cac:BillingReference>
<cac:InvoiceDocumentReference>
<cbc:ID>INV-2026-042</cbc:ID>
<cbc:IssueDate>2026-11-18</cbc:IssueDate>
</cac:InvoiceDocumentReference>
</cac:BillingReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0208">0123456749</cbc:EndpointID>
<cac:PostalAddress>
<cbc:CityName>Brussels</cbc:CityName>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0123456749</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Acme BV</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0208">0987654394</cbc:EndpointID>
<cac:PostalAddress>
<cbc:CityName>Antwerp</cbc:CityName>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Beta NV</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentTerms>
<cbc:Note>Amount will be refunded within 14 days.</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">84.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">400.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">84.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">400.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">400.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">484.00</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="EUR">484.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:CreditNoteLine>
<cbc:ID>1</cbc:ID>
<cbc:CreditedQuantity unitCode="C62">1</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">400.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Software licence, annual</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">400.00</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
</CreditNote>The differences with an invoice:
- The root is
CreditNotewith the namespaceurn:oasis:names:specification:ubl:schema:xsd:CreditNote-2. -
CreditNoteTypeCode381 replacesInvoiceTypeCode380. -
CreditNoteLineandCreditedQuantityreplaceInvoiceLineandInvoicedQuantity. -
BillingReferencepoints to the original invoice number and date (BT-25 and BT-26). Peppol does not make it mandatory, but receivers need it to match the credit note. - Amounts stay positive. The document type already says that the money goes back to the buyer.
- A credit note has no
DueDateelement at document level. UsePaymentTermsto say when you refund.
For edge cases such as partial credits and negative lines, read Peppol credit notes and negative amounts.
Key UBL fields mapped to EN 16931
EN 16931 names every business term with a BT number. Validation errors and specifications use those numbers, so this table maps the fields you need most to their UBL 2.1 path. "Required" means required for a Peppol BIS Billing 3.0 invoice.
| BT | Business term | UBL 2.1 element | Required |
|---|---|---|---|
| BT-1 | Invoice number | cbc:ID | Yes |
| BT-2 | Issue date | cbc:IssueDate | Yes |
| BT-3 | Invoice type code | cbc:InvoiceTypeCode | Yes |
| BT-5 | Invoice currency | cbc:DocumentCurrencyCode | Yes |
| BT-9 | Due date | cbc:DueDate | Due date or payment terms if amount due > 0 |
| BT-10 | Buyer reference | cbc:BuyerReference | BT-10 or BT-13 |
| BT-13 | Purchase order reference | cac:OrderReference/cbc:ID | BT-10 or BT-13 |
| BT-23 | Business process type | cbc:ProfileID | Yes |
| BT-24 | Specification identifier | cbc:CustomizationID | Yes |
| BT-27 | Seller name | AccountingSupplierParty/…/PartyLegalEntity/cbc:RegistrationName | Yes |
| BT-31 | Seller VAT identifier | AccountingSupplierParty/…/PartyTaxScheme/cbc:CompanyID | When VAT is charged |
| BT-34 | Seller electronic address | AccountingSupplierParty/cac:Party/cbc:EndpointID | Yes (Peppol) |
| BT-40 | Seller country code | AccountingSupplierParty/…/cac:Country/cbc:IdentificationCode | Yes |
| BT-44 | Buyer name | AccountingCustomerParty/…/PartyLegalEntity/cbc:RegistrationName | Yes |
| BT-49 | Buyer electronic address | AccountingCustomerParty/cac:Party/cbc:EndpointID | Yes (Peppol) |
| BT-55 | Buyer country code | AccountingCustomerParty/…/cac:Country/cbc:IdentificationCode | Yes |
| BT-81 | Payment means type code | cac:PaymentMeans/cbc:PaymentMeansCode | Inside each PaymentMeans |
| BT-84 | Payment account (IBAN) | cac:PayeeFinancialAccount/cbc:ID | For credit transfers |
| BT-106 | Sum of line net amounts | LegalMonetaryTotal/cbc:LineExtensionAmount | Yes |
| BT-109 | Total without VAT | LegalMonetaryTotal/cbc:TaxExclusiveAmount | Yes |
| BT-110 | Total VAT amount | cac:TaxTotal/cbc:TaxAmount | Yes |
| BT-112 | Total with VAT | LegalMonetaryTotal/cbc:TaxInclusiveAmount | Yes |
| BT-115 | Amount due for payment | LegalMonetaryTotal/cbc:PayableAmount | Yes |
| BT-118 | VAT category code | cac:TaxSubtotal/cac:TaxCategory/cbc:ID | Yes |
| BT-129 / BT-130 | Invoiced quantity and unit | cbc:InvoicedQuantity/@unitCode | Yes |
| BT-131 | Line net amount | cac:InvoiceLine/cbc:LineExtensionAmount | Yes |
| BT-146 | Item net price | cac:Price/cbc:PriceAmount | Yes |
| BT-151 | Line VAT category code | cac:ClassifiedTaxCategory/cbc:ID | Yes |
| BT-153 | Item name | cac:Item/cbc:Name | Yes |
EN 16931 has about 160 business terms in total. The EN16931 Field Mapper covers all of them, with the matching CII path for each.
4. VAT category codes
Every invoice line and tax subtotal must reference a VAT category code. These codes tell the recipient which tax treatment applies. Here are all the codes defined in the Peppol BIS Billing 3.0 specification.
| Code | Description | When to use |
|---|---|---|
S | Standard rate | Most common. Used for regular domestic invoices with a VAT percentage (e.g., 21% in Belgium, 19% in Germany). |
Z | Zero rated goods | Goods taxed at 0% rate. Different from exempt: you still report the transaction. |
E | Exempt from tax | Services or goods that are exempt from VAT by law (e.g., medical services, education). |
AE | VAT Reverse Charge | Intra-EU B2B transactions where the buyer accounts for VAT. This is the most common code for cross-border EU invoices. |
K | VAT exempt for EEA intra-community supply | Supply of goods within the EEA where the supply is exempt from VAT. |
G | Free export item, VAT not charged | Exports to countries outside the EU. |
O | Services outside scope of tax | Transactions that fall entirely outside the scope of VAT (e.g., some government fees). |
L | Canary Islands general indirect tax (IGIC) | Specific to Canary Islands tax regime. |
M | Tax for Ceuta and Melilla (IPSI) | Specific to Ceuta and Melilla tax regime. |
B | Transferred (VAT), Italy | Specific to Italian split payment mechanism. |
Practical tip
For regular domestic invoices, use S with the applicable VAT percentage (21%, 12% or 6% in Belgium, for example). For services to a business in another EU country, use AE (reverse charge) with 0%. For goods shipped to a business in another EU country, use K (intra-community supply) with 0%.
Categories E, AE, K, G and O need an exemption reason. Put it in TaxExemptionReasonCode (BT-121, a VATEX code) or TaxExemptionReason (BT-120, free text), inside the TaxCategory of the VAT breakdown:
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">1000.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>AE</cbc:ID>
<cbc:Percent>0</cbc:Percent>
<cbc:TaxExemptionReasonCode>VATEX-EU-AE</cbc:TaxExemptionReasonCode>
<cbc:TaxExemptionReason>Reverse charge</cbc:TaxExemptionReason>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>5. Unit codes
Every invoice line needs a unit code in the InvoicedQuantity attribute. These come from UN/ECE Recommendation 20. Here are the most commonly used codes for e-invoicing.
| Code | Unit | Example |
|---|---|---|
C62 | Unit / piece | Generic items, licenses, subscriptions |
HUR | Hour | Consulting, development, support services |
DAY | Day | Daily rates, rentals |
MON | Month | Monthly subscriptions, retainers |
WEE | Week | Weekly rates |
MIN | Minute | Telecom services, per-minute billing |
KGM | Kilogram | Goods sold by weight |
LTR | Litre | Liquids, fuel |
MTR | Metre | Cable, fabric, construction materials |
KWH | Kilowatt hour | Electricity, energy services |
For most service-based businesses, C62 (unit) and HUR (hour) are the only codes you need. The full list contains hundreds of codes, but these ten cover the vast majority of use cases.
6. Document types
UBL defines multiple document types for different business scenarios. The Peppol network supports a growing list, but these are the most relevant for e-invoicing.
| Document type | Description | UBL root element |
|---|---|---|
| Invoice | Standard commercial invoice requesting payment | Invoice |
| Credit Note | Corrects or cancels a previously issued invoice. Amounts must be positive; the document type (381) indicates the credit. | CreditNote |
| Self-Billing Invoice | Invoice created by the buyer on behalf of the seller | Invoice (type code 389) |
| Order | Purchase order from buyer to seller | Order |
| Order Response | Seller's response to a purchase order | OrderResponse |
| Despatch Advice | Shipping notification from seller to buyer | DespatchAdvice |
For the Belgian e-invoicing mandate, you primarily need Invoice and Credit Note. Self-billing invoices are used in specific scenarios where the buyer creates the invoice. Read our guide on self-billing for details. To see a valid example, try the self-billing UBL invoice generator.
7. Attachments
You can embed files in a UBL invoice using the AdditionalDocumentReference element. The file content is base64-encoded and included directly in the XML. Common attachments include a PDF version of the invoice, timesheets, contracts, or delivery receipts. If you only have UBL and need a PDF copy, our Peppol to PDF converter generates one in seconds. Going the other way? If your invoices only exist as PDF, our PDF to Peppol UBL conversion service turns them into UBL and sends them for you.
<cac:AdditionalDocumentReference>
<cbc:ID>ATT-001</cbc:ID>
<cbc:DocumentDescription>Invoice PDF</cbc:DocumentDescription>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject
mimeCode="application/pdf"
filename="INV-2026-001.pdf">
JVBERi0xLjQKMSAwIG9iago8PC9UeXBlIC9DYXRhbG9n...
</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>The mimeCode tells the recipient what type of file it is. Common values are application/pdf, image/png, and image/jpeg. Keep in mind that attachments increase the document size. Peppol has a maximum message size of approximately 100 MB, but most Access Points recommend keeping it under 10 MB for reliable delivery.
8. Validation rules
Before a UBL invoice can be sent via Peppol, it must pass three layers of validation. If any layer fails, the document is rejected and never delivered.
XML Schema Validation
Checks that the document is well-formed XML and conforms to the UBL 2.1 schema. This catches structural errors like missing required elements, wrong element order, or invalid data types.
EN16931 Schematron Validation
Checks business rules defined by the European standard. For example: mathematical consistency of amounts, valid currency codes, mandatory fields for specific VAT categories, and correct use of tax codes.
Peppol Validation Artifacts
Checks Peppol-specific rules that go beyond EN16931. This includes the correct CustomizationID and ProfileID, country-specific requirements, and additional constraints on code lists.
The validator reports every failure with a rule ID. These are the ones we see most often:
| Rule | What went wrong | Fix |
|---|---|---|
BR-CO-15 | Total with VAT does not equal total without VAT plus VAT | Recalculate TaxInclusiveAmount from the rounded totals |
BR-CO-13 | Total without VAT does not match lines minus allowances plus charges | Add AllowanceTotalAmount or ChargeTotalAmount when you use AllowanceCharge |
BR-CO-10 | Sum of line net amounts does not match the lines | Sum the rounded LineExtensionAmount of every line |
PEPPOL-EN16931-R120 | Line net amount is not quantity times price | Round each line to 2 decimals after multiplying |
PEPPOL-EN16931-R003 | No buyer reference and no order reference | Add BuyerReference or OrderReference/ID |
PEPPOL-EN16931-R010 / R020 | Buyer or seller EndpointID missing | Add EndpointID with a valid schemeID, such as 0208 or 0088 |
PEPPOL-EN16931-R004 | Wrong CustomizationID | Copy the exact value from the header example |
BR-AE, BR-E, BR-IC rules | Exempt VAT category with a non-zero rate or no exemption reason | Use 0% and add TaxExemptionReasonCode |
The e-invoice.be API validates all three layers automatically before sending. If something is wrong, you get an error message that names the rule that failed. To check a file by hand, paste it into the freePeppol validator. For a fix for each common rule, readPeppol UBL errors and how to fix themandthe best Peppol validation tools.
9. The easy way: skip UBL entirely
Understanding UBL is valuable for debugging and integration work. But you do not have to write UBL XML yourself. The e-invoice.be API accepts a simple JSON structure and converts it to a fully validated Peppol BIS Billing 3.0 UBL document automatically. Invoicing from an ERP instead? You can connect your ERP to Peppol without an IT project. Prefer the terminal? The open-source Peppol command-line tool sends and validates invoices from a shell script.
Here is a shortened version of the example invoice as a JSON API call. The fields are flat: no nested seller or buyer objects.
POST https://api.e-invoice.be/api/documents/
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"document_type": "INVOICE",
"invoice_id": "INV-2026-042",
"invoice_date": "2026-11-18",
"due_date": "2026-12-18",
"currency": "EUR",
"buyer_reference": "DEPT-FIN-07",
"purchase_order": "PO-2026-0042",
"vendor_name": "Acme BV",
"vendor_tax_id": "BE0123456749",
"vendor_address": "Koningsstraat 1, 1000 Brussels, BE",
"customer_name": "Beta NV",
"customer_tax_id": "BE0987654394",
"customer_peppol_id": "0208:0987654394",
"items": [
{
"description": "Integration consulting",
"quantity": 10,
"unit_price": 95.00,
"tax_rate": 21
},
{
"description": "Software licence, annual",
"quantity": 1,
"unit_price": 400.00,
"tax_rate": 21
}
]
}That is it. No XML namespaces, no CustomizationID, no TaxScheme elements. The API handles the conversion, validates against all three rule sets, and sends the invoice via Peppol. If the recipient is not on Peppol, you get a clear error before any charge applies.
Already produce UBL in your ERP? Send the file as it is with POST /api/documents/ubl. Pricing is from €0.25 per document with prepaid credits and no subscription. Read our full API integration guide for code examples in Python, TypeScript, Java, PHP, and Ruby.
UBL meaning: what does UBL stand for?
UBL stands for Universal Business Language. The UBL meaning is exactly what the full form suggests: a single vendor-neutral vocabulary that any business application can use to exchange documents. UBL is an XML standard maintained by OASIS, the same organisation behind SAML and ODF. When people ask "what is UBL", "what does UBL mean", or "what is a UBL file", the short answer is: it is a standardised XML invoice (or credit note, order, despatch advice and so on) used by Peppol BIS Billing 3.0 in Europe and by other frameworks worldwide.
UBL vs XML: are they the same thing?
UBL is not the same as XML. XML is the underlying syntax (a generic markup language). UBL is a specific XML vocabulary: it defines which tags, attributes, and structures are allowed inside an invoice. Every UBL file is XML, but not every XML invoice is UBL. If your ERP produces a custom XML invoice format and you need to send via Peppol, you will need an XML to UBL converter (or a Peppol Access Point that does the conversion). Our API accepts JSON and converts to valid UBL XML automatically, so you never have to hand-write the XSD-compliant schema yourself.
UBL vs CII: the two EN 16931 syntaxes
EN 16931 allows two XML syntaxes for the same invoice data: UBL and UN/CEFACT Cross Industry Invoice (CII). The business terms are identical. The XML is not.
| UBL 2.1 | CII (D16B) | |
|---|---|---|
| Maintained by | OASIS | UN/CEFACT |
| Root element | Invoice or CreditNote | rsm:CrossIndustryInvoice |
| Credit note | Separate CreditNote document | Same root, type code 381 |
| Peppol BIS Billing 3.0 | Required | Not used |
| Typical use | Peppol networks worldwide, XRechnung (UBL variant) | Factur-X, ZUGFeRD, XRechnung (CII variant) |
If a supplier sends you CII, convert it before you send it on Peppol. The free CII to UBL converter does that in the browser, and the format detector tells you which syntax a file uses. For the PDF-based formats, see our guides to Factur-X and ZUGFeRD vs XRechnung.
UBL versions: 2.0, 2.1, 2.4, 2.5 and UBL 3.0
OASIS has released six UBL 2.x versions. Each one adds document types and elements and stays backward compatible with UBL 2.1.
| Version | OASIS Standard | Notes |
|---|---|---|
| UBL 2.0 | 2006 | First UBL 2 release. UBL 1.0 dates from 2004 |
| UBL 2.1 | 2013 | Peppol and EN 16931 baseline. Also ISO/IEC 19845:2015 |
| UBL 2.2 | July 2018 | New document types, backward compatible |
| UBL 2.3 | June 2021 | New document types, backward compatible |
| UBL 2.4 | June 2024 | New document types, backward compatible |
| UBL 2.5 | August 2026 | Latest release. 101 document types (up from 93 in 2.4) |
There is no UBL 3.0. The "3.0" you see in search results belongs to profiles, not to UBL itself. Peppol BIS Billing 3.0 is the Peppol profile on UBL 2.1. UBL.BE Invoice 3.0 is an older Belgian profile. It is a conformant extension of EN 16931, not a compliant profile, so it cannot be used for mandate-compliant B2B invoicing in Belgium. Use Peppol BIS Billing 3.0 instead.
For Peppol traffic today you only need UBL 2.1. A newer UBL release does not change what Peppol accepts: OpenPeppol decides when a new syntax version enters the network. The official package is at OASIS UBL 2.1.
Where the UBL invoice format is used
UBL is one of the most widely used e-invoice syntaxes in the world. These are the main networks and national formats that use it, as of November 2026.
| Country or network | Format | Based on |
|---|---|---|
| Peppol countries in Europe (Belgium, the Netherlands, the Nordics and others) | Peppol BIS Billing 3.0 | UBL 2.1 |
| Netherlands | NLCIUS (public sector) | UBL 2.1 or CII |
| Germany | XRechnung | UBL 2.1 or CII |
| France | Reform base formats | UBL, CII or Factur-X |
| Denmark | OIOUBL and Peppol BIS | UBL |
| Australia and New Zealand | Peppol PINT A-NZ | UBL 2.1 |
| Singapore | InvoiceNow (Peppol PINT SG) | UBL 2.1 |
| Japan | JP PINT (Peppol) | UBL 2.1 |
| Malaysia | MyInvois | UBL 2.1 in XML or JSON |
| Saudi Arabia | ZATCA e-invoicing (FATOORAH) | UBL 2.1 |
| Turkey | e-Fatura (UBL-TR) | UBL 2.1 |
The UBL syntax is the same everywhere. The profile changes: each one adds its own required fields and code lists. A Peppol BIS invoice is not automatically a valid ZATCA or UBL-TR invoice. The e-invoicing mandate matrix shows the format and timeline per country.
How to open and read a UBL file
A UBL file is plain text, so any text editor or browser can open it. That shows the raw XML, which is hard to read for anyone who is not a developer. Better options:
- In a viewer: the free Peppol Invoice Viewer shows the seller, buyer, lines, VAT and payment details as a normal invoice. The file stays in your browser.
- As a PDF: the Peppol to PDF converter turns the XML into a PDF you can print or archive. Many UBL files also carry a PDF copy of the invoice in
AdditionalDocumentReference, see section 7. - In Excel: use Data, Get Data, From File, From XML. Excel flattens the nested structure into many columns, so this works for bulk analysis but not for reading one invoice.
- To check the structure: the UBL Format Explorer explains each element, and the Peppol validator tells you whether the file is valid.
You can recognise a UBL invoice by its first lines: the root element is Invoice or CreditNote with a namespace that starts with urn:oasis:names:specification:ubl:schema:xsd.
UBL XSD schema and Peppol BIS Billing 3.0 XSD
The UBL 2.1 invoice XSD schema lives in the OASIS UBL 2.1 package, in the xsd/maindoc folder as UBL-Invoice-2.1.xsd and UBL-CreditNote-2.1.xsd. Peppol BIS Billing 3.0 reuses the UBL 2.1 XSD without modification. There is no separate "Peppol BIS Billing 3.0 XSD": validation against Peppol rules is done with Schematron files on top of the UBL 2.1 schema, published by OpenPeppol as validation artifacts. The root namespace is urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 for an invoice and urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2 for a credit note.
UBL in other languages: factuur, facture, factura, Rechnung
The UBL standard is language-neutral, but the search terms vary by country. A UBL factuur (Dutch), facture UBL (French), factura UBL (Spanish) and UBL Rechnung (German) all refer to the same artefact: an EN16931-compliant invoice serialised as UBL 2.1 XML. National profiles sit on top of UBL: OIOUBL in Denmark, XRechnung UBL in Germany, UBL-TR in Turkey. Asking "UBL nedir", "UBL formatı nedir", "fatura UBL nedir" (Turkish), "UBL kya hota hai" (Hindi) or "UBL คือ" (Thai)? The answer is the same Universal Business Language defined by OASIS and used by Peppol.
UBL invoice and credit note examples (copy-paste ready)
Looking for a UBL 2.1 invoice example XML, a Peppol BIS 3.0 invoice example or a UBL credit note example? Use these two:
- Complete UBL 2.1 invoice: three lines, 21% and 6% VAT, a discount, order reference and SEPA payment.
- UBL credit note: cancels one line and refers to the original invoice.
Both passed UBL 2.1 XSD, EN 16931 and Peppol BIS Billing 3.0 validation on 18 November 2026. OpenPeppol also publishes reference examples for every document type on docs.peppol.eu.
Invoice type codes and unit codes in UBL
UBL invoices use UN/CEFACT code lists. The most common InvoiceTypeCode values are 380 for a commercial invoice and 389 for a self-billed invoice. A credit note uses CreditNoteTypeCode 381. The default unit code for "one piece" is C62 from UN/ECE Recommendation 20. Rule BR-CL-23 requires the unit code to come from UN/ECE Recommendation 20, with the Recommendation 21 extension. The full list is in the Peppol BIS Billing 3.0 code lists.
10. Frequently asked questions
What is the UBL file format?
UBL (Universal Business Language) is an XML-based file format maintained by OASIS for electronic business documents. It is the required format for Peppol e-invoicing in Europe. UBL defines a structured way to represent invoices, credit notes, and other documents so they can be exchanged between different systems without manual re-entry. UBL files have the .xml extension.
Is UBL the same as XML?
UBL is not the same as XML, but it is built on XML. XML (eXtensible Markup Language) is the underlying technology. UBL is a specific XML vocabulary that defines the structure and fields for business documents like invoices and credit notes. Think of XML as the language and UBL as a dictionary within that language.
What is the date format for UBL?
UBL uses the ISO 8601 date format: YYYY-MM-DD. For example, March 22, 2026 is written as 2026-03-22. This applies to all date fields in a UBL invoice, including IssueDate, DueDate, and TaxPointDate. Time fields use the format HH:MM:SS.
What version of UBL does Peppol use?
Peppol uses UBL 2.1 as defined by OASIS, even though newer UBL versions exist (UBL 2.5 became an OASIS Standard in August 2026). Peppol BIS Billing 3.0 requires documents that comply with the EN16931 European standard and use UBL 2.1 syntax. The root namespace is urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 for invoices and urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2 for credit notes.
Do I need to write UBL XML manually?
No. Most Peppol Access Points, including e-invoice.be, accept invoice data in simpler formats like JSON and convert it to valid UBL XML automatically. You only need to understand UBL if you want to work with the raw XML directly or debug validation errors.
What is EN16931 and how does it relate to UBL?
EN16931 is the European standard for the semantic data model of electronic invoices. It defines what fields an e-invoice must contain. UBL is one of the two syntaxes (the other being CII) that can represent an EN16931-compliant invoice. Peppol chose UBL as its syntax. You can view CII invoices with our free ZUGFeRD Viewer at e-invoice.be/zugferd-viewer.
What are the main sections of a UBL invoice?
A UBL invoice has six main sections: header information (invoice number, dates, references), party information (seller and buyer details), payment information (payment terms and bank details), invoice lines (products or services), tax information (VAT breakdown), and monetary totals (summary amounts).
What VAT category codes are used in UBL invoices?
The most common VAT category codes are: S (standard rate), Z (zero rated), E (exempt from tax), AE (VAT reverse charge), K (intra-community supply of goods and services in the EEA), G (free export, VAT not charged), O (services outside scope of tax), and L and M for the Canary Islands and Ceuta and Melilla. Categories E, AE, K, G and O need an exemption reason, as text or as a VATEX code.
How are UBL invoices validated?
UBL invoices go through three validation layers: XML Schema validation (checks the document structure), Schematron validation (checks EN16931 business rules), and Peppol validation artifacts (checks Peppol-specific rules). The e-invoice.be API handles all three layers automatically.
Can I attach files like PDFs to a UBL invoice?
Yes. UBL supports attachments via the AdditionalDocumentReference element. Files are base64-encoded and embedded in the XML with a MIME type and filename. Common attachments include PDF copies of the invoice, timesheets, or delivery notes.
What does UBL mean?
UBL means Universal Business Language. It is an open XML standard maintained by OASIS that defines a shared vocabulary for business documents like invoices, credit notes, orders, and despatch advices. The UBL meaning in a Peppol context is narrower: it refers specifically to UBL 2.1 invoice and credit note documents that comply with EN16931 and Peppol BIS Billing 3.0.
What is a UBL file? (ubl bestand)
A UBL file is a plain-text XML file that follows the UBL 2.1 schema. The file extension is .xml. In Dutch it is called a UBL-bestand or UBL factuur, in French a fichier UBL or facture UBL. The content starts with an <Invoice> or <CreditNote> root element and contains structured fields for parties, invoice lines, taxes, and totals. Any text editor can open a UBL file, but a UBL viewer is easier for reading the data.
Is UBL the e-invoicing standard for Belgium?
Yes. Since January 2026, Belgian B2B e-invoices must be sent over the Peppol network in UBL 2.1 XML, following Peppol BIS Billing 3.0. UBL XML for Belgium is identical to UBL XML for the rest of the Peppol network. Belgian invoices use the same EN16931 fields, the same VAT category codes, and the same UBL 2.1 schema as invoices from any other Peppol country. The older UBL.BE Invoice 3.0 profile is a conformant extension of EN16931, not a compliant profile, so it cannot be used for mandate-compliant B2B invoicing in Belgium.
Where can I download the UBL 2.1 XSD schema?
The official UBL 2.1 XSD schema files are published by OASIS at docs.oasis-open.org/ubl/os-UBL-2.1/. The Peppol BIS Billing 3.0 schematron rules (which sit on top of the UBL XSD) are published by OpenPeppol at docs.peppol.eu. Most implementers do not need to download the XSD: they validate against a hosted service like the e-invoice.be Peppol Invoice Viewer or the API validator endpoint, which apply all three layers (XSD, EN16931, Peppol BIS) in one call.
How does Simpler Invoicing relate to UBL?
Simpler Invoicing was the Dutch e-invoicing initiative that became the basis for what is now Peppol BIS Billing 3.0. The Dutch NLCIUS profile is a national Core Invoice Usage Specification on top of EN16931, also expressed in UBL 2.1. So an invoice generated by a Simpler Invoicing implementation is a UBL XML document, and it travels over the same Peppol network as Belgian, French, and German invoices.
How do I convert XML or JSON to UBL?
You map the source fields (invoice number, dates, parties, lines, tax, totals) to their UBL 2.1 equivalents. The e-invoice.be API accepts a flat JSON payload and produces conformant Peppol BIS Billing 3.0 UBL XML automatically, so you never have to write an XSLT or template by hand. For one-off conversions, the Peppol Invoice Viewer can ingest a UBL or CII XML file and show you the rendered invoice.
Is there a free UBL validator?
Yes. The free UBL validator at e-invoice.be/peppol-validator runs the same three layers of validation as a Peppol Access Point: XML schema (UBL 2.1 XSD), EN16931 business rules, and Peppol BIS Billing 3.0 schematron. Paste or upload your UBL XML and you get a pass/fail result plus the exact rule ID for any error. No registration is needed. You can also call validation via the e-invoice.be API.
What is UBL called in other languages?
UBL is the same standard everywhere, only the word changes. In Dutch it is UBL formaat, UBL bestand, UBL factuur, or UBL standaard. In French it is format UBL, facture UBL, or fichier UBL. In German you will see UBL-Format or UBL-Rechnung. The underlying UBL 2.1 XML and Peppol BIS Billing 3.0 profile are identical regardless of the language used to describe them.
Can you give a sample UBL invoice?
Yes. This guide contains a complete UBL 2.1 invoice with three lines, two VAT rates, a document-level discount, an order reference and SEPA payment details, plus a matching credit note. Both pass UBL 2.1 XSD, EN16931 and Peppol BIS Billing 3.0 validation with zero errors and zero warnings (checked on 18 November 2026). Copy them, change the parties and amounts, and validate the result with the free Peppol validator.
What is the difference between UBL 2.0 and UBL 2.1?
UBL 2.1 (OASIS Standard, 2013) is a backward-compatible revision of UBL 2.0 (2006). It added new document types and elements, and it is the version that became the international standard ISO/IEC 19845:2015. Both are XML. EN16931 and Peppol BIS Billing 3.0 are defined on UBL 2.1, so a UBL 2.0 invoice is not accepted on Peppol.
Is there a UBL 3.0?
No. As of November 2026 there is no UBL 3.0 standard. The latest OASIS release is UBL 2.5, approved in August 2026. When people say UBL 3.0 they usually mean Peppol BIS Billing 3.0 or the Belgian UBL.BE Invoice 3.0 profile. Both are profile versions that use UBL 2.1 syntax.
What is the difference between UBL and Peppol BIS?
UBL is the XML syntax: it defines the element names and their order. EN16931 defines which business fields an invoice needs. Peppol BIS Billing 3.0 is a profile that adds Peppol rules on top, such as the mandatory electronic address of buyer and seller and the allowed code lists. Every Peppol BIS invoice is a UBL 2.1 file, but not every UBL 2.1 file is a valid Peppol BIS invoice.
How do I open a UBL file in Excel or as a PDF?
A UBL file is XML, so Excel can import it (Data, Get Data, From XML), but the nested structure gives a hard-to-read table. A UBL viewer is faster. The free Peppol Invoice Viewer at e-invoice.be/peppol-invoice-viewer shows the invoice in your browser without uploading it, and the Peppol to PDF converter at e-invoice.be/peppol-to-pdf turns the XML into a readable PDF.
Further resources
- Peppol BIS Billing 3.0 documentation (official Peppol specification)
- OASIS UBL 2.1 standard (UBL invoice 2.1 documentation and full specification)
- E-Invoicing API integration guide (send invoices with JSON, not XML)
- Self-billing guide (how self-billing works with Peppol)
- Peppol Invoice Viewer (read UBL documents in your browser)
- Peppol validator (check a UBL file against XSD, EN 16931 and Peppol BIS rules)
- Peppol UBL errors (the most common validation errors and their fixes)
Ready to send Peppol e-invoices?
Skip the UBL complexity. Create an account, send JSON, and we handle the rest. Validation, conversion, and Peppol delivery included. From €0.25 per document, prepaid credits, no subscription.

Tom Van Asbroeck
Co-founder, Peppol & tax expert
Tom is a co-founder of e-invoice.be and runs its operations. He helps companies and software vendors connect to Peppol and answers their questions on e-invoicing rules and VAT.
- Co-founder of e-invoice.be, a certified Peppol Access Point
- Hosts the 15-minute Peppol discovery calls
- Follows the e-invoicing mandates in Belgium, France and Germany
Building a UBL integration? Talk to the engineer who built ours.
Review your invoice mapping, get answers on BIS 3.0 edge cases, and see what we'd do differently. 15 minutes, one of our engineers, no sales pitch.
Vendor-neutral. No obligation to switch platforms.

Hosted by Tom Van Asbroeck
Peppol & tax expert