BAI2 — the American bank-to-corporate report, counted in commas
Every reporting message on this site until now belonged to a standards body a payments reader already knows. The (the customer ), MT942 and MT950 are Swift's; camt.052 (the bank-to-customer account report), camt.053 and camt.054 are ISO's. BAI2 is neither. It was published by the Bank Administration Institute, an American banking-industry body. It is the second version of a cash-management balance reporting specification, and a very large number of American bank accounts are still reported in it.
DIRECTION: From the account-servicing bank to the account holder, or to whoever the account holder has nominated to receive it — commonly a treasury management system or an accounting package. Nothing in this file instructs anybody to do anything: every line states something that has already been booked, which is why there is no authorisation, no signature and no way to reply to it. There is a second direction inside the file and it is the one that catches people out. The 02 group record names an ultimate receiver and an originator, so a single file can carry several banks' data forwarded through one sender — and the account records inside a group belong to that group's originator, not to whoever transmitted the file.
WHO IS INVOLVED
- The account-servicing bankProduces the file and decides what is in it. The bank chooses which balance type codes it reports on the
03, which transaction type codes it uses on the16, what it writes in the free text, and whether it sends a previous-day file, an intraday file or both. Almost every difference between two banks' BAI2 files is a decision made here rather than a difference in the specification. - The account holder — a corporate treasuryReads the file and reconciles against it. This is the party the format exists for: it needs yesterday's closing balance to agree with its own ledger, today's available balance to fund payments against, and enough on each transaction line to tell which invoice a receipt settles.
- The treasury or accounting system that parses itThe party that has to count commas, and the one that meets every trap on this page. Because this format reports rather than instructs, a misreading here does not stop a payment — it produces a balance that is wrong or a reconciliation that quietly fails to match, which is the harder failure to notice.
- Accredited Standards Committee X9The current steward. BAI2's copyright passed to ASC X9, the accredited body that writes American financial-services standards, and X9 published a successor standard under the X9.121 designation written for backwards compatibility with BAI2 rather than as a replacement everyone had to adopt at once. So a reader should not treat BAI2 as an orphan format: it has an owner, and the owner has published a next version.
WHAT TO UNDERSTAND ABOUT IT
That provenance is the first thing to understand, because it is what makes the format look unfamiliar and behave sensibly. It was written for one job in one market: tell an American corporate treasury what its balances are and what moved, in a file a mainframe of the period could read a line at a time. So it has no XML, no tags, no field names — and, unlike every other file format on this site, no character positions either. A field is found by counting commas.
Read the shape before the fields, because the shape is the lesson. A is four levels deep and every line says which level it is on. 01 opens the file. 02 opens a group — one bank's data as of one date and time. 03 opens an account and carries its balances. 16 is one transaction. Then 49 closes the account, 98 closes the group and 99 closes the file, and each of those three carries a and a record count that must agree with what was actually read. A 88 line is not a level at all: it is the previous line, continued.
The second lesson is the three-digit type code, which is where BAI2 is stronger than it looks. Every balance on the 03 and every movement on a 16 is classified by a code from a published list. Codes below 100 are balance statuses, 100 to 399 are credits and 400 to 699 are debits. So a reconciliation engine can tell an incoming wire from a cheque paid without reading a word of free text. That is the same job gives its , done fourteen years earlier with three digits.
Version + profile: BAI2 is a comma-delimited record: a field is identified by its ordinal, the way a fixed-width field is identified by its offset, but its width is not fixed — the boundary is a comma, and text fields are wrapped in quotation marks. Three things follow that this page's columns cannot say on their own. A length shown here is a maximum, not a width, so nothing is padded and a short value is simply short. A quotation mark inside a value has no escape in this format, so the CSV habit of doubling it produces a record with the wrong number of fields rather than a quoted mark. And the file is not written in Unicode: check the code page your bank asks for before you check anything else, because the same Polish letter is a different byte in each of the encodings on offer.