Polynopsis

BAI2 file format

BAI2 (Cash Management Balance Reporting Specifications, Version 2)

By · Last updated

BAI2 is a comma-delimited bank reporting file, used mainly in North America. It carries account balances, summary totals and transaction details using numeric type codes.

US and Canadian banks send BAI2 files to corporate treasury teams, ERPs and treasury management systems. Some banks elsewhere, such as Westpac and NAB in Australia, also offer it for cash positioning and bank reconciliation.

File structure

CodeNamePurposeRequired
01File HeaderOpens the file. Carries sender, receiver, creation date and time, and version number 2.Yes
02Group HeaderOpens a group of accounts. Carries as-of date, optional currency and as-of-date modifier.Yes
03Account Identifier and SummaryNames the account, then repeats type code, amount, item count and funds type for balances and totals.Yes
16Transaction DetailOne transaction: type code, amount, funds type, bank reference, customer reference and free text.No
88ContinuationCarries overflow from the previous 03, 16 or 88 record when it exceeds the line length.Conditional
49Account TrailerCloses the account with a control total of its amounts and a record count.Yes
98Group TrailerCloses the group with a control total, number of accounts and number of records.Yes
99File TrailerCloses the file with a control total, number of groups and number of records.Yes

Key codes

CodeMeaningSourceCategory
010Opening ledger balanceHSBC; East West Bank; Westpac; ScotiabankBalance (status)
015Closing ledger balanceHSBC; East West Bank; Westpac; ScotiabankBalance (status)
020Average closing ledger, month to dateEast West BankBalance (status)
025Average closing ledger, year to dateEast West BankBalance (status)
030Current ledger balance (intraday)HSBC; RBS BanklineBalance (status)
040Opening available balanceHSBC; East West Bank; RBS BanklineBalance (status)
045Closing available balanceHSBC; East West Bank; WestpacBalance (status)
050Average closing available, month to dateEast West BankBalance (status)
055Average closing available, year to dateEast West BankBalance (status)
060Current available balance (intraday)HSBC; RBS BanklineBalance (status)
072One-day floatHSBC; RBS Bankline (East West Bank labels it One Day Available)Balance (status)
074Two or more days floatHSBC; RBS Bankline (East West Bank labels it Two or More Days Available)Balance (status)
075Three or more days floatHSBC; RBS BanklineBalance (status)
100Total creditsHSBC; East West Bank; Westpac; ScotiabankSummary
400Total debitsHSBC; East West Bank; Westpac; ScotiabankSummary
108Credit (any type)HSBC developer code listDetail credit
115Lockbox depositHSBCDetail credit
142ACH credit receivedHSBC; East West Bank; WestpacDetail credit
165Preauthorized ACH creditHSBCDetail credit
175Check deposit packageHSBC; WestpacDetail credit
195Incoming money transferHSBC; East West Bank; WestpacDetail credit
206Book transfer creditHSBC developer code list; East West BankDetail credit
275ZBA creditWestpacDetail credit
301Commercial depositHSBCDetail credit
354Interest creditHSBC developer code list; WestpacDetail credit
399Miscellaneous creditHSBC; East West Bank; WestpacDetail credit
451ACH debit receivedHSBC; WestpacDetail debit
455Preauthorized ACH debitHSBCDetail debit
466ACH settlementHSBC developer code list; WestpacDetail debit
475Check paidHSBC; East West Bank; WestpacDetail debit
495Outgoing money transferHSBC; WestpacDetail debit
506Book transfer debitHSBC developer code list; East West BankDetail debit
555Deposited item returnedHSBC; WestpacDetail debit
575Individual ZBA debitHSBC; WestpacDetail debit
698Miscellaneous feeHSBC; WestpacDetail debit
699Miscellaneous debitHSBC; East West Bank; WestpacDetail debit
890Non-monetary information, neither debit nor creditScotiabankDetail (non-monetary)
Funds type 0Immediate availabilityScotiabankFunds type
Funds type 1One-day availabilityScotiabankFunds type
Funds type 2Two or more days availabilityScotiabankFunds type
Funds type S / DDistributed availabilityScotiabankFunds type
Funds type VValue dated; a value date and time followScotiabank; HSBCFunds type
Funds type ZUnknown availability (default)Scotiabank; NABFunds type
As-of-date modifier 1 / 2 / 3 / 4Interim previous day / final previous day / interim same day / final same dayScotiabank; HSBC02 record

Sample file

Synthetic example with a fictional bank and account. Real files vary by bank.

01,FICTBANK,ACMEPAYCO,261026,0700,1,80,,2/
02,ACMEPAYCO,FICTBANK,1,261025,,USD,2/
03,0001234567,USD,010,1500000,,,015,1620000,,,040,1450000,,,045,1570000,,/
88,100,250000,2,,400,130000,1,/
16,195,150000,0,WIRE0001,INV1001,INCOMING WIRE ACME TRADING LTD
16,142,100000,0,ACH0002,,ACH CREDIT REFUND
16,495,130000,0,WIRE0003,PO7788,OUTGOING WIRE TO SUPPLIER
88,BENEFICIARY REF PO7788 OCTOBER SETTLEMENT
49,6900000,7/
98,6900000,1,9/
99,6900000,1,11/

Reading balances

Read the 03 record together with any 88 records that continue it. Pair each type code with the amount after it. 010 is opening ledger, 015 closing ledger, 040 opening available and 045 closing available. Intraday files usually report 030 current ledger and 060 current available instead. Apply implied decimals from the account currency before use.

Parsing and reconciliation pitfalls

How it compares

BAI2 is a flat, comma-delimited format with numeric type codes, common in North America. MT940 uses SWIFT tags and real decimals. camt.053 is structured XML with richer remittance and party data. ASC X9 succeeded BAI2 with BTRS (X9.121), which BAI2 readers cannot always parse.

Polynopsis reads statement files like this one through a forwarding inbox and turns them into a live position alongside your API-connected accounts. See how it works.

Frequently asked questions

What is a BAI2 file?

A BAI2 file is a bank balance and transaction report in a comma-delimited text format. The Bank Administration Institute published version 2 in 1987. It nests a file, groups and accounts, and uses three-digit type codes for balances and transactions.

How do I read the 03 record in BAI2?

After the record code, read the account number and currency. Then read repeating sets of type code, amount, item count and funds type. For example, 010 is opening ledger and 045 is closing available. Continue into any following 88 records.

What does the 88 record mean in BAI2?

The 88 record is a continuation. It carries data that did not fit on the previous 03, 16 or 88 line. Append it to the record above before parsing, keeping text and field boundaries intact.

Other formats

Sources

  1. BAI2 statement format (BankRec) · Westpac
  2. BAI2 Information Reporting Specifications · HSBC
  3. BAI2 Reporting Reference Guide · East West Bank
  4. ScotiaConnect BAI2 Export File Specification · Scotiabank
  5. Balance and Transaction Reporting Standard (BTRS) X9.121-2012 overview · Federal Reserve Bank of Minneapolis (Remittance Coalition)

Know where all your money is.

Polynopsis gives cross-border payment teams one live position across every bank, payout partner, exchange and wallet, including money in flight, and warns before a corridor runs dry.