INVOIC is the message that gets you paid. Buyers match it against their order and their goods receipt before they release payment, so an INVOIC that disagrees with your DESADV, or whose VAT does not add up, sits in an exceptions queue until somebody fixes it by hand.
This guide follows the GS1 EANCOM 2002 INVOIC layout, with four live UK examples you can open in the inspector: a mixed-VAT invoice, an invoice with allowances and charges, a credit note, and an invoice built for three-way matching. For EDIFACT basics, start with EDIFACT explained.
What is an EDIFACT INVOIC?
INVOIC is the UN/EDIFACT invoice message: a claim for payment for goods or services supplied under conditions agreed between seller and buyer. GS1 states that the same message, with the right document code, also serves as the specification for credit notes and debit notes. One INVOIC can cover one or more orders and deliveries, and can carry payment terms and transport details.
INVOIC comes near the end of the order-to-cash flow: ORDERS, ORDRSP, DESADV, RECADV, then INVOIC, then the buyer's remittance advice.
Like every EANCOM message, INVOIC has three sections. The header holds references, parties, currency, payment terms and invoice-level allowances or charges. The detail section holds one LIN group per invoiced item. The summary section, after UNS+S, holds the totals and the VAT breakdown.
UNH Message header
BGM, DTM, RFF, NAD, CUX, PAT, ALC header: what, when, who, terms
LIN QTY MOA PRI TAX/MOA ALC detail: one group per item
UNS+S section control
CNT MOA TAX/MOA ALC/MOA summary: totals and VAT by rate
UNT Message trailer
Example 1: a UK invoice with standard-rated and zero-rated lines
The fictional supplier Kestrel Valley Homeware invoices the fictional retailer Harbour Lane Stores for order HL-PO-88190. Two lines are standard-rated at 20%. The third is a printed cookbook, which is zero-rated in the UK. VAT numbers, GLNs and GTINs are made up, with valid GS1 check digits.
INVOIC with 20% and 0% VAT lines
Three lines, two VAT rates, and a summary that breaks VAT down per rate.
INVOIC · Invoice · ref 1
- Document
- Commercial invoice
- Document number
- KV-INV-20918
- Message function
- Original
- Currency
- GBP
- Document/message date/time
- 2026-10-09
- Reference date/time
- 2026-10-05
- Order number (buyer)
- HL-PO-88190
- VAT registration number
- GB123456789
- VAT registration number
- GB987654321
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Buyer BY | 5012345000008GS1 (GLN) | - |
| Supplier SU | 5098765000002GS1 (GLN) | - |
| Delivery party DP | 5012345000107GS1 (GLN) | - |
Lines (3)
| # | GTIN | Codes | Description | Invoiced quantity | Price | Amount |
|---|---|---|---|---|---|---|
| 1 | 5098765100016 | - | BAMBOO CHOPPING BOARD LARGE | 120 | 6.50 | 780.00 |
| 2 | 5098765100023 | - | SALT + PEPPER MILL SET | 40 | 9.80 | 392.00 |
| 3 | 5098765100047 | - | SEASONAL KITCHEN COOKBOOK | 30 | 7.25 | 217.50 |
Totals
- Message total monetary amount
- 1623.90 GBPMOA 86
- Total line items amount
- 1389.50 GBPMOA 79
- Taxable amount
- 1389.50 GBPMOA 125
- Message total duty/tax/fee amount
- 234.40 GBPMOA 176
- Taxable amount
- 1172.00 GBPMOA 125
- Tax amount
- 234.40 GBPMOA 124
- Taxable amount
- 217.50 GBPMOA 125
- Tax amount
- 0.00 GBPMOA 124
Interchange (UNB)
- Sender
- 5098765000002GS1 GLN
- Recipient
- 5012345000008GS1 GLN
- Prepared
- 2026-10-09 15:00
- Control reference
- KVH000198
- Syntax
- UNOC version 3
- Messages
- 1
| Segment | What it says |
|---|---|
UNH+1+INVOIC:D:01B:UN:EAN011' | INVOIC, directory D.01B, EANCOM 2002 subset version 011 |
BGM+380+KV-INV-20918+9' | Commercial invoice (380), invoice number, original (9) |
DTM+137 | Invoice date. GS1 makes 137 mandatory |
RFF+ON + DTM+171 | The buyer's order number and its date |
NAD+BY / NAD+SU + RFF+VA | Buyer and supplier GLNs, each with a VAT number |
CUX+2:GBP:4' / PAT+1++5:3:D:30' | Invoiced in GBP, due 30 days after the invoice date |
QTY+47 / MOA+203 / PRI+AAA | Invoiced quantity, line amount excluding VAT, net unit price |
TAX+7+VAT+++:::20+S' + MOA+124 | VAT at 20%, category S, and the VAT on this line |
TAX+7+VAT+++:::0+Z' + MOA+124:0.00' | Zero rate, category Z, no VAT due |
MOA+86, 79, 125, 176 | Invoice total, line total, taxable amount, total VAT |
Summary TAX + MOA+125 + MOA+124 | One block per rate: taxable amount and VAT at that rate |
UNT+46+1' | 46 segments from UNH to UNT inclusive |
The arithmetic: 780.00 + 392.00 + 217.50 = 1,389.50 taxable. VAT is 20% of 1,172.00 = 234.40, plus nothing on the 217.50 at zero rate. Invoice total 1,389.50 + 234.40 = 1,623.90.
INVOIC segment reference
Status and repeat counts are from the GS1 EANCOM 2002 S3 INVOIC structure chart. "M" is mandatory, "C" conditional. Where a segment heads a segment group, the repeat count is for the group.
| Segment | Name | Status | Repeats | Carries | X12 810 equivalent |
|---|---|---|---|---|---|
UNH | Message header | M | 1 | Message type and version | ST |
BGM | Beginning of message | M | 1 | Document code (380, 381...), number, function | BIG02, BIG07 |
DTM | Date/time/period | M | 35 | Invoice date (137), delivery date (35) | BIG01, DTM |
PAI | Payment instructions | C | 1 | How to pay | (by partner) |
FTX | Free text | C | 99 | Notes for the whole invoice | NTE |
RFF (SG1) | Reference | M in group | 99,999 | Order (ON), despatch advice (AAK), delivery note (DQ), invoice (IV) | BIG04, REF |
NAD (SG2) | Name and address | M in group | 99 | Buyer, supplier, delivery point, invoicee by GLN | N1 to N4 |
RFF (SG3) | Party reference | M in group | 9,999 | VAT number (VA) for that party | REF |
TAX (SG6) | Duty/tax/fee details | M in group | 5 | Tax for the whole invoice | TXI |
CUX (SG7) | Currencies | M in group | 99 | Invoicing currency | CUR |
PAT (SG8) | Payment terms basis | M in group | 10 | Terms, discounts for early payment | ITD |
TOD (SG12) | Terms of delivery | M in group | 5 | Incoterms or delivery terms | FOB |
ALC (SG16) | Allowance or charge | M in group | 9,999 | Invoice-level charges such as freight | SAC |
AJT (SG24) | Adjustment details | M in group | 1 | Reason for a credit or debit note | (by partner) |
LIN (SG26) | Line item | M in group | 9,999,999 | GTIN of the invoiced item | IT1 |
PIA | Additional product id | C | 25 | Supplier or buyer item codes | IT1 qualifiers |
IMD | Item description | C | 99 | Description | PID |
QTY | Quantity | C | 5 | Invoiced (47), delivered (46) | IT102 |
MOA (SG27) | Monetary amount | M in group | 99 | Line amount (203) | Calculated, not sent |
PRI (SG29) | Price details | M in group | 25 | Net (AAA) or gross (AAB) unit price | IT104 |
RFF (SG30) | Line reference | M in group | 10 | Line-level order or delivery reference | REF in IT1 loop |
TAX (SG34) | Line tax | M in group | 99 | VAT rate and category for the line | TXI in IT1 loop |
ALC (SG39) | Line allowance or charge | M in group | 30 | Line discounts and charges | SAC in IT1 loop |
UNS | Section control | M | 1 | Start of summary (UNS+S) | None |
CNT | Control total | C | 10 | Number of lines (2) | CTT |
MOA (SG50) | Summary amount | M in group | 100 | Totals: 86, 79, 125, 176, 131, 129, 9 | TDS |
TAX (SG52) | Summary tax | M in group | 10 | VAT per rate, with up to 9 MOA | TXI |
ALC (SG53) | Summary allowance or charge | M in group | 15 | Totals per allowance or charge type | SAC |
UNT | Message trailer | M | 1 | Segment count and reference | SE |
How VAT works in INVOIC
VAT is carried by TAX and MOA pairs, in up to three places: on each line, at header level for the whole invoice, and in the summary once per rate.
The TAX segment
TAX+7+VAT+++:::20+S'
| Position | Value | Meaning |
|---|---|---|
| Function qualifier | 7 | Tax (5 would be customs duty) |
| Tax type | VAT | Value added tax (GST is also allowed) |
| Rate | :::20 | 20%, in the fourth component of the rate composite |
| Category | S | Standard rate |
UK rates and category codes
The UK has three VAT rates: standard 20%, reduced 5% and zero 0%. Exempt supplies are not a rate at all.
| UK treatment | Rate in TAX | Category code | Where the code comes from |
|---|---|---|---|
| Standard rate | :::20 | S | EANCOM restricted list |
| Reduced rate | :::5 | Partner-specific | Ask your customer |
| Zero rate | :::0 | Z (zero rated goods) | UN/EDIFACT code list 5305 |
| Exempt | (no rate) | E | EANCOM restricted list |
| Mixed rate | (varies) | A | EANCOM restricted list |
This is where generic examples go wrong. EANCOM 2002 restricts the category code to A (mixed), E (exempt) and S (standard), and says that tax types and categories differ by country and are defined by national guidelines. Z for zero-rated goods comes from the full UN/EDIFACT 5305 code list, the same list Peppol uses. Some UK partners want Z, some want S with a 0 rate, and the reduced rate has no single agreed code. Take every category code from your customer's guide.
Line, header and summary
- Line level. Each LIN group has its own
TAXand anMOA+124with the VAT on that line. EANCOM also allowsMOA+125here for the taxable amount. - Header level. A
TAXgroup in the header applies to the whole invoice. GS1 says header tax amounts are added to any amounts in the detail section to get the summary totals. Example 2 below uses this for VAT on a freight charge. - Summary level. One
TAXper rate, each followed byMOA+125(taxable amount at that rate) andMOA+124(VAT at that rate). Example 1 has two summary TAX blocks, one at 20% and one at 0%.
What HMRC expects on a VAT invoice
HMRC's record keeping notice (VAT Notice 700/21) lists what a full VAT invoice must show. The INVOIC fields that carry each one:
| HMRC requirement | Where it goes in INVOIC |
|---|---|
| Unique sequential invoice number | BGM document number |
| Time of supply (tax point), and date of issue if different | DTM+137, plus whatever date your partner specifies for the tax point |
| Supplier's name, address and VAT number | NAD+SU and RFF+VA |
| Customer's name and address | NAD+BY (and NAD+IV if the invoicee differs) |
| Description, quantity and unit price | IMD, QTY+47, PRI |
| VAT rate and amount excluding VAT per line | Line TAX and MOA+203 |
| Rate of any cash discount | PAT and PCD |
| Total VAT in sterling | MOA+176 |
A GLN is a code, not a name and address. EANCOM only allows the name and address parts of NAD when a coded identifier cannot do the job, so agree with your customer how the legal invoice details are held: in the message, or in master data the customer holds against your GLN.
Rounding
Buyers' systems check every sum: line VAT against the summary, the summary against MOA+176, and MOA+125 plus MOA+176 against MOA+86. Rounding is the usual failure. If you round VAT per line and your customer rounds per rate, totals drift by a penny. Agree the rule before go-live and build your test invoices around awkward prices.
Example 2: allowances and charges with ALC
ALC groups carry discounts and surcharges. They appear in the header (for the whole invoice), on each line, and in the summary. GS1 is explicit that header and line allowances are independent: a line ALC does not override a header ALC, it adds to it.
Here Kestrel Valley gives a 10% quantity discount on 200 tea towels and adds a 25.00 freight charge to the invoice.
INVOIC with a line discount and a freight charge
Gross price with a 10% line allowance, a header freight charge with its own VAT, and summary totals that include it.
INVOIC · Invoice · ref 1
- Document
- Commercial invoice
- Document number
- KV-INV-20957
- Message function
- Original
- Currency
- GBP
- Document/message date/time
- 2026-10-16
- Reference date/time
- 2026-10-12
- Order number (buyer)
- HL-PO-88412
- VAT registration number
- GB123456789
- VAT registration number
- GB987654321
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Buyer BY | 5012345000008GS1 (GLN) | - |
| Supplier SU | 5098765000002GS1 (GLN) | - |
| Delivery party DP | 5012345000107GS1 (GLN) | - |
Lines (2)
| # | GTIN | Codes | Description | Invoiced quantity | Price | Amount |
|---|---|---|---|---|---|---|
| 1 | 5098765100030 | - | - | 200 | 2.25 | 405.00 |
| 2 | 5098765100016 | - | - | 60 | 6.50 | 390.00 |
Totals
- Amount (23)
- 25.00 GBPMOA 23
- Tax amount
- 5.00 GBPMOA 124
- Message total monetary amount
- 984.00 GBPMOA 86
- Total line items amount
- 795.00 GBPMOA 79
- Taxable amount
- 820.00 GBPMOA 125
- Message total duty/tax/fee amount
- 164.00 GBPMOA 176
- Total charges/allowances
- 25.00 GBPMOA 131
- Taxable amount
- 820.00 GBPMOA 125
- Tax amount
- 164.00 GBPMOA 124
- Total charges/allowances
- 25.00 GBPMOA 131
Interchange (UNB)
- Sender
- 5098765000002GS1 GLN
- Recipient
- 5012345000008GS1 GLN
- Prepared
- 2026-10-16 11:00
- Control reference
- KVH000211
- Syntax
- UNOC version 3
- Messages
- 1
| Segment | What it says |
|---|---|
ALC+C++6++FC' + MOA+23:25.00' | Header charge, paid by the customer (6), freight (FC), 25.00 |
TAX + MOA+124:5.00' after it | The freight charge carries 20% VAT |
PRI+AAB:2.25' | Gross price. With AAB, the allowances must follow so the buyer can calculate the net |
ALC+A+++1+QD' + PCD+1:10' + MOA+204:45.00' | Line allowance, calculation step 1, quantity discount, 10%, worth 45.00 |
MOA+203:405.00' | Line amount after the allowance: 200 x 2.25 less 45.00 |
Summary MOA+131:25.00' | Header charges, which turn the line total (795.00) into the taxable amount (820.00) |
ALC+C++++FC' + MOA+131 | Summary total per charge type |
Three rules from the EANCOM manual keep ALC sane:
- Allowances are sent as positive numbers.
ALC+Amakes the amount a deduction. Do not add a minus sign. - Gross or net, not both.
PRI+AAB(gross) means allowances and charges must follow for the calculation.PRI+AAA(net) means they are already included and anyALCis for information. - Sequence matters when allowances stack. The calculation sequence code (
1to9) says which allowance applies first when each one is calculated on the price left by the previous one.
Example 3: a credit note (BGM 381)
Six chopping boards from invoice KV-INV-20931 arrived damaged. Kestrel Valley issues a credit note in the same INVOIC message, with document code 381, a reference to the original invoice, and an adjustment reason.
Credit note for damaged goods
BGM 381 referencing the original invoice with RFF+IV, adjustment reason AJT+3, and all amounts positive.
INVOIC · Invoice · ref 1
- Document
- Credit note
- Document number
- KV-CN-00412
- Message function
- Original
- Currency
- GBP
- Document/message date/time
- 2026-10-20
- Reference date/time
- 2026-10-15
- Reference date/time
- 2026-10-11
- Invoice number
- KV-INV-20931
- Order number (buyer)
- HL-PO-88231
- VAT registration number
- GB123456789
- VAT registration number
- GB987654321
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Buyer BY | 5012345000008GS1 (GLN) | - |
| Supplier SU | 5098765000002GS1 (GLN) | - |
Lines (1)
| # | GTIN | Codes | Description | Invoiced quantity | Price | Amount |
|---|---|---|---|---|---|---|
| 1 | 5098765100016 | - | - | 6 | 6.50 | 39.00 |
Totals
- Message total monetary amount
- 46.80 GBPMOA 86
- Total line items amount
- 39.00 GBPMOA 79
- Taxable amount
- 39.00 GBPMOA 125
- Message total duty/tax/fee amount
- 7.80 GBPMOA 176
- Taxable amount
- 39.00 GBPMOA 125
- Tax amount
- 7.80 GBPMOA 124
Interchange (UNB)
- Sender
- 5098765000002GS1 GLN
- Recipient
- 5012345000008GS1 GLN
- Prepared
- 2026-10-20 09:30
- Control reference
- KVH000219
- Syntax
- UNOC version 3
- Messages
- 1
What makes this a credit note:
BGM+381is "credit note, goods and services". The message structure is identical to an invoice.RFF+IVnames the invoice being credited. GS1 says this is how a credit note points at its invoice.AJT+3gives the reason: damaged goods. EANCOM also lists5(price query) and9(invoice error), and only allows AJT on credit and debit notes.- Every amount is positive. EANCOM's rule is that numeric values are positive and the receiving application uses the document code to turn a credit note's values negative. A credit sent as
380with minus signs will be rejected by most buyers.
Document codes and message functions
The BGM document code says what kind of financial document this is. These are from the EANCOM 2002 restricted list:
| Code | Document |
|---|---|
380 | Commercial invoice |
381 | Credit note, goods and services |
383 | Debit note, goods and services |
384 | Corrected invoice |
385 | Consolidated invoice |
386 | Prepayment invoice |
389 | Self-billed invoice |
261 | Self-billed credit note |
325 | Proforma invoice |
GS1 advises checking with local tax authorities before using 384, because some countries do not allow corrected invoices. Its recommended route for a wrong invoice is to cancel it and issue a new one, or to issue a credit or debit note that references it.
The third element of BGM is the message function: 9 original, 1 cancellation, 5 replacement, 7 duplicate, 31 copy.
Self-billing (BGM 389)
In a self-billing arrangement the customer raises the invoice for the supplier. In INVOIC, that is document code 389 (or 261 for a self-billed credit note). For UK VAT, HMRC says a self-billed invoice must include the reference "self billing", and the arrangement must meet the conditions in Self-billing (VAT Notice 700/62), including a written agreement between the parties. If your customer asks to self-bill, settle the agreement before you map the message.
Example 4: an invoice built for three-way matching
Retail accounts payable teams match three documents before they pay: the order, the goods receipt, and the invoice. Make the match easy by quoting both the order and the despatch advice, and by invoicing exactly what you shipped.
Harbour Lane ordered 120 boards, 60 mill sets and 48 tea towels on order HL-PO-88231. Kestrel Valley shipped 120 boards and 40 mill sets on despatch advice KV-DES-7781. The invoice bills those 160 items, not the 228 ordered.
INVOIC quoting the order and the despatch advice
RFF+ON and RFF+AAK with their dates, delivered and invoiced quantities per line, and the actual delivery date.
INVOIC · Invoice · ref 1
- Document
- Commercial invoice
- Document number
- KV-INV-20931
- Message function
- Original
- Currency
- GBP
- Document/message date/time
- 2026-10-15
- Delivery date/time, actual
- 2026-10-15
- Reference date/time
- 2026-10-11
- Reference date/time
- 2026-10-13
- Order number (buyer)
- HL-PO-88231
- Despatch advice number
- KV-DES-7781
- VAT registration number
- GB123456789
- VAT registration number
- GB987654321
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Buyer BY | 5012345000008GS1 (GLN) | - |
| Supplier SU | 5098765000002GS1 (GLN) | - |
| Delivery party DP | 5012345000107GS1 (GLN) | - |
Lines (2)
| # | GTIN | Codes | Description | Invoiced quantity | Price | Amount |
|---|---|---|---|---|---|---|
| 1 | 5098765100016 | - | - | 120 | 6.50 | 780.00 |
| 2 | 5098765100023 | - | - | 40 | 9.80 | 392.00 |
Totals
- Message total monetary amount
- 1406.40 GBPMOA 86
- Total line items amount
- 1172.00 GBPMOA 79
- Taxable amount
- 1172.00 GBPMOA 125
- Message total duty/tax/fee amount
- 234.40 GBPMOA 176
- Taxable amount
- 1172.00 GBPMOA 125
- Tax amount
- 234.40 GBPMOA 124
Interchange (UNB)
- Sender
- 5098765000002GS1 GLN
- Recipient
- 5012345000008GS1 GLN
- Prepared
- 2026-10-15 16:30
- Control reference
- KVH000207
- Syntax
- UNOC version 3
- Messages
- 1
| Segment | Why it helps the match |
|---|---|
DTM+35:20261015:102' | Actual delivery date, which the buyer compares with its goods receipt |
RFF+ON:HL-PO-88231' + DTM+171 | Links the invoice to the order and its date |
RFF+AAK:KV-DES-7781' + DTM+171 | Links the invoice to the despatch advice. EANCOM's code for a delivery note number is DQ; use whichever your customer's guide asks for |
QTY+46 and QTY+47 | Delivered quantity and invoiced quantity, side by side |
| No line for tea towels | Nothing shipped, so nothing billed. Line numbering stays 1 and 2 |
If the buyer sends a RECADV showing fewer items received than you despatched, expect a deduction or a request for a credit note like Example 3.
INVOIC vs the X12 810
| Data | EDIFACT INVOIC | X12 810 |
|---|---|---|
| Invoice number and date | BGM + DTM+137 | BIG02, BIG01 |
| Order reference | RFF+ON | BIG04 |
| Despatch reference | RFF+AAK or RFF+DQ | REF*BM or REF*PK, by partner |
| Credit vs invoice | BGM code (380, 381) | BIG07 transaction type, or an 812 |
| Parties | NAD+BY, NAD+SU, NAD+DP with GLN | N1*BT, N1*RE, N1*ST |
| Payment terms | PAT | ITD |
| Line quantity and price | QTY+47, PRI+AAA | IT102, IT104 |
| Line amount | MOA+203 | Calculated, not sent |
| Allowances and charges | ALC + PCD / MOA | SAC |
| Line tax | TAX + MOA+124 | TXI (where used) |
| Invoice total | MOA+86 | TDS01 (implied decimals) |
| Tax total | MOA+176, plus TAX/MOA per rate | TXI at summary level |
| Line count | CNT+2 | CTT01 |
Two differences matter most in practice. First, EDIFACT sends amounts with an explicit decimal mark (1406.40), while the X12 TDS01 total uses implied decimals (140640). Second, sales tax in US X12 invoices is often a single summary figure, while EDIFACT invoices to VAT-registered buyers carry VAT per line and per rate. A mapping from one to the other has to rebuild the VAT breakdown, not just copy a total. See the EDI 810 guide for the X12 side.
INVOIC and e-invoicing mandates
EDIFACT INVOIC is an EDI format agreed between trading partners. Most new government e-invoicing mandates name other formats:
- Peppol uses UBL-based Peppol BIS Billing 3.0, exchanged through Peppol access points.
- Germany requires B2B invoices that conform to the European standard EN 16931, typically XRechnung or ZUGFeRD. German guidance addresses when existing EDI invoice flows can continue, so check the current position for your case.
- France requires structured e-invoices exchanged through approved platforms. Every VAT-registered business must be able to receive them from 1 September 2026; see our France mandate guide.
- The UK will require all VAT invoices to be issued as e-invoices from April 2029, with an implementation roadmap due at Budget 2026. The format had not been fixed when this guide was updated.
A mandate may require a compliant invoice flow alongside your EDIFACT one, or instead of it. Our country-by-country mandate guide has the detail.
UK retailer INVOIC requirements
Every UK grocer takes invoices by EDI, but the format, the credit note rules and the move off paper differ. Confirm the current specification with each retailer during onboarding.
Tesco
- Send invoices and credit notes by EDI, as EANCOM INVOIC or TRADACOMS
INVFIL, depending on your setup.
See the Tesco EDI requirements page.
Sainsbury's
- Send invoices as EDIFACT INVOIC or TRADACOMS
INVFIL, using the Supplier ID and GLN Sainsbury's issues to you.
See the Sainsbury's EDI requirements page.
Morrisons
- Send invoices and credit or debit notes by EDI. Morrisons' message set is EDIFACT D96A, so invoices are INVOIC, with credit notes as INVOIC
BGM+381(see Example 3 above). - Invoice the quantities on your DESADV, after any ORDCHG amendments.
See the Morrisons EDI requirements page.
Marks & Spencer
- Where your account is on self-billing, M&S raises the invoice from your ASN and you do not send INVOIC at all. Where it is not, send invoices by EDI. Our self-billing (ERS) guide covers how to reconcile self-billed invoices.
See the Marks & Spencer EDI requirements page.
Retailers that invoice in TRADACOMS
- Asda, the Co-op and Boots take invoices as TRADACOMS
INVFILand credit notes asCREHDR. - Ocado takes invoices as
INVFILbut does not accept credit or debit notes by EDI. - Waitrose runs a parallel phase in which you send EDI invoices with test qualifiers alongside paper copies, then moves you fully to EDI within a set window.
The TRADACOMS INVFIL guide and CREHDR guide map each field to its INVOIC equivalent.
Common INVOIC errors and fixes
| Error | What the buyer sees | Fix |
|---|---|---|
| Invoicing ordered quantities | Mismatch against the goods receipt | Invoice what the DESADV says you shipped |
| Totals that do not reconcile | Invoice held or rejected | Check 79 + 131 = 125 and 125 + 176 = 86, to the penny |
| VAT rounding drift | A penny out per rate | Agree per-line or per-rate rounding |
| Missing supplier VAT number | Not valid for VAT recovery | Send RFF+VA after NAD+SU |
| Wrong VAT category code | Tax validation failure | Use the codes in the customer's guide |
Credit sent as 380 with negatives | Rejected | Use 381, positive amounts and RFF+IV |
| Gross price with no allowance | Amount does not equal quantity x price | Send ALC with PRI+AAB, or use PRI+AAA |
| Wrong UNT or CNT count | Syntax rejection, often via CONTRL | Recount after every mapping change |
| Unescaped apostrophe or plus | Segment ends early | Escape as ?' and ?+ |
INVOIC testing checklist
- Get the customer's INVOIC guide and confirm the directory (D.96A or D.01B), the EANCOM version in
UNH, and the mandatory segments. - Confirm VAT codes. Write down the exact
TAXcategory for each UK rate you invoice, including zero-rated and exempt lines. - Agree the rounding rule for line VAT and summary VAT.
- Build one test invoice per case: standard rate only, mixed rates, a line allowance, a header charge, and a credit note.
- Check the references. Every invoice should carry the order number, and the despatch or delivery note number if the customer matches on it.
- Paste each file into the EDIFACT inspector to check the envelope,
UNTandCNTcounts, escapes and GS1 check digits. - Reconcile the totals by hand for at least one invoice per case, then compare with what the customer's test system calculates.
- Send through the real connection (AS2, SFTP or VAN) and confirm you receive the customer's CONTRL or APERAK.
Frequently Asked Questions
What does BGM+380 mean?
380 is the UN/EDIFACT document name code for a commercial invoice. A credit note uses 381 and a debit note 383, all in the same INVOIC message structure.
How is VAT shown in an EDIFACT invoice?
With a TAX segment giving the tax type, rate and category, followed by an MOA+124 with the tax amount. This appears on each line and again in the summary, once per VAT rate, with MOA+125 for the taxable amount at that rate. MOA+176 carries the total VAT for the invoice.
How do I show a zero-rated line in INVOIC?
Send the line with a 0 rate, for example TAX+7+VAT+++:::0+Z' and MOA+124:0.00', and give the zero rate its own TAX block in the summary. Z is the UN/EDIFACT code for zero-rated goods, but EANCOM leaves category codes to national guidelines, so confirm the code with your customer.
Are credit note amounts negative in EDIFACT?
No. EANCOM says amounts are sent as positive values and the document code tells the receiver to treat them as negative. A credit note is BGM+381 with positive quantities and amounts.
What is the difference between MOA+79, MOA+125 and MOA+86?
MOA+79 is the total of the line amounts. MOA+125 is the taxable amount: the line total adjusted by invoice-level allowances and charges. MOA+86 is the taxable amount plus VAT.
What is the TRADACOMS equivalent of INVOIC?
The TRADACOMS invoice file, made of INVFIL (header), INVOIC (one per invoice), VATTLR (VAT trailer) and INVTLR (file trailer) messages. See the TRADACOMS invoice file guide and the TRADACOMS overview.
Can OrderSync handle EDIFACT invoices?
Yes. OrderSync supports EDIFACT, EANCOM and TRADACOMS alongside X12, PDF, CSV and email.
Related guides
- EDIFACT explained: syntax, envelopes and the full X12 mapping
- EDIFACT ORDERS and DESADV: the order and despatch the invoice references
- EDIFACT RECADV: the receiving advice that drives deductions
- EDIFACT CONTRL and APERAK: the acknowledgements your invoice gets back
- EDIFACT message types: every message, grouped by business flow
- UBL vs X12 vs EDIFACT: how the invoice maps across all three standards
- EDI 810 invoice: the X12 counterpart
- UK retailer requirements: Tesco, Sainsbury's, Asda, Morrisons, Waitrose
Sources
- EANCOM 2002 S3: INVOIC invoice message (structure chart, segment layouts and example), GS1
- EANCOM 2002 S3 Part 1: syntax and numeric representation, GS1
- UNCL5305 duty or tax or fee category code, OpenPeppol
- VAT rates, GOV.UK
- Record keeping (VAT Notice 700/21), HMRC
- VAT guide (VAT Notice 700), section 17.4 on self-billing, HMRC
- Budget 2025, HM Treasury
- Peppol BIS Billing 3.0, OpenPeppol
Check your INVOIC totals, counts and escapes in the free EDIFACT inspector before your customer's accounts payable team does.