Ingest a BAI2 bank statement file and load balances and transactions into an internal cash-position ledger

domain: moderntreasury.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Retrieve the BAI2 file via SFTP or bank portal download; confirm it begins with a Type-01 File Header record containing sender/receiver routing identifiers and a file creation date-time
  2. Parse each record type in order: 01 File Header, 02 Group Header, 03 Account Identifier and Summary (captures account number, currency, and opening/closing ledger and available balances using three-digit BAI type codes), 16 Transaction Detail (captures amount, text, and bank reference), 49 Account Trailer, 98 Group Trailer, 99 File Trailer — validate that control totals in trailers match summed transaction amounts
  3. Map each three-digit BAI transaction code (e.g., codes in the 100-series for credits, 400-series for debits) to your internal GL account and transaction category; maintain a code-to-category lookup table because banks extend the standard with proprietary codes
  4. Upsert balance records keyed on account number plus value date; write each transaction detail row as an immutable ledger entry with the bank reference as an idempotency key to prevent duplicates on re-ingestion
  5. Emit a reconciliation summary comparing the BAI closing ledger balance against the sum of your internal ledger entries for the same account and date; flag any delta for manual review
  6. Schedule the ingest job after the bank's prior-day file delivery window (typically early morning) and retry with exponential backoff if the file has not yet arrived

Known gotchas

Related routes

Implement a BAI2 bank statement parser that loads daily balance and transaction data into a cash-position ledger with validation
reconciliation/BAI2 · 6 steps · unrated
Parse BAI2 lockbox and bank files and automate cash application
accounting-general · 6 steps · unrated
Integrate BAI2 and camt.053 statement ingestion with a Treasury Management System via SFTP and normalize transaction codes across both formats
moderntreasury.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans