INVOIC — EDIFACT Invoice (D.99B)
The INVOIC message represents a commercial invoice, a credit note or a request for payment. It covers simple purchases as well as complex transactions with multi-rate VAT, allowances/charges and consolidated billing. This page summarises the segment structure as published by UN/CEFACT for directory D.99B.
Purpose
The INVOIC message represents a commercial invoice, a credit note or a request for payment. It covers simple purchases as well as complex transactions with multi-rate VAT, allowances/charges and consolidated billing.
This page focuses on the structure published by UN/CEFACT for directory D.99B. The segments listed, their status (M / C), position and repetition factor are extracted from the official file invoic_c.htm hosted on service.unece.org.
Segment structure
The INVOIC D.99B message has 106 header entries, 105 detail entries and 16 summary entries (segments and groups combined). Groups are shown in bold and their members are indented by actual nesting depth.
Header
| Pos. | Tag | Name | S | Rep. |
|---|---|---|---|---|
0010 | UNH | Message header | M | 1 |
0020 | BGM | Beginning of message | M | 1 |
0030 | DTM | Date/time/period | M | ×35 |
0040 | PAI | Payment instructions | C | 1 |
0050 | ALI | Additional information | C | ×5 |
0060 | IMD | Item description | C | 1 |
0070 | FTX | Free text | C | ×99 |
0080 | LOC | Place/location identification | C | ×10 |
0100 | DGS | Dangerous goods | C | 1 |
0110 | GIR | Related identification numbers | C | ×10 |
0120 | SG1 | Group (×99999) | C | ×99999 |
0130 | RFF | Reference | M | 1 |
0140 | DTM | Date/time/period | C | ×5 |
0150 | GIR | Related identification numbers | C | ×5 |
0160 | LOC | Place/location identification | C | ×2 |
0170 | MEA | Measurements | C | ×5 |
0180 | QTY | Quantity | C | ×2 |
0190 | FTX | Free text | C | ×5 |
0200 | MOA | Monetary amount | C | ×2 |
0210 | RTE | Rate details | C | ×99 |
0220 | SG2 | Group (×99) | C | ×99 |
0230 | NAD | Name and address | M | 1 |
0240 | LOC | Place/location identification | C | ×25 |
0250 | FII | Financial institution information | C | ×5 |
0260 | MOA | Monetary amount | C | ×99 |
0270 | SG3 | Group (×9999) | C | ×9999 |
0280 | RFF | Reference | M | 1 |
0290 | DTM | Date/time/period | C | ×5 |
0300 | SG4 | Group (×5) | C | ×5 |
0310 | DOC | Document/message details | M | 1 |
0320 | DTM | Date/time/period | C | ×5 |
0330 | SG5 | Group (×5) | C | ×5 |
0340 | CTA | Contact information | M | 1 |
0350 | COM | Communication contact | C | ×5 |
0360 | SG6 | Group (×5) | C | ×5 |
0370 | TAX | Duty/tax/fee details | M | 1 |
0380 | MOA | Monetary amount | C | 1 |
0390 | LOC | Place/location identification | C | ×5 |
0400 | SG7 | Group (×99) | C | ×99 |
0410 | CUX | Currencies | M | 1 |
0420 | DTM | Date/time/period | C | ×5 |
0430 | SG8 | Group (×10) | C | ×10 |
0450 | DTM | Date/time/period | C | ×5 |
0460 | PCD | Percentage details | C | 1 |
0470 | MOA | Monetary amount | C | 1 |
0480 | PAI | Payment instructions | C | 1 |
0490 | FII | Financial institution information | C | 1 |
0500 | SG9 | Group (×10) | C | ×10 |
0510 | TDT | Details of transport | M | 1 |
0520 | TSR | Transport service requirements | C | 1 |
0530 | SG10 | Group (×10) | C | ×10 |
0540 | LOC | Place/location identification | M | 1 |
0550 | DTM | Date/time/period | C | ×5 |
0560 | SG11 | Group (×9999) | C | ×9999 |
0570 | RFF | Reference | M | 1 |
0580 | DTM | Date/time/period | C | ×5 |
0590 | SG12 | Group (×5) | C | ×5 |
0600 | TOD | Terms of delivery or transport | M | 1 |
0610 | LOC | Place/location identification | C | ×2 |
0620 | SG13 | Group (×99) | C | ×99 |
0630 | EQD | Equipment details | M | 1 |
0640 | SEL | Seal number | C | ×9 |
0650 | SG14 | Group (×1000) | C | ×1000 |
0660 | PAC | Package | M | 1 |
0670 | MEA | Measurements | C | ×5 |
0680 | EQD | Equipment details | C | 1 |
0690 | SG15 | Group (×5) | C | ×5 |
0700 | PCI | Package identification | M | 1 |
0710 | RFF | Reference | C | 1 |
0720 | DTM | Date/time/period | C | ×5 |
0730 | GIN | Goods identity number | C | ×5 |
0740 | SG16 | Group (×9999) | C | ×9999 |
0750 | ALC | Allowance or charge | M | 1 |
0760 | ALI | Additional information | C | ×5 |
0770 | FTX | Free text | C | 1 |
0780 | SG17 | Group (×5) | C | ×5 |
0790 | RFF | Reference | M | 1 |
0800 | DTM | Date/time/period | C | ×5 |
0810 | SG18 | Group (×1) | C | 1 |
0820 | QTY | Quantity | M | 1 |
0830 | RNG | Range details | C | 1 |
0840 | SG19 | Group (×1) | C | 1 |
0850 | PCD | Percentage details | M | 1 |
0860 | RNG | Range details | C | 1 |
0870 | SG20 | Group (×2) | C | ×2 |
0880 | MOA | Monetary amount | M | 1 |
0890 | RNG | Range details | C | 1 |
0900 | CUX | Currencies | C | 1 |
0910 | DTM | Date/time/period | C | 1 |
0920 | SG21 | Group (×1) | C | 1 |
0930 | RTE | Rate details | M | 1 |
0940 | RNG | Range details | C | 1 |
0950 | SG22 | Group (×5) | C | ×5 |
0960 | TAX | Duty/tax/fee details | M | 1 |
0970 | MOA | Monetary amount | C | 1 |
0980 | SG23 | Group (×100) | C | ×100 |
0990 | RCS | Requirements and conditions | M | 1 |
1000 | RFF | Reference | C | ×5 |
1010 | DTM | Date/time/period | C | ×5 |
1020 | FTX | Free text | C | ×5 |
1030 | SG24 | Group (×1) | C | 1 |
1040 | AJT | Adjustment details | M | 1 |
1050 | FTX | Free text | C | ×5 |
1060 | SG25 | Group (×1) | C | 1 |
1070 | INP | Parties and instruction | M | 1 |
1080 | FTX | Free text | C | ×5 |
Detail
| Pos. | Tag | Name | S | Rep. |
|---|---|---|---|---|
1090 | SG26 | Group (×9999999) | C | ×9999999 |
1100 | LIN | Line item | M | 1 |
1110 | PIA | Additional product id | C | ×25 |
1120 | IMD | Item description | C | ×99 |
1130 | MEA | Measurements | C | ×5 |
1140 | QTY | Quantity | C | ×5 |
1150 | PCD | Percentage details | C | 1 |
1160 | ALI | Additional information | C | ×5 |
1170 | DTM | Date/time/period | C | ×35 |
1180 | GIN | Goods identity number | C | ×1000 |
1190 | GIR | Related identification numbers | C | ×1000 |
1200 | QVR | Quantity variances | C | 1 |
1210 | EQD | Equipment details | C | 1 |
1220 | FTX | Free text | C | ×99 |
1230 | DGS | Dangerous goods | C | 1 |
1240 | SG27 | Group (×99) | C | ×99 |
1250 | MOA | Monetary amount | M | 1 |
1260 | CUX | Currencies | C | 1 |
1270 | SG28 | Group (×10) | C | ×10 |
1290 | DTM | Date/time/period | C | ×5 |
1300 | PCD | Percentage details | C | ×99 |
1310 | MOA | Monetary amount | C | 1 |
1320 | SG29 | Group (×25) | C | ×25 |
1330 | PRI | Price details | M | 1 |
1340 | CUX | Currencies | C | 1 |
1350 | APR | Additional price information | C | 1 |
1360 | RNG | Range details | C | 1 |
1370 | DTM | Date/time/period | C | ×5 |
1380 | SG30 | Group (×10) | C | ×10 |
1390 | RFF | Reference | M | 1 |
1400 | DTM | Date/time/period | C | ×5 |
1410 | SG31 | Group (×10) | C | ×10 |
1420 | PAC | Package | M | 1 |
1430 | MEA | Measurements | C | ×10 |
1440 | EQD | Equipment details | C | 1 |
1450 | SG32 | Group (×10) | C | ×10 |
1460 | PCI | Package identification | M | 1 |
1470 | RFF | Reference | C | 1 |
1480 | DTM | Date/time/period | C | ×5 |
1490 | GIN | Goods identity number | C | ×10 |
1500 | SG33 | Group (×9999) | C | ×9999 |
1510 | LOC | Place/location identification | M | 1 |
1520 | QTY | Quantity | C | ×100 |
1530 | DTM | Date/time/period | C | ×5 |
1540 | SG34 | Group (×99) | C | ×99 |
1550 | TAX | Duty/tax/fee details | M | 1 |
1560 | MOA | Monetary amount | C | ×2 |
1570 | LOC | Place/location identification | C | ×5 |
1580 | SG35 | Group (×99) | C | ×99 |
1590 | NAD | Name and address | M | 1 |
1600 | LOC | Place/location identification | C | ×5 |
1610 | FII | Financial institution information | C | ×5 |
1620 | SG36 | Group (×5) | C | ×5 |
1630 | RFF | Reference | M | 1 |
1640 | DTM | Date/time/period | C | ×5 |
1650 | SG37 | Group (×5) | C | ×5 |
1660 | DOC | Document/message details | M | 1 |
1670 | DTM | Date/time/period | C | ×5 |
1680 | SG38 | Group (×5) | C | ×5 |
1690 | CTA | Contact information | M | 1 |
1700 | COM | Communication contact | C | ×5 |
1710 | SG39 | Group (×30) | C | ×30 |
1720 | ALC | Allowance or charge | M | 1 |
1730 | ALI | Additional information | C | ×5 |
1740 | DTM | Date/time/period | C | ×5 |
1750 | FTX | Free text | C | 1 |
1760 | SG40 | Group (×1) | C | 1 |
1770 | QTY | Quantity | M | 1 |
1780 | RNG | Range details | C | 1 |
1790 | SG41 | Group (×1) | C | 1 |
1800 | PCD | Percentage details | M | 1 |
1810 | RNG | Range details | C | 1 |
1820 | SG42 | Group (×2) | C | ×2 |
1830 | MOA | Monetary amount | M | 1 |
1840 | RNG | Range details | C | 1 |
1850 | CUX | Currencies | C | 1 |
1860 | DTM | Date/time/period | C | 1 |
1870 | SG43 | Group (×1) | C | 1 |
1880 | RTE | Rate details | M | 1 |
1890 | RNG | Range details | C | 1 |
1900 | SG44 | Group (×5) | C | ×5 |
1910 | TAX | Duty/tax/fee details | M | 1 |
1920 | MOA | Monetary amount | C | ×2 |
1930 | SG45 | Group (×10) | C | ×10 |
1940 | TDT | Details of transport | M | 1 |
1950 | SG46 | Group (×10) | C | ×10 |
1960 | LOC | Place/location identification | M | 1 |
1970 | DTM | Date/time/period | C | ×5 |
1980 | SG47 | Group (×5) | C | ×5 |
1990 | TOD | Terms of delivery or transport | M | 1 |
2000 | LOC | Place/location identification | C | ×2 |
2010 | SG48 | Group (×100) | C | ×100 |
2020 | RCS | Requirements and conditions | M | 1 |
2030 | RFF | Reference | C | ×5 |
2040 | DTM | Date/time/period | C | ×5 |
2050 | FTX | Free text | C | ×5 |
2060 | SG49 | Group (×10) | C | ×10 |
2080 | RFF | Reference | C | 1 |
2090 | DTM | Date/time/period | C | ×5 |
2100 | GIR | Related identification numbers | C | ×5 |
2110 | LOC | Place/location identification | C | ×2 |
2120 | MEA | Measurements | C | ×5 |
2130 | QTY | Quantity | C | ×2 |
2140 | FTX | Free text | C | ×5 |
2150 | MOA | Monetary amount | C | ×2 |
Summary
| Pos. | Tag | Name | S | Rep. |
|---|---|---|---|---|
2160 | UNS | Section control | M | 1 |
2170 | CNT | Control total | C | ×10 |
2180 | SG50 | Group (×100) | M | ×100 |
2190 | MOA | Monetary amount | M | 1 |
2200 | SG51 | Group (×1) | C | 1 |
2210 | RFF | Reference | M | 1 |
2220 | DTM | Date/time/period | C | ×5 |
2230 | SG52 | Group (×10) | C | ×10 |
2240 | TAX | Duty/tax/fee details | M | 1 |
2250 | MOA | Monetary amount | C | ×2 |
2260 | SG53 | Group (×15) | C | ×15 |
2270 | ALC | Allowance or charge | M | 1 |
2280 | ALI | Additional information | C | 1 |
2290 | MOA | Monetary amount | C | ×2 |
2300 | FTX | Free text | C | 1 |
2310 | UNT | Message trailer | M | 1 |
Changes vs D.96A
Top-level differences between D.96A and D.99B for the INVOIC message (segments directly inside header / detail / summary, ignoring nested groups). The comparison is indicative: a given tag may have evolved inside nested groups without showing up in this synthesis.
Segments added vs D.96A
DGSin the header section (status C, repeat ×1) — not present at the top of the corresponding D.96A section.GIRin the header section (status C, repeat ×10) — not present at the top of the corresponding D.96A section.TSRin the header section (status C, repeat ×1) — not present at the top of the corresponding D.96A section.EQDin the header section (status M, repeat ×1) — not present at the top of the corresponding D.96A section.SELin the header section (status C, repeat ×9) — not present at the top of the corresponding D.96A section.DGSin the detail section (status C, repeat ×1) — not present at the top of the corresponding D.96A section.FIIin the detail section (status C, repeat ×5) — not present at the top of the corresponding D.96A section.FTXin the summary section (status C, repeat ×1) — not present at the top of the corresponding D.96A section.
Segments removed vs D.96A
PATin the header section — present in D.96A but missing in D.99B at the same level.PATin the detail section — present in D.96A but missing in D.99B at the same level.
Status changes (M ↔ C)
QTY(header): status M in D.96A → C in D.99B.RTE(header): status M in D.96A → C in D.99B.
Max-repeat changes
FTX(header): repeat ×10 in D.96A → ×99 in D.99B.LOC(header): repeat ×25 in D.96A → ×10 in D.99B.QTY(header): repeat ×1 in D.96A → ×2 in D.99B.MOA(header): repeat ×1 in D.96A → ×2 in D.99B.RTE(header): repeat ×1 in D.96A → ×99 in D.99B.IMD(detail): repeat ×10 in D.96A → ×99 in D.99B.FTX(detail): repeat ×5 in D.96A → ×99 in D.99B.
Structural example
Minimal example of an INVOIC D.99B message with mandatory segments only. The goal is to show the exact version declared in UNH (INVOIC:D:99B:UN) — not to replicate a full business case (see the INVOIC D.96A page for an annotated example).
UNB+UNOC:3+5410000000123:14+5410000000456:14+260514:1430+CTRL099001'
UNH+1+INVOIC:D:99B:UN'
BGM+380+INV456789+9'
DTM+137:20260514:102'
NAD+SU+5410000000456::9'
NAD+BY+5410000000123::9'
CUX+2:EUR:4'
LIN+1++3520000001234:EN'
QTY+47:10'
MOA+203:420.00'
PRI+AAA:42.00'
UNS+S'
MOA+77:504.00'
MOA+125:420.00'
MOA+124:84.00'
TAX+7+VAT+++:::20'
UNT+16+1'
UNZ+1+CTRL099001' Common errors
- Misaligned UNH tokens — The
UNH+...+INVOIC:D:99B:UNtoken must reflect exactly the directory in use — a mismatch between the UNH release and the release agreed with the partner is rejected by every strict validator. - Wrong UNT segment count — The value after
UNT+must include UNH and UNT themselves. By far the most common sender-side error, regardless of the directory in use. - Stale code lists — Between D.96A and D.99B, several code lists received new qualifiers (DTM status, RFF qualifier, NAD codes…). Reusing an older directory’s code tables triggers warnings or even rejections depending on the partner’s strict-conformance mode.
Related messages
Other versions of this message available on ediverse.io: INVOIC D.96A, INVOIC D.01B, INVOIC D.10A, INVOIC D.16B, INVOIC D.21B, INVOIC D.24A, INVOIC D.97A, INVOIC D.00B, INVOIC D.02B, INVOIC D.05A, INVOIC D.08A, INVOIC D.13B, INVOIC D.18B, INVOIC D.20B.
X12 functional equivalent: X12 810.