Skip to content
← All articlesEDI

EDI invoice explained: what it contains, how it is matched and why invoices fail

The bill your system sends a retailer, segment by segment. Follow a GS1 example line by line, then see which records it is checked against before payment.

Transalis

The first orders are arriving, and the retailer's guide names one more document you owe them. It goes back the other way, after the goods have landed. Its references must line up with records the retailer already holds, or the payment waits while someone finds out why.

Short answer

An EDI invoice is the bill your system sends straight to a customer's system as structured data, in the format that customer specifies. It carries the order and delivery references, coded parties, product lines and VAT. The customer checks it against what was ordered and received, then pays without anyone retyping it.

What is an EDI invoice?

GS1, which maintains the EANCOM retail standard, defines its invoice message as "A message claiming payment for goods or services supplied under conditions agreed between the seller and the buyer." The glossary on the Transalis EDI page puts the supplier's side plainly: "An electronic invoice sent from supplier to buyer. It carries the structured data a retailer's system validates on receipt, with no manual keying."

HMRC recognises the route too. Its VAT guide names "the transmission of a structured electronic invoice, for example XML format, through an Electronic Data Interchange service" as one of the common forms of electronic invoicing.

The invoice is one payload on a connection that already carries your purchase orders and advance shipping notices.

Where does the invoice sit between order and payment?

After the delivery, as the last document before payment. Ocado's supplier manual sets out its invoice procedure in order: Ocado raises a purchase order, the order reaches the supplier, adjustments travel by ASN or through the supply chain team, the supplier delivers, and then "Invoice for goods is received from the supplier". The same manual says "All invoices should be sent to Ocado via one of Ocado's EDI solutions". Transalis covers that mandate, and how to meet it, in Ocado's EDI invoices post.

The invoice is usually in the first EDI set. The Transalis retail playbook says: "The usual starting set is two documents: the purchase order the retailer sends you and the invoice you send back." The full document list is in the EDI requirements for retail suppliers.

The Transalis ASN guide sets the timing: "Only once the goods are physically received and checked against the ASN does the supplier raise the invoice." For what the ASN carries and when it is due, read how and when to send an ASN.

What does an EDI invoice contain?

One message type covers more than invoices. The GS1 manual for the INVOIC message states: "The United Nations Standard Invoice Message, with correct data qualification, serves also as the specification for Debit Note and Credit Note messages." The message is built from segments, each with one job.

  • Document type and number (BGM). A code says what the document is: "380 = Commercial invoice" or "381 = Credit note - goods and services". GS1 is firm on this: "It is of critical importance to use the appropriate document name qualifier relevant to the message."
  • References (RFF). These tie the invoice to earlier documents, with qualifiers such as "ON = Order number (buyer)" and "DQ = Delivery note number".
  • Parties (NAD). "Identification of the buyer and supplier of goods and services is mandatory in the Invoice." Each party is identified by its Global Location Number, and its VAT number travels with it under "VA = VAT registration number".
  • Tax (TAX). Tax is stated by type, category and rate. GS1 adds: "Tax types and categories will vary from country to country."
  • Lines (LIN). "If Global Trade Item Numbers are available it is mandatory to use GTIN within the LIN segment."
  • Totals. After the lines, a summary section carries the invoice's amount and tax totals.

Government schemes can add content too. The UK Deposit Return Scheme for drinks containers launches in October 2027. Once it does, "Every invoice down the chain then has to carry the deposit correctly, which is why INVOIC mappings change." The detail is on the DRS EDI compliance page.

A GS1 invoice, line by line

GS1's INVOIC manual ends with a worked commercial invoice. It bills goods from purchase order ORD9523, delivered under delivery note 53662, with two product lines. Laid out from the supplier's side, a few of its lines look like this.

Field in your systemEANCOM segment in GS1's exampleWhat it carries
Invoice numberBGM+380+IN432097'Commercial invoice IN432097
Invoice dateDTM+137:20020308:102'Message date, 8 March 2002
Customer's order numberRFF+ON:ORD9523'The purchase order being invoiced
Delivery note numberRFF+DQ:53662'The delivery the goods arrived on
BuyerNAD+BY+5412345000013::9'Buyer identified by its GLN
SupplierNAD+SU+4012345500004::9'Supplier identified by its GLN
Product lineLIN+1++4000862141404:SRV'Line 1, identified by GTIN
Quantity invoicedQTY+47:40'Invoiced quantity, 40 units
End of the linesUNS+S'Separates the detail section from the summary

This is GS1's illustration from 2002, not a live invoice. Its prices and tax totals belong to that scenario and are left out.

Each value in the table comes from your own records: the order number you received, the delivery note you raised, the product codes and the quantities you invoice. The map that moves them into the message is its own piece of work. As the Transalis mapping guide puts it, "An order coming in needs a map. So does the invoice going back out." See EDI mapping explained.

How is an EDI invoice matched to the order and delivery?

Against the retailer's own records. Ocado's manual describes its goods-in check: "It is vital at this stage that quantities match with purchase order details." Receipts are matched automatically against expected volumes and date coding, and "Invoices will only be paid against these receipts."

So the invoice meets two records: what the retailer ordered and what its warehouse received. The invoice's order and delivery references are how the retailer finds both.

Delivery paperwork counts as well. Ocado notes: "Ocado may use delivery notes as a basis for payments. If this information is not accurate then this may slow down the payment process."

Why do EDI invoices get rejected or queried?

Two kinds of problem hold an invoice up: the message breaks the standard's rules, or its content disagrees with the retailer's records.

  • The wrong document code. The code tells the receiving system what kind of document it holds, and GS1 calls the right choice of critical importance.
  • Free text where codes belong. GS1 warns: "Use of this segment in free form is not recommended since in most cases it inhibits automatic processing of the Invoice."
  • Missing identifiers. Buyer and supplier must be identified, and GTINs must be used on lines where they exist.
  • Syntax errors. On EANCOM links, GS1 notes that a CONTRL message "may be used to indicate when an interchange has been rejected due to syntax errors".

Then come the retailer's own checks. Ocado's manual links two delivery habits to invoice queries. ASNs "improve receipt accuracy, reduce invoice matching queries", and outer cases that look alike "may lead to cross-receiving and an invoice matching query". Routing is part of the specification too: "EDI invoices for purchase orders delivered to Ocado CFCs, Lineage and CEVA will need to be sent to the above Head Office ANA Code." At Ocado, the goods go to a site and the invoice goes to head office.

Rules also move. Transalis's chargebacks guide gives the usual reason a supplier is charged back: "Almost always because a document failed a retailer's validation or timing rules, often after the retailer changed those rules and your system wasn't updated to match." One supplier's account of that is in when in-house EDI breaks.

How do EDI credit notes work?

In EANCOM, a credit note is the same INVOIC message with a different code: 381 instead of 380. GS1 notes: "If the document type is a credit note the invoice to which it relates may need to be specified." That reference uses the IV qualifier. GS1 makes it conditional, but a UK VAT credit note normally needs the original invoice's number and date, so include it.

HMRC sets the VAT side. A valid credit note shows, among other details, "the number and date of the original VAT invoice or invoices relating to the supply". It must reflect a genuine mistake, an overcharge or an agreed reduction.

The credit note goes by EDI where the retailer supports it. The Transalis retail playbook lists it as the document that "Corrects or reverses an invoice". On TRADACOMS links, it is the Credit Note File.

Does an EDI invoice count as a VAT invoice?

It can, if it carries what HMRC requires. HMRC's VAT guide says an electronic invoice "must include all the information that's required on a paper VAT invoice".

VAT Notice 700/21 lists those details. They include "a sequential number based on one or more series which uniquely identifies the document", the time of supply, "the name, address and VAT registration number of the supplier", the customer's name and address, a description of the goods, the unit price, and "the total amount of VAT chargeable, expressed in sterling". It also says: "Normally you must issue a VAT invoice within 30 days of the date you make the supply."

The VAT guide, Notice 700, adds two points. "Electronic invoices are acceptable as evidence for input tax deduction, subject to the normal rules, providing the following can be ensured": the authenticity of the origin, the integrity of the data and the legibility of the content. And if someone else issues invoices for you, "all the legal obligations relating to the contents, storage and production of the invoices raised remain with you".

Several of those details already have a home in the INVOIC segments above: the document number in BGM, the supplier's VAT number beside its NAD party, the lines in LIN and the tax by rate in TAX. GS1's example names the buyer and supplier by GLN only and dates the message, not the supply, so check that your invoice also carries both parties' names and addresses and the time of supply.

INVOIC, TRADACOMS or 810: which format applies?

The one your customer specifies. The Transalis standards guide says: "UK retail grew up on Tradacoms and now mostly uses EDIFACT and its retail subset, EANCOM."

In EDIFACT and EANCOM, the invoice is the INVOIC message described above. In TRADACOMS, it is the Invoice File. In North America, partners use X12, where, in the words of the Transalis transactions guide, the standard uses "transaction set 850 for purchase orders and 810 for invoices".

Many suppliers need more than one. For how the standards differ, read EDI standards explained and EDI transactions explained.

EDI invoice, PDF or eInvoice: what is the difference?

The word "electronic" means two things. For VAT, HMRC counts "a PDF document sent by email" as electronic invoicing. For the buyer's system, it is not structured data: "A PDF attached to an email is not an eInvoice, however tidy it looks, because the buyer's software cannot read it without help."

An EDI invoice is structured data in a format both partners agree. eInvoicing over Peppol carries structured invoices in one format for every partner on the network. Separately, the government has announced mandatory eInvoicing for all VAT invoices for 2029.

The full comparison is in what is eInvoicing and why emailing a PDF is not eInvoicing. For the mandate and the EDI route to it, see the UK eInvoicing mandate and eInvoicing for EDI customers.

How Transalis sends and tracks your EDI invoices

Transalis is a managed outcomes provider for B2B integration, EDI and eInvoicing. There are two ways in. Transalis Web EDI is "A managed web portal to receive orders, send invoices and manage compliance in a browser. No ERP integration and no software to install". With an ERP link, "Orders, invoices, dispatch notes, inventory updates and acknowledgements flow automatically between your systems, your 3PL partners and your trading partners".

Either way, "Your system creates a document (an order, invoice or ASN) in whatever format it already uses." Transalis translates it into the format each retailer requires, such as TRADACOMS, EANCOM, EDIFACT or X12.

Once an invoice is sent, Transalis DataTrack™ lets you "Confirm that invoices and orders actually landed and matched." The network has 15,000+ connected organisations and carries £7bn+ in invoice value per year.

Start trading in days with your retailer's invoice guide in hand, or see the managed service on the EDI page.

Frequently asked questions

What does an EDI invoice contain?

A code for the document type, such as 380 for a commercial invoice, and its number. References to the customer's order and your delivery note. The buyer and supplier, identified by Global Location Number with VAT numbers. Product lines identified by GTIN, tax by type and rate, and summary totals after the lines.

How is an EDI invoice matched to the order and delivery?

The retailer checks it against records it already holds: what it ordered and what its warehouse received. Ocado, for example, matches receipts against the purchase order and pays invoices only against those receipts. The order and delivery note references inside the invoice are what let the retailer find both records.

Why do EDI invoices get rejected or queried?

Either the message breaks the standard's rules, or its content disagrees with the retailer's records. GS1's rules cover the right document code, codes rather than free text, identified parties and GTINs on lines. Ocado's manual links delivery mismatches and look-alike outer cases to invoice queries, and names the head-office code invoices go to.

Is an EDI invoice a valid VAT invoice?

It can be. HMRC says an electronic invoice must include everything required on a paper VAT invoice, such as a sequential number, the supplier's VAT number and the total VAT in sterling. It is acceptable input tax evidence, subject to the normal rules, providing authenticity of origin, data integrity and legibility are ensured.

Is an EDI invoice the same as an eInvoice?

Both are structured data, read by software rather than by a person. An EDI invoice uses a format agreed between two trading partners, while a Peppol eInvoice uses one format for every partner on the network. A PDF sent by email counts as electronic for VAT, but the buyer's software cannot read it without help.

How do you send an EDI credit note?

In EANCOM, send the same INVOIC message with document code 381 and a reference to the invoice it corrects. GS1 makes that reference conditional, but HMRC says a UK VAT credit note must normally show the original invoice's number and date. In TRADACOMS, the document is the Credit Note File.

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.