# Generate SEPA pain.001.001.09 Credit Transfer XML from JSON

**Use case:** 

Convert ERP, NetSuite, SAP, or spreadsheet payment batch JSON objects into bank-ready ISO 20022 pain.001.001.09 XML with structured postal addresses, IBAN Mod-97 checks, ISO 11649 SCOR RF validation, and exact Decimal CtrlSum computation.

## Input

```json
{
  "operation": "generate_pain001_xml",
  "compliance_profile": "SPS_2026_AND_SEPA",
  "xml_documents": [],
  "payment_orders": [
    {
      "message_id": "SEPA-BATCH-20261125-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": 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 "Generate SEPA pain.001.001.09 Credit Transfer XML from JSON". [Sign up or log in](https://console.apify.com/create-task-from-example/1CGYqZMPPCf6I8ApH) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Generate SEPA pain.001.001.09 Credit Transfer XML from 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 "Generate SEPA pain.001.001.09 Credit Transfer XML from 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 "Generate SEPA pain.001.001.09 Credit Transfer XML from JSON" task via API](https://apify.com/bifrost-data/iso20022-payment-statement-bridge.md).

## FAQ

### Does the generated pain.001.001.09 XML satisfy EPC SEPA and Swiss SPS 2026 structured address rules?

Yes. Every debtor and creditor address is emitted with structured <TwnNm>, <PstCd>, and <Ctry> elements required by Swiss SPS 2026 and EPC SEPA 2026 guidelines.

### How are CtrlSum and NbOfTxs calculated across multi-invoice payment batches?

All transaction amounts are summed using exact Python Decimal arithmetic with zero IEEE-754 floating-point drift, guaranteeing exact <CtrlSum> and <NbOfTxs> parity.

### Are bank IBANs or payment payloads stored on disk or sent to third-party APIs?

No. Processing runs 100% in volatile 256MB RAM with zero external network requests and zero disk retention. Malformed JSON inputs are skipped at $0 charge.

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