Skip to content
TRADACOMS INVFIL — TRADACOMS Invoice FilePublished Oct 12, 2026

TRADACOMS INVFIL: The UK Invoice File Explained

TRADACOMS INVFIL invoice files explained: INVFIL, INVOIC, VATTLR and INVTLR, ILD lines, STL VAT sub-totals, implied decimals, live examples and EANCOM INVOIC.

The invoice file is the TRADACOMS document that gets you paid, and the one retailers check hardest. Every line, every VAT sub-total and every file total has to add up, and the numbers have no decimal points. A file that fails those checks is usually rejected rather than queried, and the invoice is not paid until a corrected file arrives.

This guide covers the four messages in an INVFIL, how the VAT arithmetic chains from line to file, and two live examples. For the EANCOM equivalent, see the EDIFACT INVOIC guide.

What is a TRADACOMS INVFIL?

INVFIL is the invoice file in TRADACOMS, the UK retail EDI standard maintained by the Article Numbering Association, now GS1 UK, until support ended in 2017. The supplier sends it to the customer to bill for goods or services. One file can carry a single invoice or a whole day's invoicing to that customer.

Unlike the order file, the invoice file has two trailer messages. VATTLR summarises VAT by rate across every invoice in the file, and INVTLR gives the file totals. That structure reflects the standard's UK design: VAT is built into the file, rate by rate, at every level.

INVFIL file structure

STX   Start of transmission (supplier to customer, APRF INVFIL)
│
├── MHD INVFIL   Invoice file header        once per file
│     TYP  SDT  CDT  FIL  (DNA  FDT  ACD)
│   MTR
│
├── MHD INVOIC   Invoice details            once per invoice, repeats
│     CLO  IRF  (PYT  DNA)
│     ODD                                   order and delivery reference
│       ILD  ILD ...                        one per invoice line
│     STL  STL ...                          one per VAT rate on this invoice
│     TLR                                   invoice totals
│   MTR
│
├── MHD VATTLR   VAT trailer                once per file
│     VRS  VRS ...                          one per VAT rate in the file
│   MTR
│
├── MHD INVTLR   Invoice file trailer       once per file
│     TOT                                   file totals and invoice count
│   MTR
│
END   End of transmission (number of messages)

The VATTLR and INVTLR come once, after all the invoices. A translator that writes a VATTLR after every INVOIC produces a file the customer's system does not expect; a Software AG community thread describes exactly that mistake.

Example: one invoice, one VAT rate

Kestrel Valley Homeware invoices fictional retailer Harbour Lane Stores for the order it delivered to Harbour Lane's northern DC: 40 cases of chopping boards, 20 cases of mill sets and 10 cases of utensil sets, all standard-rated. Identifiers are made up, with valid GS1 check digits.

Live exampleTRADACOMS INVFILTRADACOMS

INVFIL file with one invoice

Invoice file header, one INVOIC with three ILD lines and one STL sub-trailer at 20%, then the VATTLR and INVTLR trailers. Amounts use implied decimals.

Structurally valid TRADACOMS
TRADACOMS · INVFIL, INVOIC, VATTLR, INVTLR · 24 segments · 4 messages

INVFIL · Invoice file header · ref 1

Parties

RoleIdentifierName and address
Supplier SDT5098765000002GS1 GLNKESTREL VALLEY HOMEWARE LTD
Customer CDT5012345000008GS1 GLNHARBOUR LANE STORES LTD

INVOIC · Invoice · ref 2

Document
Invoice
Document number
KV-INV-20931
Invoice date
2026-10-16

Parties

RoleIdentifierName and address
Delivery location CLO5012345000107GS1 GLNHARBOUR LANE NORTHERN DC

Lines (3)

#GTINCodesDescriptionQtyPriceAmount
1.1------
1.2------
1.3------

VATTLR · VAT trailer · ref 3

INVTLR · Invoice file trailer · ref 4

Transmission (STX)

Sender
KESTREL VALLEY HOMEWAREcode 5098765000002
Recipient
HARBOUR LANE STORES LTDcode 5012345000008
Prepared
2026-10-16 17:05:00
Control reference
KV0000318
Syntax
ANA:1
Messages
4
SegmentWhat it says
STX=...+INVFIL+B'Supplier to customer; application reference INVFIL
MHD=1+INVFIL:9'Message 1 is the invoice file header, version 9
TYP=0700+INVOICES'Transaction code 0700: invoices only
SDT=...++987654321'Supplier GLN, supplier number at the retailer, name, (no address), VAT registration number
FIL=1207+1+261016'File generation number 1207, version 1, created 16 October 2026
CLO=5012345000107:00212+...The delivery location being invoiced
IRF=KV-INV-20931+261016+261016'Invoice number, invoice date and tax point date
ODD=1+HL-PO-88340::261012+KV-DN-55120:261015'The retailer's order number and date, and your delivery note number and date
ILD=1+1+...Invoice line 1 under order and delivery reference 1 (broken down below)
STL=1+S+20000+3+71000...VAT sub-trailer: standard rate, 20%, 3 lines, £710.00 net, £142.00 VAT, £852.00 payable
TLR=1+71000...Invoice totals across one STL
MTR=10'Ten segments in the INVOIC message
VRS=1+S+20000+...VAT rate summary for the whole file
TOT=71000+71000+14200+85200+85200+1'File totals: net, net after discount, VAT, payable before and after discount, and 1 invoice
END=4'Four messages

Implied decimals: reading the numbers

Nothing in an INVFIL has a decimal point. Each numeric field has a fixed number of implied decimal places set by the specification. The John Lewis Partnership publishes the formats it uses, and they match how the example above is written:

FieldFormat in the JLP specExample valueMeans
AUCT unit cost pricen10.490000£9.0000
LEXC extended line costn10.43600000£360.0000
VATP VAT percentagen3.32000020.000%
LVLA, VATA and other STL, TLR, VRS and TOT amountsn10.271000£710.00

Line values carry four decimal places and totals two, so the move from LEXC to LVLA is where you round. Sum the line values first, then round the sub-total; rounding each line separately can leave the STL a penny out. Confirm the formats in your own partner's specification before you build.

Segment reference

Version 9 layouts. "M" is mandatory and "O" optional in the standard. The EANCOM column gives the closest equivalent in EDIFACT INVOIC.

INVFIL: invoice file header

SegmentNameStatusWhat it carriesEANCOM equivalent
MHDMessage headerMMessage number and INVFIL:versionUNH
TYPTransaction typeM0700 invoices, 0701 self-billed, 0709 copy invoices and othersBGM+380 and function
SDTSupplier detailsMSupplier GLN and code, name, address, VAT numberNAD+SU with RFF+VA
CDTCustomer detailsMCustomer GLN, name, address, VAT numberNAD+BY / NAD+IV
DNAData narrativeOFile-level notes and registered codesFTX
FILFile detailsMFile generation number, version and dateNo direct equivalent
FDTFile period datesOInvoice and delivery period end datesDTM period
ACDAudit control detailsOLocation of the system that generated the fileNone
MTRMessage trailerMSegment countUNT

INVOIC: one per invoice

SegmentNameStatusWhat it carriesEANCOM equivalent
CLOCustomer's locationMDelivery or invoiced location: GLN and codesNAD+DP
IRFInvoice referencesMInvoice number, invoice date, tax point dateBGM number, DTM+137, DTM+131
PYTSettlement termsOSettlement discount termsPAT
DNAData narrativeOInvoice-level notesFTX
ODDOrder and delivery referencesM, repeatsCustomer order number and date, delivery note number and date, proof of deliveryRFF+ON, RFF+DQ
ILDInvoice line detailsM, repeatsProduct, pack, quantity, unit cost, line cost, VAT category and rateLIN, QTY+47, PRI+AAA, MOA+203, TAX+7
CIAComplex invoice line adjustmentsOLine-level allowances and chargesALC at line level
DNCNarrative detailsOLine-level notesFTX at line level
STLVAT rate invoice sub-trailerM, one per rateLines, net value, discounts, surcharges, VAT and payable for one VAT rateSummary TAX+7 with MOA+125 and MOA+124
TLRInvoice trailerMTotals across all STL segmentsMOA+79, MOA+125, MOA+176, MOA+86

VATTLR and INVTLR: file trailers

MessageSegmentWhat it carriesEANCOM equivalent
VATTLRVRS VAT rate summary, one per rateNet, VAT and payable totals for one VAT rate across every invoice in the fileNone; each EANCOM invoice stands alone
INVTLRTOT file totalsNet, VAT and payable totals for the file, and the number of invoicesNone

Reading the ILD invoice line

PositionFieldIn ILD=1+1+5098765100016:KV-1001+++6+40+90000+3600000+S+20000+++BAMBOO CHOPPING BOARD:LARGE'
1SEQA links the line to its ODD order and delivery reference1
2SEQB line number within that reference1
3SPRO GTIN of the traded unit, supplier's code, DUN-145098765100016:KV-1001
4SACU consumer unit EANempty
5CPRO customer's own-brand EAN and item codeempty
6UNOR consumer units per traded unit6
7QTYI traded units invoiced40
8AUCT unit cost after line discount, before VAT90000 (£9.00)
9LEXC extended line cost, AUCT x QTYI3600000 (£360.00)
10VATC VAT categoryS
11VATP VAT rate20000 (20%)
12 to 13MIXI mixed VAT indicator, CRLI credit line indicatorempty
14TDES descriptionBAMBOO CHOPPING BOARD:LARGE

Further optional positions carry recommended and marked retail prices, unit cost before discount (BUCT), discount value and percentage, and the VAT type of supply. The common VAT category codes are S standard, Z zero, L lower (reduced) rate, X exempt and A mixed-rate item.

How the VAT arithmetic chains together

The totals in an INVFIL are layered, and each layer must equal the sum of the one below:

  1. ILD: LEXC = AUCT x QTYI for each line.
  2. STL, one per VAT rate per invoice: LVLA is the sum of LEXC at that rate. EVLA = LVLA less quantity and value discounts plus surcharges. ASDA = EVLA less settlement discount. VATA is the VAT. APSE = EVLA + VATA and APSI = ASDA + VATA.
  3. TLR, one per invoice: each total is the sum of the matching STL field, and NSTL counts the STLs.
  4. VRS, one per VAT rate per file: sums of the STL values at that rate across every invoice.
  5. TOT, one per file: sums of the VRS values, plus FTNI, the number of invoices.

A retailer's system re-adds every layer. If your ERP calculates VAT per line and the retailer's per rate, the totals can disagree by a penny, and a penny is enough to fail the file.

Example: two invoices, two VAT rates

Two store invoices in one file. The Leeds invoice is all standard-rated. The York invoice adds a recipe book, which is zero-rated under UK VAT, so it has two STL segments. The VATTLR then carries one VRS per rate across both invoices, and TOT adds them up.

Live exampleTRADACOMS INVFILTRADACOMS

INVFIL file with two invoices and a VAT summary

Two INVOIC messages, one with standard and zero-rated lines. VATTLR summarises each VAT rate across the file and INVTLR counts two invoices.

Structurally valid TRADACOMS
TRADACOMS · INVFIL, INVOIC, VATTLR, INVTLR · 34 segments · 5 messages

INVFIL · Invoice file header · ref 1

Parties

RoleIdentifierName and address
Supplier SDT5098765000002GS1 GLNKESTREL VALLEY HOMEWARE LTD
Customer CDT5012345000008GS1 GLNHARBOUR LANE STORES LTD

INVOIC · Invoice · ref 2

Document
Invoice
Document number
KV-INV-20932
Invoice date
2026-10-17

Parties

RoleIdentifierName and address
Delivery location CLO5012345000114GS1 GLNHARBOUR LANE LEEDS

Lines (2)

#GTINCodesDescriptionQtyPriceAmount
1.1------
1.2------

INVOIC · Invoice · ref 3

Document
Invoice
Document number
KV-INV-20933
Invoice date
2026-10-17

Parties

RoleIdentifierName and address
Delivery location CLO5012345000121GS1 GLNHARBOUR LANE YORK

Lines (2)

#GTINCodesDescriptionQtyPriceAmount
1.1------
1.2------

VATTLR · VAT trailer · ref 4

INVTLR · Invoice file trailer · ref 5

Transmission (STX)

Sender
KESTREL VALLEY HOMEWAREcode 5098765000002
Recipient
HARBOUR LANE STORES LTDcode 5012345000008
Prepared
2026-10-17 17:05:00
Control reference
KV0000319
Syntax
ANA:1
Messages
5

Check the chain: Leeds pays £56.88 and York £48.60, so the file total payable is £105.48 (10548). The standard-rate VRS adds the two standard-rate STLs (£47.40 + £18.00 = £65.40 net, £13.08 VAT), and the zero-rate VRS carries the book alone.

Settlement discount, surcharges and reconciliation

  • Settlement discount. If you offer a prompt payment discount, show it in PYT and carry the discount in each STL's SEDA. ASDA and APSI then show the after-discount values, and TLR and TOT repeat both sets of totals.
  • Carriage and other surcharges. These go in the STL SURA field for the VAT rate they attract, and roll up into EVLA. The JLP spec, for instance, lists registered codes in DNA for carriage and miscellaneous charges.
  • The RSGRSG reconciliation message. Some partners want an extra message at the end of the transmission, RSGRSG, which repeats the sender's transmission reference and the receiver's code so the file can be reconciled. The JLP invoice specification asks for it, and changes the STX syntax identifier from ANA to ANAA when it is sent.
  • Test and live references. JLP also uses the STX application reference to separate test files (INVTES) from live ones (INVFIL). Ask your partner whether they do the same before you go live.

INVFIL to EANCOM INVOIC

Business dataTRADACOMS invoice fileEANCOM INVOIC
Document typeTYP=0700BGM+380
Invoice number and dateIRFBGM and DTM+137
Tax point dateIRF third elementDTM+131
Order and delivery noteODDRFF+ON and RFF+DQ
Supplier VAT numberSDTNAD+SU with RFF+VA
Line quantityILD QTYIQTY+47
Unit priceILD AUCT, implied decimalsPRI+AAA, explicit decimal
Line amountILD LEXCMOA+203
Line VAT rateILD VATC, VATPTAX+7+VAT+++:::20+S
VAT per rateSTLSummary TAX with MOA+125 and MOA+124
Invoice totalsTLRMOA+79, MOA+125, MOA+176, MOA+86
File VAT summary and totalsVATTLR, INVTLRNone; each invoice is self-contained

The X12 counterpart is the 810 invoice. Credit notes do not go in an INVFIL: TRADACOMS has a separate credit note file, CREHDR.

Which UK retailers take INVFIL

  • Waitrose and the wider John Lewis Partnership take TRADACOMS INVFIL invoices, and publish the field-level specification on the JLP supplier site. See the Waitrose page.
  • Ocado takes INVFIL invoices but does not accept credit or debit notes by EDI, per ecosio. See the Ocado page.
  • Co-op requires invoices by EDI in TRADACOMS version 9, or through its SNC portal, and warns that late invoices can be paid late. See the Co-op page.
  • Asda trades invoices and credit notes in TRADACOMS, per ecosio. See the Asda page.
  • Boots trades invoices in TRADACOMS, per Cegedim. See the Boots page.

Common INVFIL errors

  1. A VATTLR after every invoice. VATTLR and INVTLR appear once per file, after the last INVOIC.
  2. Rounding per line instead of per rate. Sum LEXC values, then round the STL. Recalculate VAT from the STL net, not by adding line VAT.
  3. STL count wrong. TLR NSTL must equal the number of STL segments in that invoice, and each STL NRIL the number of ILD lines at that rate.
  4. MTR and END counts. MTR counts every segment from MHD to MTR inclusive. END counts every message, including the INVFIL header and both trailers, so one invoice gives END=4.
  5. File generation number out of sequence. FIL generation numbers run in sequence per file type and trading partner. The JLP specification states that files out of sequence are rejected, so never reuse or skip one, and send a corrected file with the next number unless your partner says otherwise.
  6. Invoicing ordered quantities. Invoice what was delivered and accepted. If the retailer sent a delivery confirmation (DLCHDR) showing a shortage, invoice the received quantity or expect a debit.

How OrderSync handles INVFIL

OrderSync builds INVFIL files from the orders and deliveries already in your system, with VAT calculated per rate the way TRADACOMS expects, so the STL, TLR, VRS and TOT layers agree before the file leaves. The same order can be invoiced as TRADACOMS, EANCOM, X12 or PDF depending on the customer.

Frequently Asked Questions

What is INVFIL in EDI?

INVFIL is the TRADACOMS invoice file used in UK retail. Strictly it is the name of the file header message, but the whole invoice file is usually called INVFIL. It contains the header, one INVOIC message per invoice, a VATTLR VAT summary and an INVTLR file trailer.

What is the difference between INVFIL and INVOIC?

INVFIL is the header message sent once per file with the supplier and customer details. INVOIC is the detail message sent once per invoice. The EDIFACT standard also has a message called INVOIC, but it is a different format with different segments.

What do VATTLR and INVTLR do?

VATTLR summarises VAT for the whole file, with one VRS segment per VAT rate. INVTLR closes the file with a TOT segment holding the file totals and the number of invoices. The customer's system checks both against the invoices before accepting the file.

Can a TRADACOMS invoice file contain credit notes?

Not in the standard layout. Credit notes go in a separate credit note file with a CREHDR header, CREDIT messages and their own trailers. Some partners do not accept credit notes by EDI at all, so check before you build one.

What is the EDIFACT equivalent of INVFIL?

The EANCOM INVOIC message with document code BGM+380. Each EANCOM invoice is self-contained, so the file-level VATTLR and INVTLR summaries have no direct equivalent.

Related guides

Sources

Check an INVFIL's structure, counts and trailers in the free EDIFACT inspector.

James Darby
Last updated: 10/12/2026

How to Answer "Are You EDI Capable?"

A buyer asked, and you need to answer this week. The four things they are checking, what you can say yes to today, and a realistic date for the rest.

  • What a buyer is really asking when they ask this
  • The minimum set-up that makes the answer yes
  • What you can answer today versus what needs building
  • Rough timelines, so you can give a date rather than a maybe

One email with the download. Unsubscribe any time.

Related Resources