# Reconcile BAI2 Lockbox, ACH & Fedwire for NetSuite & SAP

**Use case:** 

Convert multi-line US commercial bank BAI2 lockbox (115), incoming Fedwire (195), and ACH debit (455) files with 88 continuation memos into structured ERP JSON and ISO 20022 camt.053.001.08 XML for automated NetSuite and SAP cash application.

## 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 "Reconcile BAI2 Lockbox, ACH & Fedwire for NetSuite & SAP". [Sign up or log in](https://console.apify.com/create-task-from-example/YuAYu8De8aDr00GN7) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Reconcile BAI2 Lockbox, ACH & Fedwire for NetSuite & SAP" 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 "Reconcile BAI2 Lockbox, ACH & Fedwire for NetSuite & SAP" 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 "Reconcile BAI2 Lockbox, ACH & Fedwire for NetSuite & SAP" task via API](https://apify.com/bifrost-data/bai2-ofx-bank-statement-bridge.md).

## FAQ

### Are multi-line BAI2 88 continuation records preserved for invoice matching?

Yes. Every 88 continuation line following a 16 transaction detail record is concatenated into raw_narrative and mapped into camt.053 <AddtlNtryInf> for ERP invoice matching.

### Does it verify Account (49), Group (98), and File (99) control totals?

Yes. It checks exact Decimal control sums and physical line counts at all three BAI2 hierarchy levels before marking a statement COMPLIANT.

### Can treasury teams run this automatically via SFTP + n8n or Make?

Yes. Watch an SFTP folder in Make or n8n, pass raw BAI2 text to this Actor, and push verified JSON or camt.053 XML straight into NetSuite or SAP.

## 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`).
