# TRADACOMS CREHDR: The UK Credit Note File

> TRADACOMS CREHDR credit note files explained: CREDIT, VATTLR and CRETLR messages, CLD lines and reason codes, live shortage and damage credits, and EANCOM 381.

<QuickAnswer>
CREHDR is the TRADACOMS credit note file a UK supplier sends to reduce what a customer owes. It holds a CREHDR header, one CREDIT message per credit note with CLD lines, reason codes and CST VAT sub-totals, a VATTLR VAT summary and a CRETLR file trailer. Its EANCOM equivalent is an INVOIC message with document code 381.
</QuickAnswer>

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](/guides/edi/tradacoms-invfil) 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.

<EDIGuideCTA
  badge="For TRADACOMS CREHDR"
  transactionType="810"
  headline="Check a credit note file before it goes"
  body="Paste a TRADACOMS CREHDR into the free EDIFACT inspector to see each credit, its VAT sub-totals and trailers, with MTR and END counts checked. OrderSync processes EDIFACT, EANCOM and TRADACOMS alongside X12, PDF, CSV and email, straight into your ERP."
  secondaryHref="/edifact-inspector"
  secondaryLabel="Try the free EDIFACT inspector"
/>

## 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.

<EdifactSample
  title="CREHDR file crediting one short-delivered case"
  description="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%."
  label="TRADACOMS"
  raw="STX=ANA:1+5098765000002:KESTREL VALLEY HOMEWARE+5012345000008:HARBOUR LANE STORES LTD+261019:160000+KV0000322+PASSW+CREHDR+B'
MHD=1+CREHDR:9'
TYP=0740+CREDIT-NOTES'
SDT=5098765000002:000041207+KESTREL VALLEY HOMEWARE LTD++987654321'
CDT=5012345000008+HARBOUR LANE STORES LTD'
FIL=88+1+261019'
MTR=6'
MHD=2+CREDIT:9'
CLO=5012345000114:0114+HARBOUR LANE LEEDS'
CRF=KV-CRN-04416+261019+261019+HL-DBN-5521+261018'
OIR=1+KV-INV-20932'
CLD=1+5098765100047:KV-1004+++10+1+38000+38000+S+20000+38::SHORT DELIVERY+++LINEN TEA TOWEL TWIN PACK'
CST=1+S+20000+1+380+++380++380+76+456+456'
CTR=1+380+++380++380+76+456+456'
MTR=8'
MHD=3+VATTLR:9'
VRS=1+S+20000+380+380+76+456+456'
MTR=3'
MHD=4+CRETLR:9'
TOT=380+380+76+456+456+1'
MTR=3'
END=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](/guides/edi/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.

<EdifactSample
  title="CREHDR file with a damages credit and a price correction"
  description="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."
  label="TRADACOMS"
  raw="STX=ANA:1+5098765000002:KESTREL VALLEY HOMEWARE+5012345000008:HARBOUR LANE STORES LTD+261020:160000+KV0000323+PASSW+CREHDR+B'
MHD=1+CREHDR:9'
TYP=0740+CREDIT-NOTES'
SDT=5098765000002:000041207+KESTREL VALLEY HOMEWARE LTD++987654321'
CDT=5012345000008+HARBOUR LANE STORES LTD'
FIL=89+1+261020'
MTR=6'
MHD=2+CREDIT:9'
CLO=5012345000107:00212+HARBOUR LANE NORTHERN DC'
CRF=KV-CRN-04417+261020+261020'
OIR=1+KV-INV-20931'
CLD=1+5098765100016:KV-1001+++6+1+90000+90000+S+20000+08::DAMAGED IN TRANSIT+++BAMBOO CHOPPING BOARD:LARGE'
CST=1+S+20000+1+900+++900++900+180+1080+1080'
CTR=1+900+++900++900+180+1080+1080'
MTR=8'
MHD=3+CREDIT:9'
CLO=5012345000121:0121+HARBOUR LANE YORK'
CRF=KV-CRN-04418+261020+261020'
OIR=1+KV-INV-20933'
CLD=1+5098765100054:KV-2001+++1+6+3000+18000+Z+0+17::TRADE PRICE ERROR+++KESTREL KITCHEN RECIPE BOOK'
CST=1+Z+0+1+180+++180++180+0+180+180'
CTR=1+180+++180++180+0+180+180'
MTR=8'
MHD=4+VATTLR:9'
VRS=1+S+20000+900+900+180+1080+1080'
VRS=2+Z+0+180+180+0+180+180'
MTR=4'
MHD=5+CRETLR:9'
TOT=1080+1080+180+1260+1260+2'
MTR=3'
END=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](/guides/edi/edifact-invoic) 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](/guides/edi/810-invoice) with a credit indicator or an [812 credit/debit adjustment](/guides/edi/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](https://supplier.coop.co.uk/supplierguidelines). See the [Co-op page](/edi-compliance/co-op).
- **Asda** trades invoices and credit notes in TRADACOMS, per ecosio. See the [Asda page](/edi-compliance/asda).
- **Boots** needs credit notes by EDI from pharmacy suppliers only, per ecosio. See the [Boots page](/edi-compliance/boots).
- **M&S** sends its own debit notes to Food suppliers in the TRADACOMS CREHDR layout with transaction code 0720. See the [Marks & Spencer page](/edi-compliance/marks-and-spencer).
- **Ocado** does not accept credit or debit notes by EDI, per ecosio, so credits go by another route. See the [Ocado page](/edi-compliance/ocado).

## Common CREHDR errors

1. **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 in `CRF` if they raised one.
2. **Negative amounts.** All values are positive. A minus sign in `EXLV` or `CST` will fail the file or, worse, turn the credit into a charge.
3. **Crediting the full price for a price error.** Credit the difference per unit, at the VAT rate of the original line.
4. **Free text instead of a reason code.** Put the code list 13 code in the first component of `CRRE`; the description is optional.
5. **Trailer counts.** `MTR` counts from `MHD` to `MTR` inclusive, `CTR` `NCST` counts the CST segments, `TOT` counts credit notes, and `END` counts every message including the header and both trailers.
6. **Reusing the invoice file's generation number.** `FIL` generation numbers run per file type and per trading partner, so credit note files have their own sequence, separate from invoice files.
7. **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](/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](/guides/edi/tradacoms-invfil)**: the invoice file a credit note corrects
- **[TRADACOMS DLCHDR](/guides/edi/tradacoms-dlchdr)**: the delivery confirmation that often triggers a credit
- **[TRADACOMS explained](/guides/edi/tradacoms)**: syntax, STX and END, and how files work
- **[TRADACOMS file types](/guides/edi/tradacoms-file-types)**: every file type and its EANCOM equivalent
- **[EDIFACT INVOIC](/guides/edi/edifact-invoic)**: the EANCOM invoice and credit note

## Sources

- [TRADACOMS release 9 CREDIT layout](https://www.kasoftware.com/schema/edi/tradacoms/9/messages/CREDIT/), KA Software schema reference, including the CRF, CLD, CST, CTR and TYP code list pages
- [M&S Debit Note implementation guide (TRADACOMS CREHDR)](https://mands.gxs.co.uk/content/Implementation_Guides/MS_Message_Implementation_Guide_Debit_Note_tradacom_250211.pdf), Marks & Spencer via GXS
- [EDI - Tradacoms invoice specifications](https://www.jlpsuppliers.com/supplier-finance-queries/new-connections/edi-tradacoms-invoice-specifications), John Lewis Partnership
- [Co-op supplier guidelines](https://supplier.coop.co.uk/supplierguidelines), Co-op
- [Doing EDI with Boots](https://ecosio.com/en/blog/doing-edi-with-boots-a-suppliers-guide/) and [Setting up an EDI connection with Ocado](https://ecosio.com/en/blog/setting-up-an-edi-connection-with-ocado/), ecosio
- [Ending support for TRADACOMS](https://www.gs1uk.org/insights/news/ending-support-for-tradacoms), GS1 UK

Check a CREHDR's structure, counts and trailers in the free [EDIFACT inspector](/edifact-inspector).
