Short deliveries, damaged cases, price mistakes and returns all end the same way: a credit note. In TRADACOMS that is the credit note file, named after its CREHDR header. It mirrors the INVFIL invoice file closely, with its own line segment that carries a reason for every credited line.
Credit notes are where suppliers lose money quietly. A retailer deducts a shortage from your remittance; if you never send the matching credit, the invoice and the payment never reconcile, and someone in your finance team spends an afternoon working out why. This guide covers how the file is built, the reason codes, two live examples and the mapping to the EANCOM credit note.
What is a TRADACOMS CREHDR file?
CREHDR is the credit note file in TRADACOMS, the UK retail EDI standard created by the Article Numbering Association, now GS1 UK. A supplier sends it to a customer to credit goods or charges already invoiced. The file can carry one credit note or many, each in its own CREDIT message.
The transaction code in the header says what kind of document it is. The code list defines 0740 for credit notes, 0741 for self-billed credit notes raised by the customer, 0749 for copy credit notes, and 0720 for debit notes raised by the customer. The same file layout serves all of them: M&S's TRADACOMS debit note guide, for example, sends debit notes to suppliers in the CREHDR layout with TYP=0720.
CREHDR file structure
STX Start of transmission (supplier to customer, APRF CREHDR)
│
├── MHD CREHDR Credit note file header once per file
│ TYP SDT CDT FIL (DNA)
│ MTR
│
├── MHD CREDIT Credit note details once per credit note, repeats
│ CLO CRF (PYT) OIR (DNA)
│ CLD CLD ... one per credited line
│ CST CST ... one per VAT rate on this credit
│ CTR credit note totals
│ MTR
│
├── MHD VATTLR VAT trailer once per file
│ VRS VRS ... one per VAT rate in the file
│ MTR
│
├── MHD CRETLR Credit note file trailer once per file
│ TOT file totals and credit count
│ MTR
│
END End of transmission (number of messages)
The VAT trailer is the same VATTLR message used in invoice files, and CRETLR uses the same TOT segment as the invoice file trailer. In TOT, the last element counts credit notes instead of invoices.
Example: credit for a short delivery
Kestrel Valley Homeware invoiced fictional retailer Harbour Lane Stores for three cases of tea towels to its Leeds store, but only two arrived. Harbour Lane raised debit note HL-DBN-5521 for the missing case, and Kestrel Valley credits it, quoting both the original invoice and the debit note. Identifiers are made up, with valid GS1 check digits.
CREHDR file crediting one short-delivered case
Credit note file with one CREDIT message: reason code 38 (short delivery), the original invoice in OIR, the customer's debit note in CRF, and a single CST at 20%.
CREHDR · Credit note file header · ref 1
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Supplier SDT | 5098765000002GS1 GLN | KESTREL VALLEY HOMEWARE LTD |
| Customer CDT | 5012345000008GS1 GLN | HARBOUR LANE STORES LTD |
CREDIT · Credit note · ref 2
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Delivery location CLO | 5012345000114GS1 GLN | HARBOUR LANE LEEDS |
VATTLR · VAT trailer · ref 3
CRETLR · Credit note file trailer · ref 4
Transmission (STX)
- Sender
- KESTREL VALLEY HOMEWAREcode 5098765000002
- Recipient
- HARBOUR LANE STORES LTDcode 5012345000008
- Prepared
- 2026-10-19 16:00:00
- Control reference
- KV0000322
- Syntax
- ANA:1
- Messages
- 4
| Segment | What it says |
|---|---|
TYP=0740+CREDIT-NOTES' | Transaction code 0740: credit notes only |
FIL=88+1+261019' | File generation number 88 for credit note files to this customer, version 1 |
CLO=5012345000114:0114+... | The location the credit relates to |
CRF=KV-CRN-04416+261019+261019+HL-DBN-5521+261018' | Credit note number, credit note date, tax point date, then the customer's debit note number and date |
OIR=1+KV-INV-20932' | The original invoice being credited |
CLD=1+...+10+1+38000+38000+S+20000+38::SHORT DELIVERY... | One case of ten credited at £3.80, net £3.80, standard rate 20%, reason 38 short delivery |
CST=1+S+20000+1+380... | VAT sub-trailer: one line at 20%, £3.80 net, £0.76 VAT, £4.56 to credit |
CTR=1+380... | Credit note totals |
VRS / TOT | File VAT summary and file totals, one credit note |
END=4' | Four messages |
Amounts follow the same implied-decimal convention as the invoice file in this guide: four places on line values (38000 is £3.8000) and two on sub-totals and totals (456 is £4.56). The John Lewis Partnership's published invoice specification uses those formats; confirm the credit note precision in your own partner's guide.
Segment reference
Version 9 layouts. "M" is mandatory and "O" optional in the standard. The EANCOM column refers to an EDIFACT INVOIC sent as a credit note.
CREHDR: credit note file header
| Segment | Name | Status | What it carries | EANCOM equivalent |
|---|---|---|---|---|
MHD | Message header | M | Message number and CREHDR:version | UNH |
TYP | Transaction type | M | 0740 credit notes, 0741 self-billed, 0720 debit notes | BGM+381 (or 383 for a debit note) |
SDT | Supplier details | M | Supplier GLN and code, name, address, VAT number | NAD+SU with RFF+VA |
CDT | Customer details | M | Customer GLN, name, address, VAT number | NAD+BY |
DNA | Data narrative | O | File-level notes | FTX |
FIL | File details | M | File generation number, version and date | No direct equivalent |
MTR | Message trailer | M | Segment count | UNT |
CREDIT: one per credit note
| Segment | Name | Status | What it carries | EANCOM equivalent |
|---|---|---|---|---|
CLO | Customer's location | M | Location the credit relates to | NAD+DP |
CRF | Credit note references | M | Credit note number and date, tax point date, customer's debit note number and date, collection note number and date | BGM number, DTM+137, DTM+131, RFF |
PYT | Settlement terms | O | Settlement discount terms | PAT |
OIR | Original invoice references | O | The invoice (or invoices) being credited | RFF+IV |
DNA | Data narrative | O | Credit-level notes | FTX |
CLD | Credit note line details | M, repeats | Product, pack, quantity, unit credit value, line value, VAT, reason code | LIN, QTY+47, PRI+AAA, MOA+203, TAX+7 |
DNB | Data narrative | O, per line | Line-level notes | FTX at line level |
CST | VAT rate credit sub-trailer | M, one per rate | Lines, net, discounts reclaimed, VAT and amount for one VAT rate | Summary TAX+7 with MOA+125 and MOA+124 |
CTR | Credit note trailer | M | Totals across the CST segments | MOA+79, MOA+125, MOA+176, MOA+86 |
VATTLR and CRETLR: file trailers
| Message | Segment | What it carries | EANCOM equivalent |
|---|---|---|---|
VATTLR | VRS, one per VAT rate | Net, VAT and total for one rate across every credit in the file | None; each EANCOM credit note stands alone |
CRETLR | TOT | File totals and the number of credit notes | None |
Reading the CLD credit line
| Position | Field | In the short-delivery example |
|---|---|---|
| 1 | SEQA sequence number | 1 |
| 2 | SPRO GTIN of the traded unit, supplier's code, DUN-14 | 5098765100047:KV-1004 |
| 3 | SACU consumer unit EAN | empty |
| 4 | CPRO customer's own-brand EAN and item code | empty |
| 5 | UNOR consumer units per traded unit | 10 |
| 6 | QTYC traded units credited | 1 |
| 7 | UCRV credit value per unit, after line discount, before VAT | 38000 (£3.80) |
| 8 | EXLV net credit value, UCRV x QTYC | 38000 (£3.80) |
| 9 | VATC VAT category | S |
| 10 | VATP VAT rate | 20000 (20%) |
| 11 | CRRE credit reason: ANA code, partner's own code, description | 38::SHORT DELIVERY |
| 12 to 13 | MIXI mixed VAT indicator, DRLI debit line indicator | empty |
| 14 | TDES description | LINEN TEA TOWEL TWIN PACK |
Later optional positions carry the unit credit value before discount (UCRB) and the credited discount (CDSV).
Credit reason codes
CRRE takes a code from TRADACOMS code list 13. The ones UK suppliers use most:
| Code | Reason | Code | Reason |
|---|---|---|---|
38 | Short delivery | 08 | Damage in transit |
39 | Incorrect product delivered | 09 | Loss in transit |
40 | Non delivery | 17 | Trade price error |
11 | Delivery refused, late | 18 | VAT rate error |
21 | Out of date | 20 | Damage on premises |
27 | Promotion allowance | 28 | Rebate |
42 | Order cancelled | 44 | Defective product |
Send the code, not just the text. A retailer's matching system can route a 38 shortage straight to the goods-in record, while free text in CRRE description goes to a person.
Example: two credit notes, two VAT rates
One file, two credit notes. The first credits a case of chopping boards that arrived damaged at the distribution centre (reason 08). The second corrects a price: six recipe books were invoiced at £4.50 instead of the agreed £4.20, so 30p a book is credited (reason 17). Books are zero-rated, so the VATTLR carries one VRS for each rate.
CREHDR file with a damages credit and a price correction
Two CREDIT messages: one standard-rated damages credit (reason 08) and one zero-rated price correction (reason 17). VATTLR has a VRS per rate; CRETLR counts two credit notes.
CREHDR · Credit note file header · ref 1
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Supplier SDT | 5098765000002GS1 GLN | KESTREL VALLEY HOMEWARE LTD |
| Customer CDT | 5012345000008GS1 GLN | HARBOUR LANE STORES LTD |
CREDIT · Credit note · ref 2
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Delivery location CLO | 5012345000107GS1 GLN | HARBOUR LANE NORTHERN DC |
CREDIT · Credit note · ref 3
Parties
| Role | Identifier | Name and address |
|---|---|---|
| Delivery location CLO | 5012345000121GS1 GLN | HARBOUR LANE YORK |
VATTLR · VAT trailer · ref 4
CRETLR · Credit note file trailer · ref 5
Transmission (STX)
- Sender
- KESTREL VALLEY HOMEWAREcode 5098765000002
- Recipient
- HARBOUR LANE STORES LTDcode 5012345000008
- Prepared
- 2026-10-20 16:00:00
- Control reference
- KV0000323
- Syntax
- ANA:1
- Messages
- 5
The damages credit is £10.80 including VAT and the price correction £1.80, so TOT closes the file at £12.60 (1260) across two credit notes. The price credit uses the difference per unit (3000, 30p) as the unit credit value, not the full price.
Two cautions on sequence numbers. In these examples OIR, CLD and CST each start at 1. M&S's published CREHDR sample numbers its first-level segments in one running sequence instead (PYT 1, OIR 2, CLD 3, CST 4). Partner guides differ, so number them the way yours shows.
CREHDR to EANCOM INVOIC 381
EANCOM has no separate credit note message. A credit note is an INVOIC with document code 381, as the EDIFACT INVOIC guide shows with the same damaged-boards scenario.
| Business data | TRADACOMS credit note file | EANCOM INVOIC credit note |
|---|---|---|
| Document type | TYP=0740 | BGM+381 |
| Credit note number and date | CRF | BGM and DTM+137 |
| Tax point date | CRF third element | DTM+131 |
| Invoice being credited | OIR | RFF+IV |
| Customer's debit note | CRF fourth and fifth elements | RFF with the partner's agreed qualifier |
| Reason | CLD CRRE, per line | AJT (for example AJT+3 damaged goods) |
| Quantity credited | CLD QTYC | QTY+47 |
| Unit credit value | CLD UCRV, implied decimals | PRI+AAA, explicit decimal |
| Line value | CLD EXLV | MOA+203 |
| VAT per rate | CST | Summary TAX with MOA+125 and MOA+124 |
| Totals | CTR | MOA+79, MOA+125, MOA+176, MOA+86 |
| File VAT summary and totals | VATTLR, CRETLR | None |
In both standards the amounts are positive. The document type, not a minus sign, tells the receiver to treat them as a credit. In X12 a credit is usually an 810 with a credit indicator or an 812 credit/debit adjustment, depending on the partner.
Which UK retailers take CREHDR
Not every retailer accepts credit notes by EDI, so check before you build one.
- Co-op exchanges credit notes by EDI in TRADACOMS version 9, or through its SNC portal, and asks for the uplift note serial number on credits for uplifted goods, per its supplier guidelines. See the Co-op page.
- Asda trades invoices and credit notes in TRADACOMS, per ecosio. See the Asda page.
- Boots needs credit notes by EDI from pharmacy suppliers only, per ecosio. See the Boots page.
- M&S sends its own debit notes to Food suppliers in the TRADACOMS CREHDR layout with transaction code 0720. See the Marks & Spencer page.
- Ocado does not accept credit or debit notes by EDI, per ecosio, so credits go by another route. See the Ocado page.
Common CREHDR errors
- No reference to the original invoice. Without
OIR, the retailer cannot match the credit to anything. Quote the invoice number, and the customer's debit note inCRFif they raised one. - Negative amounts. All values are positive. A minus sign in
EXLVorCSTwill fail the file or, worse, turn the credit into a charge. - Crediting the full price for a price error. Credit the difference per unit, at the VAT rate of the original line.
- Free text instead of a reason code. Put the code list 13 code in the first component of
CRRE; the description is optional. - Trailer counts.
MTRcounts fromMHDtoMTRinclusive,CTRNCSTcounts the CST segments,TOTcounts credit notes, andENDcounts every message including the header and both trailers. - Reusing the invoice file's generation number.
FILgeneration numbers run per file type and per trading partner, so credit note files have their own sequence, separate from invoice files. - Mixing invoices and credits in one file. Invoices go in an INVFIL and credits in a CREHDR, each with its own trailers.
How OrderSync handles CREHDR
OrderSync raises credit notes against the invoices already in your system, so the original invoice reference, the reason code and the VAT rate of the credited line come from the record, not from someone retyping them. Each credit goes out in the format the customer trades: TRADACOMS CREHDR, EANCOM INVOIC 381, X12 or PDF. To check a credit note file you already have, paste it into the free EDIFACT inspector.
Frequently Asked Questions
What is CREHDR in EDI?
CREHDR is the TRADACOMS credit note file used in UK retail. Strictly it is the header message, but the whole file is usually called CREHDR. It contains the header, one CREDIT message per credit note, a VATTLR VAT summary and a CRETLR file trailer.
What is the difference between CREHDR and CREDIT?
CREHDR is the file header, sent once with the supplier, customer and file number. CREDIT is the detail message sent once per credit note, with the original invoice reference, the credited lines and the VAT sub-totals.
Can a debit note be sent as CREHDR?
Yes. The TRADACOMS code list defines transaction code 0720 for debit notes raised by the customer, and they use the same credit note file layout. M&S, for example, sends its debit notes to Food suppliers this way.
What reason codes can a TRADACOMS credit note carry?
The CLD segment's CRRE element takes a code from TRADACOMS code list 13, such as 38 short delivery, 08 damage in transit, 17 trade price error or 21 out of date, plus an optional partner code and description.
What is the EDIFACT equivalent of CREHDR?
An EANCOM INVOIC message with document code BGM+381, referencing the original invoice with RFF+IV and giving the reason in AJT. There is no separate credit note message in EANCOM.
Do credit note amounts have to be negative?
No. Amounts in a TRADACOMS credit note file are positive. The file type and the transaction code tell the receiver they are credits.
Related guides
- TRADACOMS INVFIL: the invoice file a credit note corrects
- TRADACOMS DLCHDR: the delivery confirmation that often triggers a credit
- TRADACOMS explained: syntax, STX and END, and how files work
- TRADACOMS file types: every file type and its EANCOM equivalent
- EDIFACT INVOIC: the EANCOM invoice and credit note
Sources
- TRADACOMS release 9 CREDIT layout, KA Software schema reference, including the CRF, CLD, CST, CTR and TYP code list pages
- M&S Debit Note implementation guide (TRADACOMS CREHDR), Marks & Spencer via GXS
- EDI - Tradacoms invoice specifications, John Lewis Partnership
- Co-op supplier guidelines, Co-op
- Doing EDI with Boots and Setting up an EDI connection with Ocado, ecosio
- Ending support for TRADACOMS, GS1 UK
Check a CREHDR's structure, counts and trailers in the free EDIFACT inspector.