Skip to content
Switch To Transalis
← All articleseInvoicing

What is a UBL invoice? The format inside a Peppol eInvoice

A plain guide to the Universal Business Language: who maintains it, how it relates to EN 16931 and Peppol BIS Billing 3.0, each field in a UBL invoice, and how it compares with CII, Factur-X, EDI and PDF.

Transalis

Most of what goes into one already sits in a supplier's systems: the customer's order reference, the delivery date, the lines, the prices and the VAT. UBL gives each value a named tag, in a set sequence, so the system at the other end knows where to look.

Short answer

A UBL invoice is an invoice written as an XML file in the Universal Business Language (UBL), an open standard owned by OASIS and published as ISO/IEC 19845. On the Peppol network, invoices follow the Peppol BIS Billing 3.0 rules and are written in UBL 2.1, so the buyer's system can read the data without retyping.

What is a UBL invoice?

It is the invoice's data as tagged XML text, written to an open standard. OASIS describes UBL as "a generic XML interchange format for business documents that can be restricted or extended to meet the requirements of particular industries". It is a library of document types, including Order, Despatch Advice and Invoice.

UBL 2.1 defines the Invoice as "A document used to request payment." A credit note is a separate document type, the Credit Note.

UBL is the file. Peppol is the network, and the rule set, that carries it. Transalis's Peppol guide describes Peppol as "an international network and set of standards for sending invoices, orders and other documents straight between systems".

Who maintains UBL?

OASIS does. The UBL committee's page says: "UBL is owned by OASIS and is available to all, with no royalty fees." The OASIS specification adds: "UBL has been developed since 2001 and standardized by ISO as ISO/IEC 19845."

Peppol uses UBL 2.1. OASIS has since published later 2.x versions, which are minor revisions: "UBL documents conforming to a given UBL version are and shall always be conforming to subsequent minor revisions of that UBL version."

How do UBL, EN 16931 and Peppol BIS Billing 3.0 fit together?

Each layer answers a different question.

LayerWhat it setsPublished by
EN 16931The semantic data model: what an electronic invoice saysCEN, at the request of the European Commission
UBL 2.1One of the two syntaxes for EN 16931: how the invoice is writtenOASIS
Peppol BIS Billing 3.0A Core Invoice Usage Specification (CIUS) of EN 16931: the rules an invoice follows on PeppolOpenPeppol

The European Commission lists among the parts of EN 16931 "The two mandatory syntaxes that comply with the standard". One is UBL 2.1. The other is the UN/CEFACT Cross Industry Invoice, known as CII. The EN 16931 guide covers the standard itself.

Peppol BIS Billing 3.0 sits on top: "Any instance documents compliant to this specification will be compliant with the European Standard (EN 16931)."

Is CII allowed on Peppol? Yes, as an option. The specification "supports the optional use of the UN/CEFACT XML Cross Industry Invoice, D16B (CII)", for receivers who register to take it "alongside the mandatory UBL version". The how to send a Peppol invoice page agrees: "The invoice is written in UBL 2.1, which every Access Point must handle."

What is inside a UBL invoice?

The same business fields as any invoice, each in a named element. The what is an invoice guide covers what a UK invoice shows. Element names and cardinalities below come from OpenPeppol's BIS Billing 3.0 UBL Invoice structure page: 1..1 means exactly one, 0..1 none or one, 1..n one or more, 0..n none or more, 1..2 one or two. The right-hand column is our explanation of a typical supplier setup, not part of the standard.

Business fieldUBL element (cardinality)Where the data typically sits in a supplier's records (our explanation)
Invoice numbercbc:ID (1..1)The invoice number your ERP or invoicing system issues
Issue date and currencycbc:IssueDate (1..1), cbc:DocumentCurrencyCode (1..1)The invoice date in your system, and the currency on the customer's account or order
Typecbc:InvoiceTypeCode (1..1), 380 for a commercial invoice. A credit note is a separate UBL CreditNote with cbc:CreditNoteTypeCode 381Set by whether you raise an invoice or a credit note
Buyer reference or purchase order numbercbc:BuyerReference (0..1); cac:OrderReference (0..1) with cbc:IDThe reference your customer gave you, often on the order, or the customer's PO held on the sales order
Despatch referencecac:DespatchDocumentReference (0..1) with cbc:IDYour despatch advice or delivery note number
Seller and seller Peppol IDcac:AccountingSupplierParty (1..1), with cbc:EndpointID (1..1) and a mandatory @schemeIDYour company record: legal name and VAT number, plus the Peppol ID your Access Point registered
Buyer and buyer Peppol IDcac:AccountingCustomerParty (1..1), with cbc:EndpointID (1..1) and a mandatory @schemeIDThe customer master record, with the Peppol ID the customer gave you or the Peppol Directory shows
Delivery datecac:Delivery (0..1) with cbc:ActualDeliveryDate (0..1)Your despatch or proof-of-delivery record
Linescac:InvoiceLine (1..n), each with cbc:InvoicedQuantity (1..1) and its @unitCode, cac:Item/cbc:Name (1..1) and cac:Price/cbc:PriceAmount (1..1)The order lines and your price list
Item identifierscac:SellersItemIdentification (0..1), cac:StandardItemIdentification (0..1), GTIN as scheme 0160Your product codes, and the GTIN barcode numbers on your products
VAT breakdowncac:TaxTotal (1..2), with cac:TaxSubtotal (0..n) per VAT category and rateYour system's VAT calculation
Totalscac:LegalMonetaryTotal (1..1), with cbc:TaxExclusiveAmount (1..1) and cbc:TaxInclusiveAmount (1..1)Calculated from the lines and the VAT

The buyer reference and the order reference are each optional on their own, but the structure page adds: "An invoice must have buyer reference or purchase order reference". The purchase order guide and the invoice number guide cover those references.

The two EndpointIDs are the Peppol IDs, and the "schemeID attribute is mandatory for electronic addresses". In Peppol's list, 0088 is the Global Location Number and 9932 is the "United Kingdom VAT number". A GLN is one scheme among many, as the GLN guide explains, and the Access Point guide covers who registers your Peppol ID. On the lines, a GTIN goes in StandardItemIdentification with scheme 0160, and the GTIN guide has the detail.

Here is what four of those elements carry, with the default values and examples from OpenPeppol's structure page:

ElementBusiness termValue from OpenPeppol's structure page
cbc:CustomizationIDSpecification identifierurn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0
cbc:ProfileIDBusiness process typeurn:fdc:peppol.eu:2017:poacc:billing:01:1.0
cbc:InvoiceTypeCodeInvoice type code380
cbc:BuyerReferenceBuyer referenceabs1234

In the file, each value sits between an opening and a closing tag that carry the element's name. A cbc element holds one value and a cac element groups other elements, such as a party or a line. The full skeleton, and how a file is checked and routed, is on the how to send a Peppol invoice page.

What do type codes 380 and 381 mean?

In Peppol's invoice type code list, 380 is the commercial invoice: "Document/message claiming payment for goods or services supplied under conditions agreed between seller and buyer." Code 381 is not in that list. It is the credit note code, used in cbc:CreditNoteTypeCode inside a UBL CreditNote.

How is UBL different from CII, Factur-X, EDI and PDF invoices?

FormatWhat it isWho maintains itWhere a UK supplier meets itRead more
UBLPure XML, one of the two syntaxes for EN 16931OASIS (ISO/IEC 19845)Peppol invoices, where it is the mandatory syntaxThis guide
CIIPure XML, the UN/CEFACT Cross Industry Invoice, the other EN 16931 syntaxUN/CEFACTOptional on Peppol, and one of the formats in France and BelgiumEN 16931 guide; France and Belgium page
Factur-XA PDF/A-3 a person can read, with the invoice data inside as structured XMLFNFE-MPE in France, with FeRD in GermanyFrance, and Germany, where the same format is called ZUGFeRDFactur-X guide
EDIFACT or EANCOM INVOICAn EDI invoice message, built from segments, in the format the customer specifiesGS1 for EANCOM, built on UN/EDIFACTRetail EDIEDI invoice guide
PDFA document a person reads, not structured dataNot applicableEmailed invoicesWhat is eInvoicing guide

The Factur-X guide explains the hybrid format. The France and Belgium page lists "Factur-X, which is a PDF with structured XML inside it, plus UBL and CII, which are pure XML", and says that for Belgium the requirement "in practice means UBL 2.1 or CII 16B".

EDI sits alongside these. The Commission's list of EN 16931 parts includes a "Syntax binding for UN/EDIFACT INVOIC D16B", and GOV.UK's consultation response records respondents noting that "suppliers and buyers may use different e-invoicing formats (UBL, EDIFACT)". The EDI invoice guide covers that message.

A PDF is the odd one out. GOV.UK's consultation response says: "Invoices in the following formats are not considered e-invoices for the purpose of this consultation: invoices in PDF or word formats". The what is eInvoicing guide agrees that "an emailed PDF does not qualify."

Will UK eInvoices be UBL?

That is not decided yet. The UK eInvoicing roadmap says: "The Government has named Peppol as the core interoperability framework for mandatory UK eInvoicing." Peppol invoices today follow BIS Billing 3.0, written in UBL 2.1. But the roadmap adds that "the final UK-specific technical standards, supported formats and additional requirements have not yet been decided."

The government has announced eInvoicing for VAT invoices from 1 April 2029, and GOV.UK says its approach to standards "will build on established international standards, including those already used within the Peppol framework." The roadmap's advice: "Businesses should therefore avoid assuming that an existing XML, UBL or EDI invoice will automatically satisfy the 1 April 2029 mandate."

Do you have to write UBL yourself?

No. GOV.UK's roadmap says: "Most businesses will not need to interact directly with e-invoicing data standards or understand their technical requirements." The how to send a Peppol invoice page says of the invoice that your Access Point "can create it from the data your ERP already holds." The Access Point guide defines an Access Point as "the certified service provider that sends and receives Peppol documents for you".

For suppliers already trading by EDI, the eInvoicing add-on guide says: "On the Transalis flow, an invoice is converted into the structured format the rules require. Peppol BIS, EN 16931 and UBL are the names you will see."

How Transalis fits

The eInvoicing page says: "Your ERP raises the invoice as it does today. Transalis converts it to Peppol BIS (EN 16931), checks it against the rules of the country it is going to, and delivers it straight into your customer's system or a public body's Access Point."

Where a customer asks for EDI instead, the EDI page says: "Transalis now offers EDI in three categories." They are Web EDI, Integrated EDI and Enterprise EDI.

Book a 30-minute call with an eInvoice specialist, who will walk you through EDI and eInvoicing and how Transalis makes this simple and easy.

Frequently asked questions

What does UBL stand for?

Universal Business Language. It is an open XML standard for business documents, owned by OASIS and available to all with no royalty fees, and ISO has standardised it as ISO/IEC 19845. Besides the Invoice and the Credit Note, its library covers documents such as the Order and the Despatch Advice.

Is a UBL invoice the same as a Peppol invoice?

Not quite. UBL is the file, and Peppol is the network and rule set that carries it. A Peppol invoice follows Peppol BIS Billing 3.0 and is written in UBL 2.1, the mandatory syntax, with CII allowed as an option. So a UBL invoice sent on Peppol also follows the BIS rules OpenPeppol publishes.

What is the difference between UBL and CII?

Both are XML syntaxes for the same EN 16931 invoice model. UBL comes from OASIS, and CII, the Cross Industry Invoice, from UN/CEFACT. On Peppol, UBL is mandatory and CII is optional, for receivers who choose to accept it. For Belgium, the France and Belgium page on transalis.com names UBL 2.1 or CII 16B.

What does invoice type code 381 mean?

381 is the code for a credit note. In Peppol it is not an invoice type code: it goes in cbc:CreditNoteTypeCode, inside a separate UBL CreditNote document. The ordinary invoice is code 380, a commercial invoice, in cbc:InvoiceTypeCode. For a credit note, OpenPeppol says the document type, not the sign of the amount, marks it as a credit.

What is the format of an XML invoice?

An XML invoice is the invoice's data as tagged text: each value sits between named tags that a system can read. On Peppol, the tags follow the UBL 2.1 sequence and the BIS Billing 3.0 rules. The roadmap page on transalis.com describes an XML or UBL invoice as structured data that still needs to meet the applicable standards.

Is a PDF with XML inside a UBL invoice?

No. A PDF/A-3 with the invoice data inside as structured XML is Factur-X, a hybrid format used in France and, as ZUGFeRD, in Germany. A UBL invoice is pure XML, and any PDF it carries is only an attachment. A PDF alone is not an eInvoice: GOV.UK's consultation response does not count invoices in PDF or Word formats as e-invoices.

Want this working in your business?

We will look at how you trade today, and show you what moving to Transalis involves, while your business keeps trading.