Skip to content
EDI 822 — EDI TransactionPublished Nov 7, 2026

EDI 822 Account Analysis: Bank Fee Statements

EDI 822 Account Analysis explained: BLN balances, RTE earnings credit, SER service charges, ADJ adjustments, AFP service codes, a live example and errors.

The EDI 822 is your bank's itemized bill, in a form a system can read. A paper or PDF account analysis tells a treasury analyst that lockbox fees went up. The 822 tells a fee-analysis tool that 412 lockbox items were processed at $0.30 each, that the account's collected balance earned $180.48 of credit against $332.60 of charges, and that a $25.00 wire fee from last month was reversed. Without it, someone retypes the statement into a spreadsheet every month to check whether the bank is charging what was agreed.

This guide covers what the 822 carries, how earnings credit and service charges net out, every segment you will map, a live example of a monthly statement, how AFP service codes fit in, and the errors that make fee reviews go wrong.

What Is an EDI 822?

An EDI 822 is the Account Analysis transaction set defined by the ASC X12 standards body, used to send detailed balance, service charge and adjustment information, mainly from a bank to its corporate clients. It travels in functional group AA (the GS01 value). The X12 definition also allows it between or within companies, for example a shared-services center billing business units, but in practice you will meet it from banks.

Authoritative references for 822 work:

Who sends it? Your bank's treasury or cash management group, from its account analysis system.

Who receives it? Corporate treasury, accounts payable, or a bank fee analysis tool that compares charges against the agreed price schedule.

When is it sent? Once per analysis period, usually monthly, a few business days after the period closes.

Why does it matter? Bank fees are often paid by debiting the account or offsetting them against earnings credit, so nobody approves an invoice. The 822 is the only line-by-line record of what you were charged, and the only practical way to check it at volume.

How Bank Account Analysis Works

Most US business accounts are priced through account analysis rather than a flat monthly fee. The statement has three moving parts.

Balances. The bank reports your average ledger balance (what the books show), average float (deposits not yet collected) and average collected balance (ledger less float). Collected balance is what earns credit.

Earnings credit. The bank applies an earnings credit rate (ECR) to the collected balance for the period. A simplified version of the calculation is collected balance times ECR times days in the period, divided by days in the year. Some banks first deduct a reserve requirement; the Federal Reserve set reserve requirement ratios to zero in March 2020, so that deduction is usually zero today, but the 822 still has room to report it. The day counts and any reserve rule come from your account agreement.

Service charges. Every billable activity in the period (maintenance fees, deposited items, ACH credits, wires, lockbox items, images) is priced at a unit rate and multiplied by the volume.

The net is service charges less earnings credit. If charges are higher, the bank collects the difference, usually by debiting the account. If credit is higher, whether the surplus carries forward or is lost depends on your agreement. The 822 shows each of these numbers so you can recalculate them yourself.

Statement areaWhat it tells youWhere it sits in the 822
Period and datesWhich month the analysis coversDTM in the heading, and DTM with 709 in the balance loop
RatesEarnings credit rate, reserve rate, overdraft rateRTE
Bank and accountWho is reporting, on which accountN1, ENT, ACT
BalancesLedger, float, collected, earnings credit, totalsLX loop with one BLN per balance type
Service chargesEach fee, its volume, unit price and chargeSER, one per service
AdjustmentsCorrections to earlier balances or feesADJ under the account

Interactive Example: Monthly Account Analysis Statement

A bank sends a camping-gear supplier its October analysis for one operating account. RTE reports a 0% reserve rate and a 1.25% earnings credit rate. The balance loop shows an average ledger balance of $185,420.17, float of $15,420.17 and a collected balance of $170,000.00, which earned $180.48 of credit over 31 days. Four SER lines total $332.60 in charges, so the net service charge is $152.12. An ADJ reverses a $25.00 September wire fee.

Use the Plain English tab for a readable summary, or click any segment to break it down element by element.

Live exampleBank (Treasury Services)EDI 822

822 Monthly Account Analysis Statement

A bank's October analysis for one operating account: ledger, float and collected balances in BLN, an earnings credit rate of 1.25% in RTE, four service charges in SER (account maintenance, lockbox maintenance, 412 lockbox items, 890 ACH credits) totalling $332.60, and a $25.00 fee reversal in ADJ. The six-digit balance and service codes are illustrative; each bank maps its own AFP codes

Document
822 Account Analysis
From / to
LAKESHOREBANK → CEDARPEAK
Segments
28
Interchange date
Nov 5, 2026

Raw EDI (X12)

1
ISA*00* *00* *ZZ*LAKESHOREBANK *ZZ*CEDARPEAK *261105*0600*U*00401*000822001*0*P*:~
2
GS*AA*LAKESHOREBANK*CEDARPEAK*20261105*0600*822001*X*004010~
3
ST*822*0001~
4
BGN*00*AA2610-48120017755*20261105~
5
DTM*150*20261001~
6
DTM*151*20261031~
7
N1*BK*FIRST LAKESHORE BANK*13*999000013~
8
RTE*1*0~
9
RTE*2*1.25~
10
ENT*1*BK*13*999000013~
11
N1*AO*CEDAR PEAK OUTDOOR CO~
12
ACT*48120017755*CEDAR PEAK OPERATING~
13
ADJ*S*-25.00**20260915*20261020**SEPT WIRE FEE REVERSAL*TB*350100~
14
LX*1~
15
BLN*TE*000100*185420.17~
16
BLN*TE*000110*15420.17~
17
BLN*TE*000120*170000.00~
18
BLN*TE*000250*180.48~
19
BLN*TE*000300*332.60~
20
BLN*TE*000400*152.12~
21
DTM*709*20261031~
22
SER*TB*010000*42387.10*45.00*45.00*1*ACCOUNT MAINTENANCE~
23
SER*TB*050000*70645.16*75.00*75.00*1*LOCKBOX MAINTENANCE~
24
SER*TB*050100*116423.23*123.60*0.30*412*LOCKBOX ITEM PROCESSED~
25
SER*TB*250201*83832.26*89.00*0.10*890*ACH CREDIT RECEIVED~
26
SE*24*0001~
27
GE*1*822001~
28
IEA*1*000822001~

Human-Readable

Interchange

Sender ID(ZZ)LAKESHOREBANK
Receiver ID(ZZ)CEDARPEAK
Date261105
Time0600
Standards IDU
Version00401
Control Number000822001
Acknowledgment RequestedNo
UsageProduction
Included Groups (IEA01)1

Functional Group

Functional IDAAAA
SenderLAKESHOREBANK
ReceiverCEDARPEAK
Date20261105
Time0600
Control Number822001
Agency CodeX
Version004010
Transactions1
Reported Transaction Count (GE01)1

Transaction 822

Account Analysis
Transaction Type822
Control Number0001
Segments, ST to SE24
Count in SE0124 (matches)

Segment Detail

BGNBeginning Segment
BGN01Transaction Set Purpose Code00
BGN02Reference IdentificationAA2610-48120017755
BGN03Date20261105
DTMDate/Time Reference
DTM01Date Qualifier150
DTM02Date20261001
DTMDate/Time Reference
DTM01Date Qualifier151
DTM02Date20261031
N1Party Identification
N101Entity CodeBK
N102NameFIRST LAKESHORE BANK
N103ID Qualifier13
N104ID Code999000013
RTERate Information
RTE01Rate Qualifier1
RTE02Interest Rate0
RTERate Information
RTE01Rate Qualifier2
RTE02Interest Rate1.25
ENTEntity
ENT01Assigned Number1
ENT02BK
ENT0313
ENT04999000013
N1Party Identification
N101Entity CodeAO
N102NameCEDAR PEAK OUTDOOR CO
ACTAccount Identification
ACT01Account Number48120017755
ACT02Account NameCEDAR PEAK OPERATING
ADJAdjustments to Balances or Services
ADJ01Adjustment Application CodeS
ADJ02Adjustment Amount-25.00
ADJ04Original Transaction Date20260915
ADJ05Adjustment Processed Date20261020
ADJ07DescriptionSEPT WIRE FEE REVERSAL
ADJ08Product/Service ID QualifierTB
ADJ09Product/Service ID350100
LXAssigned Number
LX01Assigned Number1
BLNBalance Information
BLN01Code List Qualifier CodeTE
BLN02Balance Type Code000100
BLN03Balance Amount185420.17
BLNBalance Information
BLN01Code List Qualifier CodeTE
BLN02Balance Type Code000110
BLN03Balance Amount15420.17
BLNBalance Information
BLN01Code List Qualifier CodeTE
BLN02Balance Type Code000120
BLN03Balance Amount170000.00
BLNBalance Information
BLN01Code List Qualifier CodeTE
BLN02Balance Type Code000250
BLN03Balance Amount180.48
BLNBalance Information
BLN01Code List Qualifier CodeTE
BLN02Balance Type Code000300
BLN03Balance Amount332.60
BLNBalance Information
BLN01Code List Qualifier CodeTE
BLN02Balance Type Code000400
BLN03Balance Amount152.12
DTMDate/Time Reference
DTM01Date Qualifier709
DTM02Date20261031
SERService Charges
SER01Product/Service ID QualifierTB
SER02Service Code010000
SER03Collected Balance Required42387.10
SER04Service Charge45.00
SER05Unit Price45.00
SER06Volume1
SER07DescriptionACCOUNT MAINTENANCE
SERService Charges
SER01Product/Service ID QualifierTB
SER02Service Code050000
SER03Collected Balance Required70645.16
SER04Service Charge75.00
SER05Unit Price75.00
SER06Volume1
SER07DescriptionLOCKBOX MAINTENANCE
SERService Charges
SER01Product/Service ID QualifierTB
SER02Service Code050100
SER03Collected Balance Required116423.23
SER04Service Charge123.60
SER05Unit Price0.30
SER06Volume412
SER07DescriptionLOCKBOX ITEM PROCESSED
SERService Charges
SER01Product/Service ID QualifierTB
SER02Service Code250201
SER03Collected Balance Required83832.26
SER04Service Charge89.00
SER05Unit Price0.10
SER06Volume890
SER07DescriptionACH CREDIT RECEIVED
1 functional group1 transactionControl #000822001Valid

Check the arithmetic the way a fee analyst would:

  • $185,420.17 ledger less $15,420.17 float is $170,000.00 collected
  • $170,000.00 times 1.25% times 31/365 is $180.48 of earnings credit
  • $45.00 + $75.00 + (412 x $0.30 = $123.60) + (890 x $0.10 = $89.00) is $332.60 of charges
  • $332.60 less $180.48 is $152.12 net, before the $25.00 reversal

The six-digit balance and service codes in this sample (000100, 050100 and so on) are illustrative. The AFP list is licensed, and each bank maps its own services to it, so use your bank's 822 specification for the real code meanings.

822 Structure at a Glance

AreaSegmentNameUsageNotes
HeadingSTTransaction Set HeaderMandatoryST01 = 822
HeadingBGNBeginning SegmentMandatoryPurpose, statement reference, statement date
HeadingDTMDate/Time ReferenceMandatory, up to 3Period start, period end, issue or process date
HeadingCURCurrencyOptionalUsed when the statement is not in the default currency
Heading, N1 loopN1 / N2 / N3 / N4 / PERName and contactUsually sentThe bank or forwarder sending the statement
Heading, RTE loopRTE / DTMRate InformationOptional, repeatsDefault rates for the whole analysis
Detail, ENT loopENTEntityMandatory, repeatsIdentifies the sending bank and receiving company
ENT, N1 loopN1 / PERNameOptionalThe company receiving the statement
ENT, ACT loopACTAccount IdentificationRepeatsOne loop per account analyzed
ACT loopCURCurrencyOptionalAccount currency
ACT loopADJAdjustments to Balances or ServicesOptional, up to 1000Corrections to earlier balances or fees
ACT, RTE loopRTE / DTMRate InformationOptionalAccount-level rates that override the heading
ACT, LX loopLX / BLN / DTMBalance InformationRepeatsOne BLN per balance type
ACT, SER loopSER / CTP / DTMService ChargesRepeatsOne SER per service
TrailerSETransaction Set TrailerMandatorySegment count and control number

Loop nesting differs slightly between X12 releases and between banks. Treat the bank's specification as the source of truth for which loops it sends.

Key Segments Explained

BGN: Beginning Segment

BGN*00*AA2610-48120017755*20261105~
ElementNameExampleWhat it means
BGN01Transaction Set Purpose Code0000 = original statement
BGN02Reference IdentificationAA2610-48120017755The bank's statement reference. Store it to detect duplicates
BGN03Date20261105The date the statement was created
BGN04TimeOptional creation time

DTM: Statement Period

DTM*150*20261001~
DTM*151*20261031~

At least one heading DTM is required, for the period-ending date. Banks commonly use 150 (service period start) and 151 (service period end); some add a process or issue date. Inside the balance loop, a DTM with qualifier 709 (analysis month ending) dates the balances. Confirm the qualifiers your bank uses before you key period logic off them.

N1 and ENT: Bank and Company

N1*BK*FIRST LAKESHORE BANK*13*999000013~
ENT*1*BK*13*999000013~
N1*AO*CEDAR PEAK OUTDOOR CO~

The heading N1 with BK names the bank, with 13 (Federal Reserve routing code) and its routing number. ENT opens the detail area: ENT01 is a sequence number, and ENT02 to ENT04 can identify the sending bank. A bank that analyzes accounts for several companies under one relationship can use ENT05 to ENT07 to identify each receiving entity. The N1 with AO (account of) inside the ENT loop names the company the statement is for.

RTE: Rate Information

RTE*1*0~
RTE*2*1.25~
ElementNameExampleWhat it means
RTE01Rate Qualifier2The type of rate. Common values include 1 (reserve requirement rate for demand deposit accounts), 2 (analysis earnings credit rate, not yet net of reserves) and 4 (collected balance overdraft interest rate)
RTE02Interest Rate1.25The rate, as a percentage
RTE03Monetary AmountNet collected amount needed per $1.00 of service charge, net of reserves
RTE04NumberDays in the analysis month used in the calculation
RTE05NumberDays in the analysis year used in the calculation

A heading RTE sets the default for the whole statement. An RTE inside an account loop overrides it for that account. If your bank sends RTE04 and RTE05, use them in your recalculation instead of assuming 365 days.

ACT: Account Identification

ACT*48120017755*CEDAR PEAK OPERATING~

ACT01 is the account number and ACT02 its name. ACT05 and ACT06 can point to a related account, for example the account that a sub-account's fees roll up to. Everything after ACT, until the next ACT, belongs to that account.

ADJ: Adjustments to Balances or Services

ADJ*S*-25.00**20260915*20261020**SEPT WIRE FEE REVERSAL*TB*350100~
ElementNameExampleWhat it means
ADJ01Adjustment Application CodeSThe area adjusted. S = service charge
ADJ02Monetary Amount-25.00The adjustment amount. Negative is in your favor here
ADJ03Monetary AmountAdjustment to the average collected balance, for balance corrections
ADJ04Date20260915Date of the original transaction
ADJ05Date20261020Date the adjustment was processed
ADJ06Number of daysDays between the original and the adjustment, used for float and ledger corrections
ADJ07DescriptionSEPT WIRE FEE REVERSALFree-form explanation
ADJ08 / ADJ09Product/Service ID Qualifier and IDTB / 350100The service the adjustment applies to

ADJ10 to ADJ15 report a price or volume change on a service (old value, new value and the difference). They are how a bank tells you it re-billed a service at the correct price, and they are worth reading closely.

LX and BLN: Balance Information

LX*1~
BLN*TE*000120*170000.00~
ElementNameExampleWhat it means
BLN01Code List Qualifier CodeTEWhich code list BLN02 comes from. Bank specifications commonly use TE for AFP (formerly Treasury Management Association) service codes
BLN02Industry Code000120The balance type, as a code from that list
BLN03Monetary Amount170000.00The balance

LX only starts the loop; one LX can hold every balance for the period. Each balance type gets its own BLN. In this sample the bank's codes are: 000100 average ledger, 000110 average float, 000120 average collected, 000250 earnings credit, 000300 total service charges and 000400 net service charges. Those assignments are the sample bank's, not AFP's; your bank's mapping governs.

SER: Service Charges

SER*TB*050100*116423.23*123.60*0.30*412*LOCKBOX ITEM PROCESSED~
ElementNameExampleWhat it means
SER01Product/Service ID QualifierTBAFP service code and bank service code
SER02Product/Service ID050100The service code
SER03Monetary Amount116423.23Collected balance required: the balance you would need to offset this charge with earnings credit
SER04Monetary Amount123.60The service charge
SER05Unit Price0.30Price per unit
SER06Quantity412Volume for the period
SER07DescriptionLOCKBOX ITEM PROCESSEDThe bank's description
SER08Price Identifier CodeThe pricing structure, where the bank sends it
SER09Payment Method CodeHow the charge is compensated, where the bank sends it
SER10 / SER11Subservice qualifier and numberIdentifies a subservice under the main code

At least one of SER03 or SER04 must be present. The check that matters most is SER05 times SER06 against SER04, and SER05 against the price in your fee schedule. In the sample, SER03 is the $123.60 charge divided by the credit each dollar of collected balance earned in October (1.25% times 31/365), which gives $116,423.23.

AFP Service Codes in the 822

The AFP Service Codes are why 822s from different banks can be compared at all. Each bank maps its internal fee names (which differ by bank and change over time) to a shared code, so "lockbox item processed" at one bank and "LBX per check" at another can land in the same bucket in your analysis.

What to know before you rely on them:

  • Length. Domestic codes are 6 characters; the AFP Global Service Codes are 8 digits, designed for the ISO 20022 camt.086 and TWIST BSB bank billing formats rather than the X12 822.
  • Bank mapping. Banks choose which AFP code each service maps to, and some revise mappings when the code list is updated. A code that moves between statements can make a fee look new or missing.
  • Licensing. The full code list is published by AFP under license. Your bank's 822 specification and its own code list are the practical reference.
  • Bank-specific codes. Some services have no AFP equivalent, so banks send their own codes alongside AFP ones. Map them explicitly instead of discarding them.

EDI 822 vs 821, 820, 823 and BAI2

The 822 is one of several bank-to-company files, and they are often confused.

DocumentSent byWhat it reports
822 Account AnalysisBankMonthly balances, earnings credit, service charges and adjustments
821 Financial Information ReportingBankAccount balances and transaction detail, the X12 equivalent of a balance report
BAI2 fileBankPrior-day and current-day balances and transactions, in the BAI format many banks use instead of the 821
820 Payment Order/Remittance AdvicePayer, or its bankWhat a payment covers, invoice by invoice
823 LockboxLockbox bankChecks received in a lockbox and the invoices they pay
camt.086BankISO 20022 bank services billing statement, the international counterpart of the 822

The short version: the BAI2 or 821 tells you what moved through the account each day, and the 822 tells you what it cost. The 823 is one of the services the 822 bills for.

Where the 822 Sits in the Treasury Cycle

  1. Daily activity. Deposits, lockbox items, ACH, wires and checks move through the account. The bank reports them daily in BAI2 or 821 files, and lockbox detail in 823s.
  2. Period close. At month end the bank calculates average balances, earnings credit and volumes for each service.
  3. 822 Account Analysis. The bank sends the statement, typically within the first days of the next month.
  4. Acknowledgment. Your translator returns a 997 if the bank asks for one.
  5. Settlement. The net charge is debited from the account or billed, as your agreement sets.
  6. Review. Treasury compares volumes and prices against the fee schedule and raises disputes with the bank. Corrections arrive as ADJ segments on a later 822.

Common 822 Errors and How to Prevent Them

ErrorWhat happensPrevention
Unknown AFP or bank service codeCharge lands in an "unmapped" bucket and nobody reviews itKeep a code map per bank and review unmapped codes every month
Code mapping changed by the bankA service looks new one month and missing the nextTrack SER02 and SER07 together and flag description changes
Recalculating earnings credit with the wrong day countYour figure never matches the bank'sUse RTE04 and RTE05 if sent, otherwise the day basis in the agreement
Unit price differs from the fee scheduleOverbilling goes unnoticedCompare SER05 to the contracted price for every code
SER05 times SER06 does not equal SER04Rounding or minimum charges hide real differencesFlag any line where the difference is above a few cents and ask the bank why
Adjustments ignoredCredits the bank already gave you are disputed again, or reversals are missedPost ADJ lines against the original period, using ADJ04
Several accounts read as oneFees from a sub-account inflate the main accountSplit by ACT01 and use ACT05/ACT06 for roll-ups
Duplicate statementsFees counted twice in a fee reportStore BGN02 and the period dates, and block repeats

822 Implementation Checklist

  • Get your bank's 822 specification and confirm the version (004010 is common)
  • Confirm the delivery channel and schedule (AS2, SFTP or the bank's portal) and whether it expects a 997
  • Get the bank's AFP code mapping, including any bank-specific codes
  • Load your contracted fee schedule by service code
  • Decide how you store balances: one row per account, period and BLN02 code
  • Build the checks: ledger less float equals collected, credit recalculates, price times volume equals charge
  • Map ADJ lines back to the original period
  • Handle multi-account statements, split by ACT
  • Test with a normal month, a month with adjustments, and a statement covering several accounts

Where OrderSync Fits

OrderSync works on the order side of the business, not the bank side. It 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. Clean orders lead to clean invoices, which is what keeps the lockbox and remittance items your bank bills for simple to apply.

For the 822 itself, paste any statement into the free EDI inspector to see every BLN, SER and ADJ segment labelled, with a plain-English summary of balances and charges. For the rest of the cash cycle, see our guides to EDI payments and order-to-cash automation, or book a 15-minute walkthrough to see your own orders processed.

Frequently Asked Questions

What is an EDI 822 used for?

The EDI 822 Account Analysis is a bank's monthly fee statement in X12 form. It reports average balances, the earnings credit rate and credit earned, each service charge with volume and unit price, and any adjustments, so a company can check bank fees automatically instead of reading a PDF statement.

What is the difference between the EDI 822 and BAI2?

A BAI2 file reports daily balances and transactions: what moved through the account. The 822 reports a period's account analysis: what those services cost and how much earnings credit the balances earned. Most companies receive both, BAI2 daily and the 822 monthly.

What are AFP service codes?

AFP Service Codes are a standard list, maintained by the Association for Financial Professionals, that banks use to identify balances and service charges on account analysis statements. Domestic codes are 6 characters. In the 822 they appear in SER02 for charges and in BLN02 for balance types.

What does the SER segment contain in an 822?

Each SER is one service charge. SER01 is the code qualifier, SER02 the service code, SER03 the collected balance needed to offset the charge, SER04 the charge, SER05 the unit price, SER06 the volume and SER07 the bank's description.

How is earnings credit calculated on an account analysis?

In simple form, average collected balance times the earnings credit rate times the days in the period, divided by the days in the year. Banks may deduct reserves first and use their own day counts. The 822 reports the rate in RTE and can carry the day counts in RTE04 and RTE05.

Who sends an EDI 822?

Banks send it to their corporate clients, usually from the treasury or cash management group, once per analysis period. The X12 standard also allows it between or within companies, for example a shared-services center reporting charges to business units, but bank-to-company is by far the most common use.

Do I need to acknowledge an EDI 822?

If your bank's specification asks for one, return a 997 Functional Acknowledgment for the functional group. The 997 only confirms the file was valid X12. Fee disputes go to the bank through your relationship manager or its service channel, not through EDI.

James Darby
Last updated: 11/7/2026

Related Resources