# Audit Corporate BAI2 Bank Statements & Export camt.053 XML

**Use case:** 

Parse corporate BAI2 cash-management and lockbox files (01/02/03/16/88/49/98/99) into structured JSON and ISO 20022 camt.053.001.08 XML. Audits exact Decimal trailer control totals, record counts, ISO 4217 currency scaling, and opening-to-closing ledger rollforward in zero-retention RAM.

## Input

```json
{
  "format_mode": "auto_detect",
  "statements": [
    "01,021000021,ACMETREASURY,261123,2359,0001,80,1,2/\n02,ACMETREASURY,021000021,1,261123,2359,USD,2/\n03,8800194300,USD,010,25000000,,,015,26425050,,,100,1850050,2,,400,425000,2,/\n16,195,1500000,0,FED20261123001,INV-2026-8801,INCOMING FEDWIRE FROM GLOBAL RETAIL CORP/\n88,ORIG: GLOBAL RETAIL CORP OBI: ENTERPRISE LICENSE Q4/\n16,115,350050,0,LBX2026112309,LOCKBOX-4412,LOCKBOX BATCH DEPOSIT CHICAGO/\n16,455,175000,0,ACH2026112377,AWS-NOV-2026,PREAUTHORIZED ACH DEBIT CLOUD INFRA/\n16,475,250000,0,CHK00009841,9841,CHECK PAID VENDOR SETTLEMENT/\n49,55975150,7/\n98,55975150,1,9/\n99,55975150,1,11/"
  ],
  "strict_control_totals": true,
  "include_camt053_xml": true,
  "mask_account_numbers": false,
  "max_items": 25
}
```

## Output

```json
{
  "record_id": {
    "label": "Statement ID",
    "format": "string"
  },
  "source_format": {
    "label": "Format",
    "format": "string"
  },
  "account_id": {
    "label": "Account",
    "format": "string"
  },
  "currency": {
    "label": "CCY",
    "format": "string"
  },
  "as_of_date": {
    "label": "As-Of Date",
    "format": "string"
  },
  "validation_status": {
    "label": "Audit Status",
    "format": "string"
  },
  "is_compliant": {
    "label": "Compliant?",
    "format": "boolean"
  },
  "opening_ledger_balance": {
    "label": "Opening Bal",
    "format": "number"
  },
  "total_credits": {
    "label": "Total Credits",
    "format": "number"
  },
  "total_debits": {
    "label": "Total Debits",
    "format": "number"
  },
  "closing_ledger_balance": {
    "label": "Closing Bal",
    "format": "number"
  },
  "transaction_count": {
    "label": "Tx Count",
    "format": "integer"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The BAI2 & OFX/QFX Bank Statement to JSON & camt.053 Bridge Actor is ready to run with the inputs already set for "Audit Corporate BAI2 Bank Statements & Export camt.053 XML". [Sign up or log in](https://console.apify.com/create-task-from-example/0w0yBTJUfZX4Scclh) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Audit Corporate BAI2 Bank Statements & Export camt.053 XML" task

The BAI2 & OFX/QFX Bank Statement to JSON & camt.053 Bridge Actor will start running based on the input automatically. You can also change all the input fields, like statement format detection mode, raw bai2 or ofx / qfx statement payloads, and more, to match your specific use case.

### 3. Receive the "Audit Corporate BAI2 Bank Statements & Export camt.053 XML" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as statement id, format, account, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Audit Corporate BAI2 Bank Statements & Export camt.053 XML" task via API](https://apify.com/bifrost-data/bai2-ofx-bank-statement-bridge.md).

## FAQ

### Does this parser handle variable BAI2 funds availability fields (S, V, and D)?

Yes. Its state-machine scanner dynamically shifts column offsets for Type 0, S (Immediate/1-Day/2+Day), V (Value-dated), and D (Multi-day) availability codes without misaligning bank or customer references.

### How are non-USD currencies like JPY (0 decimals) and KWD (3 decimals) scaled?

Implied-decimal BAI2 integers are scaled automatically per ISO 4217 currency exponents (0, 2, or 3 decimals) while trailer records 49, 98, and 99 are audited on exact raw integers.

### Is any corporate bank statement data retained after the run?

No. Parsing and camt.053 generation execute strictly in volatile 256MB RAM with zero external network calls and optional account-number masking.

## About this Actor

This example demonstrates how to use [BAI2 & OFX/QFX Bank Statement to JSON & camt.053 Bridge](https://apify.com/bifrost-data/bai2-ofx-bank-statement-bridge.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/bifrost-data/bai2-ofx-bank-statement-bridge.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/bifrost-data/bai2-ofx-bank-statement-bridge.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
