Skip to content

EDI 820: How to Read the Deductions on a Retailer's Payment

How to read an EDI 820: where deductions sit, a reason code table, Walmart codes and how to tie each line to a PO. KSP holds 99.999% order accuracy.

, National Sales Representative

· 11 min read

A KSP team member working at a dual-monitor desk in the KSP office

What is an EDI 820, and how do you read the deductions on it? An EDI 820 is the X12 Payment Order/Remittance Advice, the file a retailer sends to explain a payment: the total paid, which invoices it covers and what it took off each one. To read the deductions, find the RMR line for an invoice and compare the amount billed with the amount paid. The ADX lines under it explain the gap, each with a dollar amount and a two-character reason code, such as 06 for a quantity the retailer contests. If they don't add up to the gap, part of the deduction has no stated reason.

Every dollar a retailer keeps from your payment shows up on its EDI 820 as an adjustment with a reason code, tied to an invoice or listed on its own. Some of those codes are trade terms you agreed to. Others say a shipment arrived short, late or mislabeled. Those trace back to the warehouse that ships your retail and wholesale orders. When the same warehouse also handles your ecommerce fulfillment, retail POs and web orders pull from one pool of stock. Below: how to read an 820 line by line, what the common reason codes mean, and how to tie each deduction to a PO and the step that caused it.

What is an EDI 820 used for?

The X12 standard defines the 820 for three jobs: to make a payment, to send a remittance advice, or to do both at once. The 820 a supplier gets from a retailer is the remittance advice. The money moves by ACH, wire or check, and the 820 explains how that money applies to your open invoices.

It closes out the order cycle. The retailer sends an 850 purchase order, you send an 856 ship notice and an 810 invoice, and the 820 comes back with the payment. If you're new to the document numbers, our guide to what EDI is and how retailers use it covers the full set.

Target lists the 820 among the EDI documents it exchanges with suppliers, according to the EDI networks that connect to it. Walmart sends its deduction detail on other documents, covered further down, and its supplier invoice report carries a reason code and reason description for each invoice.

Which parts of an 820 carry the deductions?

An 820 is a stack of segments. Five of them matter when you're looking for money:

SegmentWhat it holdsWhat to read
BPRThe payment itselfThe total amount paid and how it was sent (check, ACH, wire)
TRNThe trace numberThe check or payment number your bank shows. Match the 820 to the deposit with it.
RMROne invoice or open itemYour invoice number, the amount paid on it and the amount you billed
ADXOne adjustmentThe dollar amount, the reason code and the retailer's reference number for that deduction
REF and DTMReferences and datesThe PO number, department, store or invoice date that goes with the line above it


The ADX segment can show up in two places. Under an RMR, the adjustment was taken against that invoice. On its own, outside any RMR, it's an adjustment the retailer didn't net against a specific invoice. Home Depot's 820 guide puts those in a separate ADX loop ahead of the invoice lines. Those standalone lines are the hardest to trace, because there's no invoice number to start from.

Each ADX has four parts. ADX01 is the amount, and a negative number reduces your payment. ADX02 is the reason code. ADX03 and ADX04 are a qualifier and a reference number, usually the retailer's debit memo or claim number. When the retailer also sent an 812 for that deduction, the ADX04 number matches the 812's own ID, which is how you pull the store, item and reason behind the line. Keep that reference. It's the number the retailer will ask for if you dispute the line.

How to read one invoice on an 820: a worked example

JCPenney's published 820 guide walks through a real-format example. Here is one invoice from it, line by line, with the elements split by asterisks:

Line on the 820How to read it
RMR*IV*00678231*PO*769.13*830.90*61.77Invoice 00678231, billed at $830.90 (RMR05), paid at $769.13 (RMR04). JCPenney reports the $61.77 it kept in RMR06.
ADX*-15.15*79$15.15 taken under code 79, Cooperative Advertising
ADX*-30*82$30.00 taken under code 82, Defective Allowance
ADX*-16.62*76$16.62 taken under code 76, Cash Discount, which here is the 2% terms discount


Now check the math: $15.15 + $30.00 + $16.62 = $61.77. The adjustments account for the whole gap between billed and paid, so nothing on this invoice is unexplained.

Two of those three are terms you agreed to: the co-op deal and the 2% early-payment discount. The $30.00 defective allowance is the one to look at. It's the only line that says something went wrong with the product, and it's the only one that needs a record from the warehouse to check.

When the ADX lines don't add up to the gap, the retailer took money it didn't code. Ask for the debit memo before anything else.

Two other rows need a second look. A negative RMR row, where the amount paid is below zero, is a credit memo or an earlier debit the retailer is taking back out of this payment, so it lowers the total without touching any open invoice. The sample 820 that 1 EDI Source publishes ends with one: after seven invoice rows, a row for document 64024003 shows -1.18 paid and the code CM, a $1.18 credit memo subtracted from the payment. And on some retail programs, the retailer nets a contracted fee out of the paid amount without sending an ADX line at all. On those, the only sign is RMR04 coming in below RMR05 minus the terms discount, so check the gap against your program terms.

What do the adjustment reason codes on an 820 mean?

ADX02 uses X12 element 426, the Adjustment Reason Code. The 4010 version of the standard lists 370 of them, from pricing errors to insurance and payroll codes that never touch retail. Each retailer uses its own subset, and its 820 guide says which. These are the ones a brand shipping to retail DCs sees most, with the X12 name and the record that answers each one:

CodeX12 nameWhat the retailer is sayingWhere to look first
06Quantity ContestedWe received fewer units than you billedScan count at pack, the ASN quantities, the signed BOL
59Item not receivedBilled but never arrivedWhether the invoice was built from the PO or from what shipped
75Total Order Not ReceivedNothing arrived for this orderPickup record, carrier tracking, proof of delivery
A9Proof of Delivery Not ReceivedSend proof it was deliveredThe DC-signed proof of delivery
73Bill of Lading Not ReceivedSend the bill of ladingThe signed BOL from the dock
70Advanced Ship Notice Not ReceivedNo ASN arrived for this shipmentWhether the 856 went out before the truck and was accepted
99Late Shipment of GoodsIt shipped or arrived outside the windowPickup timestamp, appointment confirmation
B8Routing ViolationYou didn't follow our routing instructionsCarrier used and the routing guide version
A6Packing ViolationsCases, pallets or packing broke our rulesCase pack, pallet build and photos at loading
C8Ticketing ErrorPrice tickets or labels were wrongLabel and ticket files, carton label scans
04Item Not Accepted - DamagedIt arrived damagedPallet wrap, loading photos, the BOL notes
A5OverageWe received more than we orderedPick count against the PO
01Pricing ErrorYour invoice price doesn't match oursItem cost setup, not the warehouse
79, A8Cooperative Advertising, Promotional AllowanceTrade spend you agreed toYour trade terms and promotion calendar
76Cash DiscountEarly-payment termsYour payment terms


The top half of the table is the warehouse's half. Shortages, missing ASNs, late shipments, routing, packing and labels all come from steps that happen between the pick and the truck leaving. The bottom half is commercial: pricing, allowances and terms, which your sales and finance team settles with the buyer.

Code 70 can land on a PO that shipped correctly, because the retailer's system rejected the ASN file. If code 70 shows up on a PO your team says it sent an ASN for, check what the retailer sent back. The 997 only confirms the file arrived, while the 824 lists what was wrong with it, which our guide to the 856 ship notice explains.

Walmart deduction codes and their EDI equivalents

Walmart numbers its deductions with its own codes, and there are over 100 of them. These are the ones that point at the warehouse:

Walmart codeDescriptionEDI codeX12 name
21Concealed Shortages06Quantity Contested
22Goods Billed not Shipped59Item not received
24Carton Shortage/Freight Bill Signed Short06Quantity Contested
25No Merchandise Received for InvoiceA9Proof of Delivery Not Received
30Duplicate Billing19Duplicate Billing
40Routing Violation, Excessive FreightB8Routing Violation
65Late Shipment99Late Shipment of Goods


The Walmart descriptions come from SPS Commerce's list of Walmart deduction codes, and the EDI equivalents from Smyyth's Walmart code list, checked against the X12 names. Walmart deductions usually reach suppliers through the EDI 812 Credit/Debit Adjustment, the document X12 built for notifying a trading partner of an adjustment.

Watch the number 99. In X12 it means Late Shipment of Goods. On Walmart's own list, code 99 is OTIF, the on-time, in-full fine. If one report shows Walmart codes and another shows X12 codes, the same two digits can mean different charges. Our guide to OTIF and how retailers measure it covers that fine.

Walmart's codes 21, 24 and 25 all say "we got less than you billed," but each points at different evidence. With 24, the DC signed the freight bill short at the door, so pull the carton count on the signed BOL first. A 21 is a concealed shortage, one that wasn't visible when the shipment was received, like units missing inside a carton or pallet, so you need what was packed into each one. On a 25, nothing was received against the invoice at all, so start with proof the truck delivered.

How do you tie each deduction to a PO and the step that caused it?

Work one line at a time, from the 820 back to the dock:

  1. Invoice to PO. Take the invoice number from RMR02. JCPenney's 820 sends the PO number in a REF segment under the same RMR. If your retailer's doesn't, your 810 invoice has it.
  2. PO to shipment. Pull what shipped against that PO: the ASN you sent, the bill of lading and the scan record of what went onto each pallet.
  3. Code to record. Use the table above to pick the record that answers the code. A shortage code wants counts. A late code wants timestamps. A routing code wants the carrier and the routing guide in force on the ship date.
  4. Compare. If the scan count, the ASN and the signed BOL agree with your invoice, the deduction is wrong and you have the records to say so. If the scan count matches the deduction, the shortage was real and the fix is at the pack station.
  5. Keep the reference. Log the ADX04 reference with the PO, the code, the amount and what you found.

Sort a month of deductions by code and by retailer. A code that comes back from the same retailer every month is a process fix in the warehouse, and fixing it saves more than winning the disputes one by one. Dispute steps, deadlines and Walmart's APDP dispute portal differ by retailer, and our guide to vendor chargebacks and how to stop them covers them.

How KSP handles the warehouse side of a retail PO

Every shortage, missing-ASN and late code in the table above traces back to a record the warehouse either kept or didn't. KSP keeps those records as part of shipping the order.

Purchase orders arrive over EDI through SPS Commerce or TrueCommerce and are allocated against live stock before they reach the floor. Every case and unit barcode is scanned against the order, and a mismatch stops the workflow until it's corrected. UCC-128 carton labels are verified before cartons close, pallets are built to the retailer's routing guide, and the ASN is built from what was scanned onto each pallet, then sent before the truck leaves. KSP books delivery appointments and works with the retailer's carrier on routed freight, so the pickup and appointment records sit with the shipment.

When a deduction comes back, those scans, the ASN and the BOL are the records step 4 compares. If it was a KSP warehouse mistake, KSP investigates the deduction and pays it. KSP holds 99.999% order accuracy across 32.1M orders.

Frequently asked questions

What is the difference between an EDI 820 and an EDI 812?

The 812 Credit/Debit Adjustment tells a trading partner about an adjustment or billback, or asks for one. The 820 Remittance Advice comes with the payment and shows each invoice paid and every amount taken off it. Walmart deductions usually reach suppliers on an 812.

Find the step behind each deduction

Every code on your 820 points to a step between the PO and the truck pulling away, and most brands can't say who does each step. The Retail PO Audit is a free PDF that has you line up 90 days of deductions against the eight jobs on a retail order, sort them into five piles by cause and find the ones still inside their dispute window.

It also gives you the one question to ask your 3PL about where your ASN quantities come from. You can finish it in an afternoon with one recent PO from each retailer.