# ISO 20022 pain.001, pacs.008 & camt.053 JSON Bridge (`bifrost-data/iso20022-payment-statement-bridge`) Actor

Stateless, zero-retention ISO 20022 banking & treasury bridge: validate and convert pain.001.001.09, pacs.008.001.08, camt.053.001.08, and legacy SWIFT MT940 statements with SPS 2026 & EPC SEPA structured address, IBAN Mod-97, BIC, QRR, and exact Decimal CtrlSum checks.

- **URL**: https://apify.com/bifrost-data/iso20022-payment-statement-bridge.md
- **Developed by:** [SEOK HOON HONG](https://apify.com/bifrost-data) (community)
- **Categories:** Developer tools, Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.40 / 1,000 verified iso 20022 message / statement bridges

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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

# README

## ISO 20022 `pain.001`, `pacs.008`, `camt.053` & `MT940` Deterministic JSON Bridge

> **10-Second Summary**: Convert, validate, and generate **ISO 20022 `pain.001`, `pacs.008`, `camt.053` XML** and legacy **SWIFT `MT940` bank statements** for **SAP, NetSuite, Xero, Make, Zapier, and n8n**—catching **2026 SEPA & Swiss SPS structured-address rejections** and IBAN Mod-97 errors before your bank rejects a payment batch.
>
> - **100% Zero-Retention RAM (`0` External Network Calls)**: Financial payloads are processed purely in volatile memory with optional IBAN/account masking.
> - **Predictable Pay-Per-Event (`$8.00 / 1,000`)**: `$0.008` per verified payment batch or bank statement; malformed XML and XXE inputs cost **$0.00**.

Stateless, **zero-retention (pure RAM, 0-byte disk storage)** financial messaging validator, generator, and format bridge for **ERP, treasury automation (`n8n`, `Make`, `Zapier`), accounting reconciliation, and AI finance agents**.

### Why Finance, ERP & Automation Teams Use This Actor

1. **Generate Compliant `pain.001.001.09` Payment Batches from Clean JSON**:
   - Feed simple JSON payment arrays and receive canonical `urn:iso:std:iso:20022:tech:xsd:pain.001.001.09` XML (UTF-8 without BOM) with exact `Decimal` `CtrlSum` and `NbOfTxs` pre-calculated and self-audited.
2. **Audit `pain.001`, `pacs.008` & `camt.053` Against 2026 Structured Address & Checksum Rules**:
   - Flags unstructured `<AdrLine>` blocks missing mandatory `<TwnNm>` and `<Ctry>` (enforced under **Swiss Payment Standards SPS 2026 since 14 November 2026** and aligned with **EPC SEPA `EPC153-22`** hybrid/structured rules).
   - Verifies **IBAN (`ISO 13616` Mod-97)**, **BIC (`ISO 9362`)**, **ISO 11649 `RF` Creditor Reference (`SCOR`)**, **Swiss QR-IBAN (`30000–31999`) + 27-digit Modulo-10 recursive `QRR`**, SWIFT slash rules, and exact `OPBD + net entries == CLBD` statement balance math.
3. **Bridge Legacy SWIFT `MT940` Statements to Typed JSON + `camt.053.001.08` XML**:
   - Deterministically extracts standard SEPA `:86:` subfields (`?20..?33`, `~20..~33`, `/EREF/`, `/IBAN/`, `/BIC/`, `/NAME/`, `/REMI/`) while preserving full bank-specific narrative text losslessly inside `raw_narrative` and `<AddtlNtryInf>`.

### Explicit Deterministic Scope Boundary (Zero-Storage & Zero-Guesswork)

- **Pure Standard & Mathematical Verification**: Operates strictly on official ISO 20022 XML structures (`pain.001.001.03/09`, `pacs.008.001.08`, `camt.053.001.02/08/10`), standard SWIFT `MT940` tags, and deterministic SEPA `:86:` codewords. Proprietary free-text bank memos outside standard SEPA subfields are never guessed via probabilistic AI; they are preserved verbatim in `raw_narrative`.
- **Zero Disk Retention**: All payloads are processed in volatile memory (`256 MB` container) and discarded immediately upon dataset output.
- **Zero-Waste Billing**: Event `verified-iso20022-message` (`$0.008` per verified message = `$8.00 / 1,000` messages). Unparseable syntax errors and duplicate payloads are skipped at **$0.00**.

### Monorepo Deployment (`ballostark-wq/agent-pickaxe-factory`)

- Folder path in GitHub monorepo: `actors/act-011-iso20022-rail-bridge`
- Automated CI gate: `python src/main.py --selftest` -> `apify push --force` via `.github/workflows/deploy-actors.yml` (`v1.2`).

### Sample Output Record

```json
{
  "operation": "audit_xml",
  "message_schema": "pain.001.001.09",
  "message_id": "BATCH-2026-1124-01",
  "transaction_count": 2,
  "control_sum": "14500.50",
  "currency": "CHF",
  "is_valid": true,
  "sps_2026_structured_address_compliant": true,
  "iban_checksum_valid": true,
  "validation_findings": []
}
```

### Transparent Pay-Per-Event Pricing

- **Actor Start**: `$0.00005`
- **Verified ISO 20022 / MT940 Message (`verified-iso20022-message`)**: `$0.008` per verified message (`$8.00` per 1,000 messages). Malformed XML/MT940 inputs cost `$0.00`.

### More Zero-Maintenance B2B Finance, Procurement & Security Tools by `bifrost-data`

| Actor | Business Use Case | Pricing |
| :--- | :--- | :--- |
| [BAI2 & OFX/QFX Bank Statement to JSON & camt.053 Bridge](https://apify.com/bifrost-data/bai2-ofx-bank-statement-bridge) | Reconcile US corporate BAI2 lockbox files (01-99) & OFX/QFX bank or card downloads | `$8.00 / 1k` |
| [cXML SAP Ariba & Coupa Order, ASN & Invoice JSON Bridge](https://apify.com/bifrost-data/cxml-ariba-coupa-procurement-bridge) | Convert SAP Ariba & Coupa cXML Purchase Orders, ASNs & Invoices to JSON or cXML XML | `$8.00 / 1k` |
| [SWIFT MT103 & MT202 to ISO 20022 CBPR+ pacs.008 Bridge](https://apify.com/bifrost-data/swift-mt103-cbpr-pacs008-wire-bridge) | Decode MT103 wire proofs, screen fake MT103 red flags, audit 32A/33B fees & emit pacs.008 | `$8.00 / 1k` |
| [Palo Alto PAN-OS, GlobalProtect & Cortex CVE Scraper](https://apify.com/bifrost-data/paloalto-panos-security-advisories-scraper) | Track PAN-OS CVSS v4/v3 scores, fixed hotfix releases, CISA KEV & Threat IDs | `$2.20 / 1k` |
| [Red Hat Security Advisories, RHSA, CSAF & CVE Scraper](https://apify.com/bifrost-data/redhat-security-advisories-scraper) | Export RHEL, OpenShift & Ansible RHSA errata, CSAF VEX states & backport fixes | `$2.20 / 1k` |

# Actor input Schema

## `operation` (type: `string`):

Choose deterministic operation: (1) audit_and_parse_xml parses & validates pain.001, pacs.008, or camt.053 XML into JSON with XPath compliance checks; (2) generate_pain001_xml builds canonical pain.001.001.09 XML from JSON orders; (3) bridge_mt940_to_camt053 converts legacy SWIFT MT940 statements into JSON + camt.053.001.08 XML.

## `compliance_profile` (type: `string`):

SPS_2026_AND_SEPA enforces mandatory <TwnNm> + <Ctry> structured/hybrid addresses (rejecting legacy unstructured <AdrLine> per Swiss SPS 2026 effective 2026-11-14); EPC_SEPA_TRANSITION downgrades unstructured addresses to WARNING.

## `xml_documents` (type: `array`):

Array of raw UTF-8 ISO 20022 XML strings (pain.001.001.03/09, pacs.008.001.08, camt.053.001.02/08/10). Processed purely in RAM with 0-byte disk retention.

## `payment_orders` (type: `array`):

Array of JSON payment batch objects containing debtor (name, iban, bic, address) and transactions (end_to_end_id, amount, currency, creditor_name, creditor_iban, creditor_bic, creditor_address, scor_reference / qrr_reference / remittance_text).

## `mt940_statements` (type: `array`):

Array of raw SWIFT FIN MT940 bank statement strings (:20:, :25:, :28C:, :60F:, :61:, :86:, :62F:). Standard SEPA :86: tags are parsed into typed fields while bank-specific memo text is preserved losslessly in raw_narrative.

## `include_converted_xml` (type: `boolean`):

Attach full canonical pain.001.001.09 or camt.053.001.08 XML in converted_xml alongside structured JSON transactions.

## `max_items` (type: `integer`):

Upper bound on verified ISO 20022 messages processed in a single run (1-1000).

## Actor input object example

```json
{
  "operation": "generate_pain001_xml",
  "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": [],
  "include_converted_xml": true,
  "max_items": 100
}
```

# Actor output Schema

## `messages` (type: `string`):

Schema-verified payment orders, interbank transfers, and reconciled statements with XPath compliance findings and converted XML.

## `runMetrics` (type: `string`):

Execution telemetry including processed messages, malformed $0 skips, and PPE billing counts.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "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"
                }
            ]
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bifrost-data/iso20022-payment-statement-bridge").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "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",
                }],
        }] }

# Run the Actor and wait for it to finish
run = client.actor("bifrost-data/iso20022-payment-statement-bridge").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "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"
        }
      ]
    }
  ]
}' |
apify call bifrost-data/iso20022-payment-statement-bridge --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bifrost-data/iso20022-payment-statement-bridge"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/CxtC6EcCjUXj3bmBG/builds/tNlkCSPvRki8Fbe95/openapi.json
