The EDI 823 is the lockbox's report of what came in the mail. Your customers mail checks to a post office box. The bank collects them, deposits them, captures the remittance stubs, and sends you an 823: one deposit of $14,327.50, three checks, five invoice references, one short-pay. Your cash application system matches each check to open invoices and posts it. Without the 823, someone in AR works from check images and a deposit total, one stub at a time.
This guide covers how a wholesale lockbox works, what the 823 carries, every segment you will map, a live example of a three-check deposit, how to apply cash from it, and the errors that leave payments unapplied.
What Is an EDI 823?
An EDI 823 is the Lockbox transaction set defined by the ASC X12 standards body, used to send lockbox (incoming payment) information and totals from a bank or other lockbox service provider to a company. It travels in functional group LB (the GS01 value).
Authoritative references for 823 work:
- The X12 transaction set catalog defines the 823, and the Stedi X12 004010 823 reference shows the full structure: the DEP deposit loop, the BAT batch loop, and the BPR payment loop with its RMR open items
- Published trading partner guides, such as J.R. Simplot's 004010 823 specification, show the subset banks send in practice:
AMTqualifier3for the deposit total and2for the batch total,QTYqualifiers41and42for the number of batches and checks, andREFCKfor check numbers - Your lockbox bank's own file specification governs which segments it sends and how it keys remittance data. Many banks offer the same data in BAI or their own fixed-width layouts too
Who sends it? The bank that runs your lockbox, or a lockbox processing provider working for it.
Who receives it? Accounts receivable, or the cash application module of your ERP.
When is it sent? After each deposit. Banks often run several deposit cycles a day, and you may receive an 823 for each, or one per day.
Why does it matter? The 823 is what turns a deposit into applied cash. Every check the 823 does not tie to an invoice stays unapplied, and every short-pay it reports has to be researched.
How a Wholesale Lockbox Works
A lockbox is a payment collection service. Customers send payments to a post office box the bank controls instead of to your office.
- Mail pickup. The bank collects mail from the lockbox address several times a day.
- Open and image. Staff or machines open each envelope, image the check and the remittance documents, and record the postmark date where your agreement asks for it.
- Capture. The bank reads the check's MICR line (routing number, account number, check number) and keys or scans the remittance data: invoice numbers and amounts from stubs, letters or attached statements.
- Batch and deposit. Checks are grouped into batches, and batches into a deposit credited to your account the same day.
- Transmit. The bank builds an 823 per deposit or per day and sends it to you, typically with images available in its portal.
- Apply. Your system reads the 823 and matches each check to open invoices.
There are two flavors. Wholesale lockbox handles business-to-business payments: fewer, larger checks with varied remittance documents. Retail lockbox handles high volumes of consumer payments with a standard scannable coupon. The 823 serves both, but wholesale is where most supply chain companies meet it. Healthcare lockboxes are different again: many banks convert paper explanation-of-benefits documents into an 835 Health Care Claim Payment/Advice instead.
Interactive Example: Lockbox Deposit With Three Checks
A camping-gear supplier's lockbox receives three customer checks on November 6. The bank deposits them as one deposit (DEP) of $14,327.50 (AMT 3), in one batch (QTY 41) of three checks (QTY 42). Each check is a BPR with the drawer's bank routing and account number, followed by its check number (REF CK), postmark date (DTM 108) and the invoices it pays (RMR). The first check pays two invoices. The third pays $2,000.00 against a $2,450.00 invoice, a $450.00 short-pay with no explanation on the stub.
Use the Plain English tab for a readable summary, or click any segment to break it down element by element.
823 Lockbox Deposit with Three Checks
One lockbox deposit of $14,327.50 in one batch: three customer checks in BPR, each with its check number (REF CK), postmark date (DTM 108) and the invoices it pays (RMR). The third check pays $2,000.00 against a $2,450.00 invoice, a short-pay the lockbox reports but cannot explain
- Document
- 823 Lockbox
- From / to
- LAKESHOREBANK → CEDARPEAK
- Segments
- 27
- Interchange date
- Nov 6, 2026
Raw EDI (X12)
Human-Readable
Interchange
Functional Group
Transaction 823
LockboxSegment Detail
The arithmetic your cash application should check: $8,240.00 + $4,087.50 + $2,000.00 = $14,327.50, which equals both the batch total and the deposit total. The first check's two invoices ($5,000.00 + $3,240.00) equal its $8,240.00.
823 Structure at a Glance
| Area | Segment | Name | Usage | Notes |
|---|---|---|---|---|
| Heading | ST | Transaction Set Header | Mandatory | ST01 = 823 |
| Heading, N1 loop | N1 / N2 / N3 / N4 / REF / PER | Name | Mandatory, up to 2 | The lockbox bank (BK), and optionally the company that owns the lockbox (PE) |
| Heading | TRN / DTM | Trace, Date/Time | Optional | Some banks add a file trace and creation date |
| DEP loop | DEP | Deposit | Mandatory, repeats | Lockbox number, deposit date, deposit number, bank and account |
| DEP loop | AMT | Monetary Amount | Mandatory | Deposit total |
| DEP loop | QTY | Quantity | Mandatory, up to 2 | Number of batches, number of checks |
| DEP loop | REF / DTM | Reference, Date/Time | Optional | Deposit references and dates |
| BAT loop | BAT | Batch | Optional, repeats | Batch date and number |
| BAT loop | AMT | Monetary Amount | Optional | Batch total |
| BPR loop | BPR | Beginning Segment for Payment Order/Remittance Advice | Repeats | One per check or payment |
| BPR loop | REF | Reference Identification | Optional | Check number, and other references such as a scan line |
| BPR loop | DTM | Date/Time Reference | Optional | Postmark, check date or receipt date |
| BPR, N1 loop | N1 | Name | Optional | The remitter, where the bank captures it |
| BPR, RMR loop | RMR | Remittance Advice Accounts Receivable Open Item Reference | Optional, repeats | One per invoice or open item paid |
| Trailer | SE | Transaction Set Trailer | Mandatory | Segment count and control number |
The X12 structure also allows adjustments, line-item detail and other loops under each payment. Most banks send only the core shown here; check your bank's specification before you build for the rest.
Key Segments Explained
N1: Lockbox Bank and Payee
N1*BK*FIRST LAKESHORE BANK*13*999000013~
N1*PE*CEDAR PEAK OUTDOOR CO~
The heading N1 loop identifies the lockbox's depository bank (BK), commonly by Federal Reserve routing number with qualifier 13. A second N1 with PE (payee) can name the company that owns the lockbox.
DEP: Deposit
DEP*40217*20261106*1030*D1106-01*01*999000013*DA*48120017755~
| Element | Name | Example | What it means |
|---|---|---|---|
| DEP01 | Reference Identification | 40217 | The lockbox number |
| DEP02 | Date | 20261106 | The deposit date |
| DEP03 | Time | 1030 | The deposit time, when sent |
| DEP04 | Reference Identification | D1106-01 | The deposit number |
| DEP05 | (DFI) ID Number Qualifier | 01 | 01 = ABA routing number |
| DEP06 | (DFI) Identification Number | 999000013 | The depository bank's routing number |
| DEP07 | Account Number Qualifier | DA | DA = demand deposit account |
| DEP08 | Account Number | 48120017755 | The account the deposit was credited to |
DEP04 is what you match to the credit on your bank statement or BAI2 file. Two 823s on the same day with the same lockbox number are normal when the bank runs several deposit cycles; they are told apart by the deposit number.
AMT and QTY: Deposit Totals
AMT*3*14327.50~
QTY*41*1~
QTY*42*3~
In the DEP loop, AMT01 = 3 marks the deposit total, QTY01 = 41 the number of batches and QTY01 = 42 the number of checks. Reconcile all three before posting: the sum of the BPR02 amounts must equal the deposit total, and the count of BPR segments must equal the check count. A mismatch means the file is incomplete or a check was keyed twice.
BAT: Batch
BAT*20261106**001~
AMT*2*14327.50~
| Element | Name | Example | What it means |
|---|---|---|---|
| BAT01 | Date | 20261106 | The batch date |
| BAT02 | Time | Optional batch time | |
| BAT03 | Reference Identification | 001 | The batch number |
| BAT04 | Batch Type Code | The batch's status, where the bank sends it |
At least one of BAT01 or BAT03 is required. The AMT with qualifier 2 that follows is the batch total.
BPR: The Check
BPR*I*8240.00*C*CHK*PBC*01*999000026*DA*7730041185~
The 823 reuses the BPR segment from the 820, but here it describes a check the bank received, not a payment instruction.
| Element | Name | Example | What it means |
|---|---|---|---|
| BPR01 | Transaction Handling Code | I | I = remittance information only. The money is already in the deposit |
| BPR02 | Monetary Amount | 8240.00 | The check amount |
| BPR03 | Credit/Debit Flag Code | C | Credit |
| BPR04 | Payment Method Code | CHK | Check |
| BPR05 | Payment Format Code | PBC | Commercial/corporate check |
| BPR06 | (DFI) ID Number Qualifier | 01 | ABA routing number |
| BPR07 | (DFI) Identification Number | 999000026 | The routing number of the bank the check is drawn on, from the MICR line |
| BPR08 | Account Number Qualifier | DA | Demand deposit account |
| BPR09 | Account Number | 7730041185 | The drawer's account number, from the MICR line |
The routing and account pair in BPR07 and BPR09 is the most reliable way to identify who paid, more reliable than the name on the check. Many cash application systems keep a table of MICR pairs per customer and learn new ones as AR confirms them.
REF and DTM: Check References
REF*CK*104552~
DTM*108*20261103~
REF with CK carries the check number. Banks may add other REF qualifiers for a batch number, a payee code or the scan line from a remittance coupon. DTM with 108 is the postmark date; banks may also send the check date or the date the lockbox received the item. Postmark dates matter when a customer takes an early-payment discount: they show whether the payment was sent in time.
RMR: The Invoices Paid
RMR*IV*INV-50190**2000.00*2450.00~
| Element | Name | Example | What it means |
|---|---|---|---|
| RMR01 | Reference Identification Qualifier | IV | IV = seller's invoice number |
| RMR02 | Reference Identification | INV-50190 | The invoice number, as captured from the remittance |
| RMR03 | Payment Action Code | Optional instruction for how to apply the item | |
| RMR04 | Monetary Amount | 2000.00 | The amount applied to this item |
| RMR05 | Monetary Amount | 2450.00 | The invoice amount, where the remittance shows it |
An RMR with an invoice number pays that open item. An RMR with only an amount is a payment on account. A check with no RMR at all means the bank found no remittance data, and the cash sits unapplied until someone looks at the image.
The lockbox reports what the stub said, nothing more. It does not know why a customer paid $2,000.00 on a $2,450.00 invoice. If your customer sends an 820 or emails a remittance with ADX-style reasons, that is where the explanation lives.
Applying Cash From an 823
A practical matching order:
- Reconcile the file. Sum of checks equals batch totals equals deposit total; check count equals
QTY42. MatchDEP04and the total to the bank credit. - Identify the customer. Use the
BPR07/BPR09MICR pair first, then any remitter name, then the invoice numbers themselves. - Match invoices exactly. Look up each
RMR02among that customer's open items. Normalize prefixes and leading zeros, because keyed or scanned stubs drop them. - Match on amount when references fail. A check that equals one open invoice, or an exact combination of open invoices, can be applied with review.
- Handle differences. Short-pays become deductions to research. Overpayments become credits on account. Discounts taken late are deductions too.
- Route the rest. Anything unmatched goes to a queue with the check image link, ordered by amount.
The free remittance reader decodes 820 remittances and their deduction codes if your customers send them alongside their lockbox payments.
EDI 823 vs 820, 835, 822 and BAI2
| Document | Sent by | What it reports |
|---|---|---|
| 823 Lockbox | Your lockbox bank | Checks received in your lockbox and the open items each one pays |
| 820 Payment Order/Remittance Advice | Your customer, or its bank | What an electronic payment covers, with deduction reasons |
| 835 Health Care Claim Payment/Advice | A health plan | Claim payments and adjustments, including paper EOBs a healthcare lockbox converts |
| 822 Account Analysis | Your bank | What the bank charged for services, including lockbox items |
| BAI2 file | Your bank | Daily balances and transactions, including the lockbox deposit credit |
The 823 and 820 do the same job for different payment types. Checks mailed to a lockbox produce an 823 from your bank. Electronic payments with remittance produce an 820 from your customer, or ACH addenda your bank reports. Most AR teams need to apply cash from both.
Common 823 Errors and How to Prevent Them
| Error | What happens | Prevention |
|---|---|---|
Check totals do not equal the deposit AMT | Cash posted does not match the bank credit | Reconcile every file before posting, and reject partial files |
| Invoice number keyed wrong or truncated | Check sits unapplied | Fuzzy-match on prefixes and leading zeros, then fall back to amount |
| Unknown MICR routing and account | Payer not identified | Keep a per-customer MICR table and add confirmed pairs |
Check with no RMR | Payment on account, or no stub at all | Route to the image queue; ask repeat offenders to include remittance |
| Duplicate file | Cash applied twice | Store lockbox, deposit number and date, and block repeats |
| Short-pay treated as paid in full | Deduction never researched | Compare RMR04 to the open balance, not just to RMR05 |
| Several deposit cycles in one day | Second file overwrites the first | Key on DEP04, not just the lockbox and date |
| Late discount accepted | Lost margin | Compare the discount taken with the DTM postmark date and your terms |
823 Implementation Checklist
- Get your bank's lockbox file specification and confirm it offers the 823 (some banks default to BAI or a fixed-width file)
- Confirm the version (004010 is common), delivery channel and cut-off times for each deposit cycle
- Confirm which
REFandDTMqualifiers the bank sends, and whether it captures invoice amounts inRMR05 - Decide what the bank should key from stubs, and agree on handling for checks with no stub
- Build the file reconciliation: checks to batch to deposit to bank credit
- Load customer MICR pairs and build the invoice matching rules
- Send a 997 if the bank asks for one
- Test with a clean deposit, a short-pay, a payment on account, a check with no remittance, and a multi-batch deposit
Where OrderSync Fits
OrderSync works at the front of the order-to-cash cycle. A wrong price, item or unit on an order becomes a wrong invoice, and a wrong invoice becomes a lockbox short-pay. OrderSync reads inbound orders in any format, from EDI 850s and 875s to emails, PDFs and spreadsheets, matches customers, items and units to your catalog, and outputs valid X12 or clean data for your ERP.
To read an 823, paste it into the free EDI inspector to see every DEP, BPR and RMR segment labelled, with a plain-English summary of each check and the invoices it pays. See our guide to order-to-cash automation for the wider cycle, or book a 15-minute walkthrough to see your own orders processed.
Frequently Asked Questions
What is an EDI 823 lockbox file?
The EDI 823 is the X12 file a bank sends to report payments received in a company's lockbox. It lists each deposit with its total, each batch, each check with its amount and MICR details, and the invoices each check pays, so the company can apply cash automatically.
What is the difference between an EDI 823 and an EDI 820?
The 823 comes from your bank and reports checks your customers mailed to your lockbox. The 820 comes from a customer, or its bank, and describes what an electronic payment covers, often with deduction reason codes. Both feed cash application.
What does the DEP segment contain in an 823?
DEP identifies one deposit: DEP01 is the lockbox number, DEP02 the deposit date, DEP03 an optional time, DEP04 the deposit number, DEP05 and DEP06 the depository bank's routing number, and DEP07 and DEP08 the account credited.
Why is BPR used in an 823?
The 823 reuses the BPR segment from the 820 to describe each check the bank received: the amount, the payment method (CHK), and the routing and account number of the bank it is drawn on, read from the MICR line. BPR01 is usually I, remittance information only.
What is a wholesale lockbox?
A wholesale lockbox is a bank service for business-to-business payments. Customers mail checks to a post office box the bank controls. The bank opens, images, deposits and reports them, typically the same day, so the payee receives the cash and the remittance data faster than through its own mailroom.
What happens to a check with no remittance in an 823?
It arrives as a BPR with no RMR segments, or with an RMR that has only an amount. That means the bank found no invoice reference. The payment is unapplied cash until someone reviews the check image and remittance documents and assigns it.
Does every bank send lockbox data as an EDI 823?
No. Many banks offer lockbox data in several formats: the X12 823, BAI files, or their own fixed-width layouts, plus images in a web portal. Ask your bank which formats it supports and what each one includes before choosing.