Payments

What is a BAI2?

A BAI2 file is a standardized electronic file format that banks use to deliver account balance and transaction data to corporate customers. Developed by the Bank Administration Institute (BAI), it provides a consistent structure for reporting account activity that can be imported directly into accounting, ERP, or treasury management systems.

Before standardized formats existed, each bank produced statements in its own proprietary format. A company with accounts at multiple banks had to handle incompatible data structures from each one. BAI2 solved this by establishing a common language for reporting account balances and transactions, allowing businesses to process bank data programmatically regardless of which institution it came from.

A brief history of the BAI format

BAI released the first version, BAI1, in 1980 in collaboration with major US banks. It standardized cash management balance reporting for the first time. BAI1 was mostly discontinued after 1990 when BAI released BAI2 in 1987, which offered significantly more detail, flexibility, and transaction codes.

BAI2 was updated in 2001 to add codes for lending transactions. Since then, the format has reached critical mass and is considered self-supporting. BAI no longer actively maintains it, but the specification is freely available as a published PDF document and remains the de facto standard for cash management reporting across US banking.

How a BAI2 file is structured

A BAI2 file is a plain text file organized in a strict hierarchical structure. Each line in the file is a record, and each record starts with a two-digit code that identifies its type. The hierarchy works as follows:

  • Record 01 (File Header): Marks the beginning of the file and identifies the sender (bank) and receiver (customer), along with the file creation date, time, and version number
  • Record 02 (Group Header): Identifies a group of accounts from the same originator with the same as-of date. A single file can contain multiple groups
  • Record 03 (Account Identifier and Summary): Identifies the specific account and reports summary balance and activity information for the reporting period
  • Record 16 (Transaction Detail): Contains individual transaction records, each identified by a three-digit type code
  • Record 49 (Account Control): Closes the account record and provides control totals for the account
  • Record 98 (Group Control): Closes the group record with control totals
  • Record 99 (File Control): Closes the file and provides overall totals

The control records at each level allow the receiving system to validate that all data was transmitted correctly. If the totals in a control record do not match the sum of the detail records it covers, the file has an integrity problem that needs to be resolved before it is processed.

Transaction type codes

Within the transaction detail records, each transaction is assigned a three-digit type code that identifies what kind of activity it represents. These codes fall into three categories:

  • Status codes report the type of balance being described, such as opening ledger balance, closing available balance, or one-day float.
  • Summary codes aggregate groups of transactions, such as total credits or total debits for the period.
  • Detail codes identify individual transaction types. Common examples include code 475 for ACH credits, 455 for ACH debits, 195 for wire transfers received, and 496 for lockbox deposits. There are over 100 defined type codes covering the full range of banking transactions.

Consistent type codes are what make BAI2 useful for automation. Rather than parsing free-text transaction descriptions, a system ingesting a BAI2 file can identify transaction types programmatically using the code and route them into the correct categories for reconciliation.

BAI2 vs. MT940

BAI2 is the dominant cash management reporting format in the US. Outside the US, particularly in Europe, the equivalent standard is MT940, a SWIFT message format used by banks to deliver account statements. The two formats carry similar information but have different structures and code systems.

For businesses operating internationally and receiving bank statements from both US and non-US banking partners, handling both BAI2 and MT940 is common. Treasury management systems and reconciliation platforms typically support both formats, though the mapping between them requires careful configuration to ensure transaction types are classified consistently.

How BAI2 files are used in practice

Banks typically make BAI2 files available to corporate customers through secure file delivery channels, such as SFTP, or through banking portals. Files may be delivered daily, intraday, or on a scheduled basis depending on the arrangement with the bank.

Once received, the BAI2 file is ingested by an accounting, ERP, or treasury management system. The system parses the file, maps each transaction to the appropriate internal category, and uses the data to update the payment ledger and initiate bank reconciliation.

For platforms processing high volumes of ACH, wire, and EFT transactions, automated BAI2 ingestion is a prerequisite for efficient reconciliation. Manual reconciliation at scale is not viable. The BAI2 file is what feeds the automated matching process: each transaction in the file is matched against the corresponding internal record, and exceptions are flagged for review.

For clearing accounts and in-transit items, BAI2 data helps treasury teams see which transactions have settled at the bank and which are still outstanding, closing the gap between internal records and confirmed bank activity. Regular BAI2 ingestion, combined with automated matching, is the foundation of a robust cash reconciliation process.

Continue learning

ACH payment returns

Category
Read more

Stablecoin yield

Category
Read more

Cash float

Category
Read more

BAI2

Category
Read more

Compliance risk management

Category
Read more

ACH transfer limit

Category
Read more

Deposit Account Control Agreement (DACA)

Category
Read more

Currency Transaction Report (CTR)

Category
Read more

Crypto faucet

Category
Read more

FBO account

Category
Read more

OTC trading

Category
Read more

Virtual IBAN

Category
Read more

Third-party payment

Category
Read more

Ledger balance

Category
Read more

Issuer Identification Number (IIN)

Category
Read more

CASPs (Crypto-Assets Service Providers)

Category
Read more

Section 314(b)

Category
Read more

OFAC (Office of Foreign Assets Control)

Category
Read more

Penny test

Category
Read more

Cash pooling

Category
Read more

Money transmission

Category
Read more

Core Banking

Category
Read more

Sweep Account

Category
Read more

Flow of Funds

Category
Read more

Cash Application

Category
Read more

Bank Reconciliation

Category
Read more

Clearing Account

Category
Read more

Cash Reconciliation

Category
Read more

Take Rate

Category
Read more

CHAPS (Clearing House Automated Payment System)

Category
Read more

The Clearing House (TCH)

Category
Read more

A2A Payments

Category
Read more

Bulk Electronic Clearing System (BECS)

Category
Read more

Real-time gross settlement (RTGS)

Category
Read more

Same-day ACH

Category
Read more

ACH Return Codes

Category
Read more

PYUSD (PayPal USD)

Category
Read more

Sort Code

Category
Read more

Atomic Settlement

Category
Read more

Payment Orchestration

Category
Read more

T2

Category
Read more

Financial Crimes Enforcement Network (FinCEN)

Category
Read more

Unified Payments Interface (UPI)

Category
Read more

Programmable Money

Category
Read more

QR Code Payments

Category
Read more

CHIPS (Clearing House Interbank Payments System)

Category
Read more

Nacha

Category
Read more

FedACH

Category
Read more

XRP (Ripple)

Category
Read more

EURC (Euro Coin)

Category
Read more

USDC (USD Coin)

Category
Read more

USDT (Tether)

Category
Read more

Fedwire

Category
Read more

On-Demand Liquidity (ODL)

Category
Read more

Payment Ledger

Category
Read more

Treasury Management

Category
Read more

Blockchain

Category
Read more

Liquidity Management

Category
Read more

Virtual Asset Service Provider (VASP)

Category
Read more

Fiat Money

Category
Read more

Custodial vs Non-Custodial Wallets

Category
Read more

On/Off Ramps

Category
Read more

Payment Reconciliation

Category
Read more

Payment Service Provider (PSP)

Category
Read more

Payment API

Category
Read more

Ethereum Virtual Machine (EVM)

Category
Read more

Stablecoin

Category
Read more

KYC (Know Your Customer)

Category
Read more

DEX (Decentralized Exchange)

Category
Read more

CEX (Centralized Exchange)

Category
Read more

Virtual account

Category
Read more

SPEI (Sistema de Pagos Electrónicos Interbancarios)

Category
Read more

Pix (Brazilian Instant Payment)

Category
Read more

RTP (Real-Time Payments)

Category
Read more

SWIFT

Category
Read more

ACH (Automated Clearing House)

Category
Read more

Electronic Funds Transfer (EFT)

Category
Read more

Wire transfer

Category
Read more

SEPA (Single Euro Payments Area)

Category
Read more

FedNow

Category
Read more
Download Due & Move Money Without Borders