All guides

EDI 812 credit/debit adjustment: BCD segment, reason codes, what to check

An EDI 812 is a credit/debit adjustment. It tells a trading partner that an amount on an invoice should go up or down, and it gives a reason. For example (illustrative), if a customer says “we are taking $480 off that invoice” and you only learn why from an email thread, the 812 is the message that can carry the amount and the reason in a structured form.

What is an EDI 812?

Stedi’s X12 4010 812 reference names it the Credit/Debit Adjustment. It says the transaction set can notify “a trading partner of an adjustment or billback” and can also be used to request one. It is multi-directional. Stedi also lists it as a Draft Standard for Trial Use in release 4010.

It reports or requests an adjustment. It does not move money, and either side can send it. It sits next to the invoice. An 810 invoice states what is owed. An 812 changes that figure after the fact. An 820 payment order or remittance advice can then show the money that actually moved.

If a customer short-pays your invoice, the chargebacks guide covers how deductions arise. Ask each partner which message, if any, explains a deduction.

Which segments does an 812 need?

Per Stedi’s 4010 page, these are mandatory:

Segment What it does
ST Starts the transaction set
BCD Beginning segment for the credit/debit adjustment (one per set)
N1 loop Names the parties (repeats up to 200 times)
SE Ends the transaction set

Optional header segments include CUR for currency, N9 for reference numbers, ITD for terms, DTM for dates, SHD for shipment detail and SAC for allowances or charges. Stedi’s note says SHD is used to show shipment detail for credit or debit of returned product.

The detail area holds an optional CDD loop, which can repeat. Each loop starts with a mandatory CDD segment for one line item adjustment. Inside it, optional LIN, PO4, SAC, N9 and DTM segments can tie the line back to a product.

Where the 812 sits in an order
  1. 1Purchase order (850)
  2. 2Invoice (810)
  3. 3Problem found
  4. 4Adjustment (812)
  5. 5Payment or remittance (820)

A typical order flow. Which messages a partner actually uses varies.

What does the BCD segment contain?

Stedi’s BCD page lists five mandatory elements:

  • BCD01 is the date.
  • BCD02 is the credit/debit adjustment number.
  • BCD03 is the transaction handling code.
  • BCD04 is the amount.
  • BCD05 is the credit/debit flag code.

Optional or conditional elements follow. BCD07 is the invoice number, BCD08 the vendor order number, BCD10 the purchase order number, and BCD13 and BCD14 a reference qualifier and a reference ID.

The page gives these rules:

  • At least one of BCD07, BCD10 or BCD14 is required. So every 812 points to an invoice, a purchase order or another reference.
  • If either BCD13 or BCD14 is present, the other is required.
  • For BCD11, only codes 00, 05, 06, 07 and 15 are permitted.

Per Stedi’s note on the transaction set, BCD05 indicates whether the net of the detail is a credit or a debit. The two values, per Stedi’s code list, are C for credit and D for debit. Read the flag with the amount. A positive amount with the wrong flag changes the money in the opposite direction.

BCD03 tells you what to do with the adjustment. These are some of the codes in Stedi’s list for element 305:

Code Meaning
A Off Invoice (Deduction from Original Invoice)
H Notification Only
J Payment Requested (Adjustment to Account)
O Deduct from Next Remittance
Q Credit Due, Payment Being Issued
T Adjustment Requested

The full list is longer and includes codes for remittance detail and split payments. Codes A and O mean the amount is being deducted, from the original invoice (A) or from the next remittance (O). Code H says only that the adjustment exists. Code T asks you to agree to it. These are different follow-ups, so do not treat all 812s alike.

What do the CDD segment and reason codes say?

The CDD segment, per Stedi’s CDD page, provides “information relative to a line item adjustment.” Its first two elements are mandatory:

  • CDD01 is the adjustment reason code.
  • CDD02 is the credit/debit flag for that line.

Other elements carry the amount (CDD04), the quantity (CDD07) and its unit (CDD08), and unit prices. Stedi lists these syntax rules:

  • At least one of CDD04 or CDD07 is required.
  • If CDD07 is present, CDD11 (a unit price) is required.
  • If either CDD07 or CDD08 is present, the other is required.

The reason code list is long. In Stedi’s list for element 426, examples that order teams meet often include:

Code Meaning
01 Pricing Error
03 Extension Error
04 Item Not Accepted - Damaged
06 Quantity Contested
07 Incorrect Product
19 Duplicate Billing
59 Item not received
70 Advanced Ship Notice Not Received
72 Authorized Return
RD Receiving Discrepancy
ZZ Mutually Defined

Some of these point to other messages. Code 70 points to your 856 advance ship notice. Code RD or 06 may line up with an 861 receiving advice. Code ZZ means the two partners agreed on its meaning, so you need their guide.

How should an order team review an 812?

  1. Match the reference. Use BCD07, BCD10 or BCD14 to find the invoice or order. If nothing matches, stop and ask.
  2. Check the flag and the amount. Confirm that BCD05 and BCD04 agree with the CDD lines. Stedi’s notes say BCD05 shows whether the net of the detail is a credit or a debit, so the detail should agree with the header.
  3. Read the handling code. Decide whether you are being told (H), asked (T) or being short-paid now or on the next payment (A or O).
  4. Compare the reason with your records. A “quantity contested” claim should be checked against the ship notice, the carrier record and any receiving advice.
  5. Accept, dispute or correct. Reply by the route your partner expects, which their guide should name.
  6. Write down the outcome. Note who decided and why, so the same adjustment does not return.

What goes wrong with 812 data?

These are practical risks, not rules from the standard:

  • Reversed flag. A credit is read as a debit, or the reverse.
  • Vague reasons. A partner sends ZZ or a catch-all code for many cases. Ask what each value means.
  • Duplicates. The same adjustment arrives twice with different adjustment numbers.
  • Missing links. The invoice reference is the only tie to your books. A typo means a manual hunt.
  • Acknowledgment confusion. A 997 functional acknowledgment says the file was received. It does not say you agree with the adjustment.

Where Dockmend fits

Dockmend is being built to help operations teams compare adjustment claims with the invoice, ship notice and order history, and flag those that do not match for a person to review. It is still being built, and we have not announced support for any specific EDI network or message. Start your free trial

This guide is general information, not legal, accounting or professional advice. EDI details vary by trading partner, version and implementation guide, so check your partner’s before you build or change anything.