# Convert Legacy SWIFT MT940 Statements to camt.053 XML & JSON

**Use case:** 

Bridge legacy SWIFT MT940 bank statements (:20:, :25:, :60F:, :61:, :86:, :62F:) into normalized JSON transactions and canonical ISO 20022 camt.053.001.08 XML. Extracts SEPA :86: subfields (/IBAN/, /BIC/, /EREF/, /REMI/), verifies opening-to-closing balance math, and preserves raw narrative memos.

## Input

```json
{
  "operation": "bridge_mt940_to_camt053",
  "compliance_profile": "SPS_2026_AND_SEPA",
  "xml_documents": [],
  "payment_orders": [
    {
      "message_id": "SEPA-BATCH-20261123-01",
      "execution_date": "2026-11-25",
      "service_level": "SEPA",
      "debtor": {
        "name": "Nordic Industrial GmbH",
        "iban": "DE89370400440532013000",
        "bic": "COBADEFFXXX",
        "address": {
          "street_name": "Friedrichstrasse",
          "building_number": "40",
          "post_code": "10117",
          "town_name": "Berlin",
          "country": "DE"
        }
      },
      "transactions": [
        {
          "end_to_end_id": "INV-2026-9001",
          "amount": "1250.50",
          "currency": "EUR",
          "creditor_name": "Alpen Precision AG",
          "creditor_iban": "NL91ABNA0417164300",
          "creditor_bic": "ABNANL2AXXX",
          "creditor_address": {
            "post_code": "1012",
            "town_name": "Amsterdam",
            "country": "NL",
            "address_lines": [
              "Damrak 18"
            ]
          },
          "scor_reference": "RF18539007547034"
        }
      ]
    }
  ],
  "mt940_statements": [
    ":20:STMT2611240001\n:25:NL91ABNA0417164300\n:28C:15/1\n:60F:C261122EUR1234,56\n:61:2611221122D45,00NTRFNONREF//ACME-INV-2026-042\n:86:999~00SEPA OVERBOEKING~20EREF+ACME-INV-2026-042~21PAYMENT FOR CLOUD API~30DEUTDEDB~31DE89370400440532013000~32Acme Corp Ltd\n:62F:C261122EUR1189,56\n"
  ],
  "include_converted_xml": true,
  "max_items": 25
}
```

## Output

```json
{
  "operation": {
    "label": "Operation Mode",
    "format": "string"
  },
  "message_family": {
    "label": "ISO 20022 Family",
    "format": "string"
  },
  "message_id": {
    "label": "Group Header Message ID",
    "format": "string"
  },
  "primary_currency": {
    "label": "Primary Currency",
    "format": "string"
  },
  "is_compliant": {
    "label": "Zero-Error Compliance Verdict",
    "format": "boolean"
  },
  "error_count": {
    "label": "Schema & Checksum Error Count",
    "format": "integer"
  },
  "warning_count": {
    "label": "Advisory Warning Count",
    "format": "integer"
  },
  "actual_tx_count": {
    "label": "Verified Transaction Count",
    "format": "integer"
  },
  "computed_control_sum": {
    "label": "Exact Decimal Sum",
    "format": "string"
  },
  "opening_balance": {
    "label": "Opening Balance (OPBD)",
    "format": "number"
  },
  "closing_balance": {
    "label": "Closing Balance (CLBD)",
    "format": "number"
  },
  "structured_address_count": {
    "label": "Structured Addresses",
    "format": "integer"
  },
  "hybrid_address_count": {
    "label": "Hybrid Addresses",
    "format": "integer"
  },
  "unstructured_address_count": {
    "label": "Unstructured Legacy Addresses",
    "format": "integer"
  }
}
```

## How it works

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

The ISO 20022 pain.001, pacs.008 & camt.053 JSON Bridge Actor is ready to run with the inputs already set for "Convert Legacy SWIFT MT940 Statements to camt.053 XML & JSON". [Sign up or log in](https://console.apify.com/create-task-from-example/vIpEjQjIhzxHIndld) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Convert Legacy SWIFT MT940 Statements to camt.053 XML & JSON" task

The ISO 20022 pain.001, pacs.008 & camt.053 JSON Bridge Actor will start running based on the input automatically. You can also change all the input fields, like bridge operation mode, postal address & validation profile, and more, to match your specific use case.

### 3. Receive the "Convert Legacy SWIFT MT940 Statements to camt.053 XML & JSON" 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 operation mode, ISO 20022 Family, group header message id, 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 Legacy SWIFT MT940 Statements to camt.053 XML & JSON" task via API](https://apify.com/bifrost-data/iso20022-payment-statement-bridge.md).

## FAQ

### What data does this task convert from Legacy SWIFT MT940 statements?

The Convert Legacy SWIFT MT940 Statements task converts standardized tags like :20:, :25:, :60F:, :61:, :86:, and :62F: into JSON transactions and canonical ISO 20022 camt.053.001.08 XML.

### What does the 'is_compliant' field indicate in the output?

The 'is_compliant' field indicates whether the converted data adheres to compliance standards, meaning it passed all validation checks with zero errors.

### What are the 'error_count' and 'warning_count' fields used for?

The 'error_count' field identifies the number of schema and checksum errors found during validation, while the 'warning_count' field indicates advisory warnings that do not prevent compliance.

### How does this task ensure the accuracy of balance calculations?

The task verifies the opening and closing balances, ensuring that the sum of transactions matches the closing balance with exact decimal control checks.

### What types of addresses are reported in the output?

The output reports 'structured_address_count', 'hybrid_address_count', and 'unstructured_address_count', representing different types of address formats found in the statements.

### Can I schedule this task to run automatically?

The task can be scheduled to run automatically using the Apify Console, allowing for regular processing of Legacy SWIFT MT940 statements.

### Does this task include XML output in its results?

Yes, the task includes an option to include converted XML output in the results from the processed Legacy SWIFT MT940 statements.

## About this Actor

This example demonstrates how to use [ISO 20022 pain.001, pacs.008 & camt.053 JSON Bridge](https://apify.com/bifrost-data/iso20022-payment-statement-bridge.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/bifrost-data/iso20022-payment-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/iso20022-payment-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`).
