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

<QuickAnswer>
The EDI 822 Account Analysis is the X12 transaction a bank sends a corporate client each month to report account balances, the earnings credit those balances earned, and every service charge with its volume and unit price. BLN carries the balances, RTE the rates, SER each fee by AFP service code, and ADJ any corrections.
</QuickAnswer>

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

<EDIGuideCTA
  transactionType="822"
  headline="Keep the order side as clean as the bank side"
  body="Your bank reports every item it handles. OrderSync makes sure the orders behind them start right: it reads 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 ERP data."
/>

## What Is an EDI 822?

**An EDI 822 is the Account Analysis transaction set defined by the [ASC X12 standards body](https://x12.org/products/transaction-sets), 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:

- The [X12 transaction set catalog](https://x12.org/products/transaction-sets) defines the 822, and the [Stedi X12 004010 822 reference](https://www.stedi.com/edi/x12-004010/822) lays out the BGN, RTE, ENT, ACT, ADJ, BLN and SER structure used in this guide
- The [Association for Financial Professionals (AFP) Service Codes](https://www.financialprofessionals.org/training-resources/resources/afp-service-codes) are the standard list banks use to identify balances and charges on account analysis statements. Domestic codes are 6 digits; the global set used with the camt.086 and TWIST BSB formats is 8 digits
- Each bank publishes its own 822 specification, which names the AFP codes it sends, the rate qualifiers it uses, and how it reports adjustments

**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](https://www.federalreserve.gov/monetarypolicy/reservereq.htm), 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 area | What it tells you | Where it sits in the 822 |
|---|---|---|
| Period and dates | Which month the analysis covers | `DTM` in the heading, and `DTM` with `709` in the balance loop |
| Rates | Earnings credit rate, reserve rate, overdraft rate | `RTE` |
| Bank and account | Who is reporting, on which account | `N1`, `ENT`, `ACT` |
| Balances | Ledger, float, collected, earnings credit, totals | `LX` loop with one `BLN` per balance type |
| Service charges | Each fee, its volume, unit price and charge | `SER`, one per service |
| Adjustments | Corrections to earlier balances or fees | `ADJ` 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.

<EDISample id="822-account-analysis-monthly" />

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

| Area | Segment | Name | Usage | Notes |
|---|---|---|---|---|
| Heading | **ST** | Transaction Set Header | Mandatory | `ST01` = `822` |
| Heading | **BGN** | Beginning Segment | Mandatory | Purpose, statement reference, statement date |
| Heading | **DTM** | Date/Time Reference | Mandatory, up to 3 | Period start, period end, issue or process date |
| Heading | **CUR** | Currency | Optional | Used when the statement is not in the default currency |
| Heading, N1 loop | **N1** / N2 / N3 / N4 / PER | Name and contact | Usually sent | The bank or forwarder sending the statement |
| Heading, RTE loop | **RTE** / DTM | Rate Information | Optional, repeats | Default rates for the whole analysis |
| Detail, ENT loop | **ENT** | Entity | Mandatory, repeats | Identifies the sending bank and receiving company |
| ENT, N1 loop | **N1** / PER | Name | Optional | The company receiving the statement |
| ENT, ACT loop | **ACT** | Account Identification | Repeats | One loop per account analyzed |
| ACT loop | **CUR** | Currency | Optional | Account currency |
| ACT loop | **ADJ** | Adjustments to Balances or Services | Optional, up to 1000 | Corrections to earlier balances or fees |
| ACT, RTE loop | **RTE** / DTM | Rate Information | Optional | Account-level rates that override the heading |
| ACT, LX loop | **LX** / **BLN** / DTM | Balance Information | Repeats | One `BLN` per balance type |
| ACT, SER loop | **SER** / CTP / DTM | Service Charges | Repeats | One `SER` per service |
| Trailer | **SE** | Transaction Set Trailer | Mandatory | Segment 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~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **BGN01** | Transaction Set Purpose Code | `00` | `00` = original statement |
| **BGN02** | Reference Identification | `AA2610-48120017755` | The bank's statement reference. Store it to detect duplicates |
| **BGN03** | Date | `20261105` | The date the statement was created |
| **BGN04** | Time | | Optional 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~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **RTE01** | Rate Qualifier | `2` | The 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) |
| **RTE02** | Interest Rate | `1.25` | The rate, as a percentage |
| **RTE03** | Monetary Amount | | Net collected amount needed per $1.00 of service charge, net of reserves |
| **RTE04** | Number | | Days in the analysis month used in the calculation |
| **RTE05** | Number | | Days 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~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **ADJ01** | Adjustment Application Code | `S` | The area adjusted. `S` = service charge |
| **ADJ02** | Monetary Amount | `-25.00` | The adjustment amount. Negative is in your favor here |
| **ADJ03** | Monetary Amount | | Adjustment to the average collected balance, for balance corrections |
| **ADJ04** | Date | `20260915` | Date of the original transaction |
| **ADJ05** | Date | `20261020` | Date the adjustment was processed |
| **ADJ06** | Number of days | | Days between the original and the adjustment, used for float and ledger corrections |
| **ADJ07** | Description | `SEPT WIRE FEE REVERSAL` | Free-form explanation |
| **ADJ08** / **ADJ09** | Product/Service ID Qualifier and ID | `TB` / `350100` | The 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~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **BLN01** | Code List Qualifier Code | `TE` | Which code list `BLN02` comes from. Bank specifications commonly use `TE` for AFP (formerly Treasury Management Association) service codes |
| **BLN02** | Industry Code | `000120` | The balance type, as a code from that list |
| **BLN03** | Monetary Amount | `170000.00` | The 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~
```

| Element | Name | Example | What it means |
|---|---|---|---|
| **SER01** | Product/Service ID Qualifier | `TB` | AFP service code and bank service code |
| **SER02** | Product/Service ID | `050100` | The service code |
| **SER03** | Monetary Amount | `116423.23` | Collected balance required: the balance you would need to offset this charge with earnings credit |
| **SER04** | Monetary Amount | `123.60` | The service charge |
| **SER05** | Unit Price | `0.30` | Price per unit |
| **SER06** | Quantity | `412` | Volume for the period |
| **SER07** | Description | `LOCKBOX ITEM PROCESSED` | The bank's description |
| **SER08** | Price Identifier Code | | The pricing structure, where the bank sends it |
| **SER09** | Payment Method Code | | How the charge is compensated, where the bank sends it |
| **SER10** / **SER11** | Subservice qualifier and number | | Identifies 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.

| Document | Sent by | What it reports |
|---|---|---|
| **822 Account Analysis** | Bank | Monthly balances, earnings credit, service charges and adjustments |
| **821 Financial Information Reporting** | Bank | Account balances and transaction detail, the X12 equivalent of a balance report |
| **BAI2 file** | Bank | Prior-day and current-day balances and transactions, in the BAI format many banks use instead of the 821 |
| **[820 Payment Order/Remittance Advice](/guides/edi/820-payment-order)** | Payer, or its bank | What a payment covers, invoice by invoice |
| **[823 Lockbox](/guides/edi/823-lockbox)** | Lockbox bank | Checks received in a lockbox and the invoices they pay |
| **camt.086** | Bank | ISO 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](/guides/edi/823-lockbox).
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](/guides/edi/997-functional-acknowledgment) 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

| Error | What happens | Prevention |
|---|---|---|
| **Unknown AFP or bank service code** | Charge lands in an "unmapped" bucket and nobody reviews it | Keep a code map per bank and review unmapped codes every month |
| **Code mapping changed by the bank** | A service looks new one month and missing the next | Track `SER02` and `SER07` together and flag description changes |
| **Recalculating earnings credit with the wrong day count** | Your figure never matches the bank's | Use `RTE04` and `RTE05` if sent, otherwise the day basis in the agreement |
| **Unit price differs from the fee schedule** | Overbilling goes unnoticed | Compare `SER05` to the contracted price for every code |
| **`SER05` times `SER06` does not equal `SER04`** | Rounding or minimum charges hide real differences | Flag any line where the difference is above a few cents and ask the bank why |
| **Adjustments ignored** | Credits the bank already gave you are disputed again, or reversals are missed | Post `ADJ` lines against the original period, using `ADJ04` |
| **Several accounts read as one** | Fees from a sub-account inflate the main account | Split by `ACT01` and use `ACT05`/`ACT06` for roll-ups |
| **Duplicate statements** | Fees counted twice in a fee report | Store `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](/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](/blog/edi-payments-explained) and [order-to-cash automation](/blog/order-to-cash-automation), or [book a 15-minute walkthrough](/book-call) to see your own orders processed.

## Frequently Asked Questions

<div className="not-prose">

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

</div>
