Skip to the viewer
ReadEInvoice

Unit codes on e-invoices and what they mean

The unit on an e-invoice line is a code from UN/ECE Recommendation 20 (units of measure) or Recommendation 21 (package types, written with an X in front). C62 means “one”, a counted unit; HUR is an hour; LS is a lump sum.

Where the unit code sits

Every invoice line has a quantity and a unit. In a UBL file (Peppol BIS, XRechnung UBL) the code is the unitCode attribute of cbc:InvoicedQuantity. In a CII file (XRechnung CII, ZUGFeRD, Factur-X) it is the unitCode attribute of ram:BilledQuantity. EN 16931 requires a code from the list here, so a word such as “pcs” or “hours” cannot stand in its place.

<cbc:InvoicedQuantity unitCode="HUR">7.5</cbc:InvoicedQuantity>
UBL: 7.5 hours

Recommendation 20 and Recommendation 21

UN/ECE Recommendation 20, “Codes for Units of Measure Used in International Trade”, covers measures such as hour, kilogram and metre, and counting units such as C62 and H87. Recommendation 21, “Codes for Passengers, Types of Cargo, Packages and Packaging Materials”, covers package types such as box or packet. On an e-invoice the Recommendation 21 codes get an X in front, so a box is XBX and a piece is XPP. The code list used for EN 16931 and Peppol BIS combines both lists in one.

Common unit codes

CodeNameShown in the viewer as
C62one (piece, unit)pcs
H87piecepcs
EAeachea.
XPPpiece (package type)pcs
XPKpackagepack
XBXboxbox
XPApacketpacket
SETsetset
PRpairpair
LSlump sumlump sum
E48service unitservice unit
P1percent%
SECseconds
MINminutemin
HURhourh
DAYdayday(s)
WEEweekweek(s)
MONmonthmonth(s)
ANNyearyear(s)
GRMgramg
KGMkilogramkg
TNEtonnet
MMTmillimetremm
CMTcentimetrecm
MTRmetrem
KMTkilometrekm
MTKsquare metrem²
MTQcubic metrem³
LTRlitrel
KWHkilowatt hourkWh
KWTkilowattkW

The table lists the codes the viewer writes out. Any other code is shown unchanged, never guessed. The full list is in the Peppol code list linked under Sources.

C62, H87, EA and XPP: four codes for counted items

  • C62, “one” (synonym “unit”): a plain number of units with no physical dimension.
  • H87, “piece”: a number of pieces.
  • EA, “each”: a number of single items.
  • XPP, “piece” from Recommendation 21: a loose or unpacked article, listed as a package type.

For the amounts the choice makes no difference: 10 C62 at 5.00 and 10 H87 at 5.00 both give a line amount of 50.00. It can matter when your software compares the invoice with a purchase order or goods receipt that uses a different code for the same goods. In that case, ask the supplier to use the unit from your order or map the codes in your own system.

Time units

SEC (second), MIN (minute), HUR (hour), DAY (day), WEE (week), MON (month) and ANN (year). Quantities can have decimals: 7.5 HUR is seven and a half hours, and 0.25 HUR is fifteen minutes.

Lump sums, services and percentages

  • LS, lump sum: a flat fee. The quantity is normally 1 and the unit price is the whole amount.
  • E48, service unit: one unit of a service with no fixed size.
  • P1, percent.
  • SET (set) and PR (pair) for items sold together.

Weights and measures

The codes look like abbreviations but follow their own pattern: a kilogram is KGM (not KG), a gram GRM, a tonne TNE, a metre MTR, a square metre MTK, a cubic metre MTQ, a litre LTR and a kilowatt hour KWH. If a file uses KG or M, it does not use the code list, and the viewer shows the code as it stands.

Price per base quantity

A unit price does not always refer to one unit. EN 16931 has an item price base quantity (BT-149) with its own unit code (BT-150), for example a price of 12.00 per 100 KGM. If a line shows 250 KGM at 12.00 but a line amount of 30.00, look for a base quantity of 100: 250 ÷ 100 × 12.00 = 30.00. In UBL the base quantity is cbc:BaseQuantity inside cac:Price; in CII it is ram:BasisQuantity.

To see the units of an invoice you received written out, open it in the e-invoice viewer. For the VAT letters on the same lines see VAT category codes.

Questions

What does C62 mean on an invoice?
C62 is the UN/ECE code for “one”, also called “unit”. The quantity is a plain count: 3 C62 means three units of the item.
Is H87 the same as C62?
Both count items. H87 is named “piece” and C62 “one”. The line amount is calculated the same way, quantity times price.
Why does my invoice say XPP or XBX?
These are package type codes from UN/ECE Recommendation 21 with an X in front: XPP is a piece (a loose or unpacked article), XBX is a box.

Sources

Facts checked on 3 December 2026

Open your invoice file

The viewer reads the file in your browser. Nothing is uploaded.

Related pages