
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.