# Convert OFX & QFX Bank or Card Statements to JSON & camt.053

**Use case:** 

Normalize legacy OFX 1.x (unclosed SGML) and OFX 2.x (XML) / QFX bank checking and corporate credit-card statements into clean JSON and ISO 20022 camt.053.001.08 XML. Audits duplicate FITID transaction IDs, derives opening-to-closing ledger balances, and blocks XXE payloads in 256MB RAM.

## Input

```json
{
  "format_mode": "ofx_qfx_only",
  "statements": [
    "OFXHEADER:100\nDATA:OFXSGML\nVERSION:102\nSECURITY:NONE\nENCODING:USASCII\n\n<OFX>\n<BANKMSGSRSV1>\n<STMTTRNRS>\n<STMTRS>\n<CURDEF>USD\n<BANKACCTFROM>\n<BANKID>021000021\n<ACCTID>9988774300\n<ACCTTYPE>CHECKING\n</BANKACCTFROM>\n<BANKTRANLIST>\n<DTSTART>20261101000000[-5:EST]\n<DTEND>20261123235959[-5:EST]\n<STMTTRN>\n<TRNTYPE>CREDIT\n<DTPOSTED>20261120120000[-5:EST]\n<TRNAMT>4500.00\n<FITID>202611200001\n<NAME>STRIPE TRANSFER\n<MEMO>DAILY PAYOUT BATCH\n<STMTTRN>\n<TRNTYPE>DEBIT\n<DTPOSTED>20261121120000[-5:EST]\n<TRNAMT>-320.25\n<FITID>202611210002\n<CHECKNUM>1042\n<NAME>CITY POWER UTIL\n<MEMO>NOV ELECTRIC\n</BANKTRANLIST>\n<LEDGERBAL>\n<BALAMT>14179.75\n<DTASOF>20261123235959[-5:EST]\n</LEDGERBAL>\n<AVAILBAL>\n<BALAMT>14000.00\n<DTASOF>20261123235959[-5:EST]\n</AVAILBAL>\n</STMTRS>\n</STMTTRNRS>\n</BANKMSGSRSV1>\n</OFX>"
  ],
  "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 "Convert OFX & QFX Bank or Card Statements to JSON & camt.053". [Sign up or log in](https://console.apify.com/create-task-from-example/MO4bIIqiCyXeyDJhy) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Convert OFX & QFX Bank or Card Statements to JSON & camt.053" 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 "Convert OFX & QFX Bank or Card Statements to JSON & camt.053" 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 "Convert OFX & QFX Bank or Card Statements to JSON & camt.053" task via API](https://apify.com/bifrost-data/bai2-ofx-bank-statement-bridge.md).

## FAQ

### Why do standard XML parsers fail on bank OFX/QFX downloads?

Many US and Canadian banks still export OFX 1.x files using legacy unclosed SGML tags (e.g., <TRNAMT>45.00 without closing tags). This engine parses both OFX 1.x SGML and OFX 2.x XML seamlessly.

### Does it detect duplicate FITID transaction IDs across statement downloads?

Yes. When strict_control_totals is enabled, duplicate <FITID> identifiers are flagged in compliance_findings to prevent double-booking in QuickBooks, Xero, or NetSuite.

### What happens if an uploaded file is truncated or malformed?

Unparseable syntax errors and XXE entity payloads are rejected safely at $0.00 charge under our Push-Verified-Then-Charge guarantee.

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