# SEPA XML Generator & IBAN Validator (pain.001 & pain.008) (`finops_studio/sepa-xml-generator`) Actor

Convert CSV, Excel rows, or JSON into bank-ready ISO 20022 SEPA Credit Transfer (pain.001.001.03 / pain.001.001.09) and Direct Debit (pain.008.001.02 / pain.008.001.08) XML files with MOD-97 IBAN validation and 2026 structured addresses.

- **URL**: https://apify.com/finops_studio/sepa-xml-generator.md
- **Developed by:** [FinOps Studio](https://apify.com/finops_studio) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 sepa transactions

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## SEPA XML Generator & IBAN Validator (`pain.001` & `pain.008` ISO 20022)

Instantly convert **CSV spreadsheets, Excel pastes, or JSON arrays** into bank-compliant **ISO 20022 SEPA XML** files for **Bulk Credit Transfers** (Payroll & Supplier Payouts) and **SEPA Direct Debits** (Recurring Subscriptions, Memberships & Invoices).

Built for **2026 European Payments Council (EPC) structured address rules** (`pain.001.001.09` & `pain.008.001.08`) while maintaining full backward compatibility with classic bank portals (`pain.001.001.03` & `pain.008.001.02`).

***

### Why Businesses, Accountants & Automation Builders Use This Tool

1. **4 Official ISO 20022 Schemas Included:**
   - `pain.001.001.09` — SEPA Credit Transfer (**2026 EPC Structured Postal Address Standard**)
   - `pain.001.001.03` — SEPA Credit Transfer (Classic Universal Bank Format)
   - `pain.008.001.08` — SEPA Direct Debit (**2026 EPC Structured Postal Address Standard**)
   - `pain.008.001.02` — SEPA Direct Debit (Classic `CORE` & `B2B` Direct Debit)
2. **Mathematical IBAN & BIC Verification Before Bank Upload:**
   - Verifies every IBAN across **40+ SEPA / EEA / UK / Swiss countries** using **ISO 13616 `MOD-97` checksum arithmetic** and country length rules.
   - Verifies **ISO 9362 BIC/SWIFT** codes (`8` or `11` characters) or automatically emits `<Othr><Id>NOTPROVIDED</Id></Othr>` for IBAN-only EEA transfers.
3. **Zero Floating-Point Rounding Errors:**
   - Calculates header and batch `<CtrlSum>` totals in **exact integer cents** and supports both standard (`1250.50`) and European (`1.250,50`) number formats.
4. **Automatic SEPA Character Transliteration:**
   - Prevents #1 bank batch rejections by automatically converting accented/special characters (`Müller & Söhne` → `Mueller + Soehne`, `Élodie` → `Elodie`) into strict EPC-allowed Latin characters, with full audit warnings.
5. **Ready for `n8n`, `Make.com`, `Zapier`, REST API & MCP AI Agents:**
   - Outputs both a direct **downloadable `.xml` file URL** (`SEPA_PAYMENT_BATCH.xml`) and inline XML + JSON validation summaries.

***

### Quick Example Input (JSON)

```json
{
  "schema": "pain.001.001.09",
  "initiatingPartyName": "Acme Europe GmbH",
  "initiatingPartyIban": "DE89370400440532013000",
  "initiatingPartyBic": "COBADEFFXXX",
  "initiatingPartyCountry": "DE",
  "initiatingPartyCity": "Berlin",
  "executionDate": "2026-11-15",
  "transactions": [
    {
      "name": "Müller & Söhne KG",
      "iban": "DE89370400440532013000",
      "amount": "1250.50",
      "remittanceInfo": "Invoice INV-2026-001",
      "country": "DE",
      "city": "Munich"
    }
  ]
}
```

### Quick Example Input (CSV / Semicolon Excel Export)

```csv
name;iban;bic;amount;reference;country;city
Müller & Söhne KG;DE89370400440532013000;COBADEFFXXX;1.250,50;Invoice INV-2026-001;DE;Munich
Élodie Lefèvre SARL;FR7630006000011234567890189;BNPAFRPPXXX;849,95;Facture 2026-104;FR;Paris
```

***

### Supported European & SEPA Banks

Compatible with standard SEPA XML bulk upload portals across Deutsche Bank, Commerzbank, Sparkasse, BNP Paribas, Société Générale, ING, Rabobank, ABN AMRO, Santander, BBVA, UniCredit, Intesa Sanpaolo, Revolut Business, Wise Business, Qonto, N26 Business, PostFinance, UBS, and ZKB.

***

### Companion Financial Automation Tools by FinOps Studio

- **[Interactive Web Hub & Free 3-Row Preview](https://geornaden.github.io/finops-studio/)** — Browser-local preview & ready-to-import `n8n` workflows
- [ISO 20022 `pain.002` Bank Status & Rejection Decoder](https://apify.com/finops_studio/iso20022-pain002-status-parser) — Translate Bank Rejection Codes (`AC04`, `AM04`, `BE04`) to Plain English
- [EU E-Invoice XML Generator (`Peppol`, `XRechnung` & `Factur-X`)](https://apify.com/finops_studio/eu-einvoice-xml-generator) — Mandatory 2026 EN 16931 European E-Invoices
- [German `DATEV Buchungsstapel` CSV Generator](https://apify.com/finops_studio/datev-buchungsstapel-generator) — DATEV EXTF v700 Export (`SKR03` / `SKR04`) for *Steuerberater*
- [US NACHA ACH File Generator & Parser](https://apify.com/finops_studio/nacha-ach-file-generator) — 94-Char US Direct Deposit & Vendor ACH Batches
- [Corporate `BAI2` Bank Statement Parser](https://apify.com/finops_studio/bai2-bank-statement-parser) — US Treasury Cash-Management Statements to JSON/CSV
- [Australian `ABA` Direct Entry File Generator](https://apify.com/finops_studio/aba-cemtex-file-generator) — 120-Char Australian BECS `.aba` Bank Files

> **Disclaimer:** This software is a technical file-formatting and mathematical checksum validation utility provided "as-is", not financial, accounting, or legal advice. Always verify recipient IBANs, control sums, and execution dates inside your banking portal before authorizing any payment batch.

# Actor input Schema

## `schema` (type: `string`):

Choose Credit Transfer (pain.001 for payroll/supplier payouts) or Direct Debit (pain.008 for customer collections). Versions .09 and .08 include 2026 EPC structured address support.

## `initiatingPartyName` (type: `string`):

Legal name of the sender (for Credit Transfer) or creditor (for Direct Debit).

## `initiatingPartyIban` (type: `string`):

Your EUR bank account IBAN (verified via MOD-97 checksum).

## `initiatingPartyBic` (type: `string`):

8 or 11 character BIC code of your bank.

## `initiatingPartyCountry` (type: `string`):

2-letter country code for structured postal address (e.g., DE, FR, NL, ES, BE).

## `initiatingPartyCity` (type: `string`):

Town or city name for 2026 structured SEPA postal address.

## `executionDate` (type: `string`):

Requested bank execution or direct debit collection date in YYYY-MM-DD format.

## `creditorSchemeId` (type: `string`):

Required only for Direct Debit (pain.008), e.g., DE98ZZZ09999999999.

## `sequenceType` (type: `string`):

RCUR (Recurring), FRST (First), OOFF (One-off), or FNAL (Final).

## `batchBooking` (type: `boolean`):

Group transactions as a single consolidated bank statement booking line.

## `csvTransactions` (type: `string`):

Optional CSV text with header row: name,iban,bic,amount,reference,country,city

## `transactions` (type: `array`):

List of payment or direct debit items (each with name, iban, amount, optional bic, remittanceInfo, endToEndId, mandateId, mandateDate, country, city).

## `includeInlineXml` (type: `boolean`):

Include the generated XML string directly inside the JSON dataset output (ideal for Make, n8n, Zapier, and MCP AI Agents).

## Actor input object example

```json
{
  "schema": "pain.001.001.09",
  "initiatingPartyName": "Acme Europe GmbH",
  "initiatingPartyIban": "DE89370400440532013000",
  "initiatingPartyBic": "COBADEFFXXX",
  "initiatingPartyCountry": "DE",
  "initiatingPartyCity": "Berlin",
  "sequenceType": "RCUR",
  "batchBooking": true,
  "includeInlineXml": true
}
```

# Actor output Schema

## `sepaXmlFile` (type: `string`):

Direct link to download SEPA_PAYMENT_BATCH.xml ready for bank upload.

## `validationDataset` (type: `string`):

JSON summary containing MOD-97 check status, control sum, and transaction items.

# 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 = {
    "initiatingPartyName": "Acme Europe GmbH",
    "initiatingPartyIban": "DE89370400440532013000",
    "initiatingPartyBic": "COBADEFFXXX",
    "initiatingPartyCountry": "DE",
    "initiatingPartyCity": "Berlin"
};

// Run the Actor and wait for it to finish
const run = await client.actor("finops_studio/sepa-xml-generator").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 = {
    "initiatingPartyName": "Acme Europe GmbH",
    "initiatingPartyIban": "DE89370400440532013000",
    "initiatingPartyBic": "COBADEFFXXX",
    "initiatingPartyCountry": "DE",
    "initiatingPartyCity": "Berlin",
}

# Run the Actor and wait for it to finish
run = client.actor("finops_studio/sepa-xml-generator").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 '{
  "initiatingPartyName": "Acme Europe GmbH",
  "initiatingPartyIban": "DE89370400440532013000",
  "initiatingPartyBic": "COBADEFFXXX",
  "initiatingPartyCountry": "DE",
  "initiatingPartyCity": "Berlin"
}' |
apify call finops_studio/sepa-xml-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,finops_studio/sepa-xml-generator"
        }
    }
}
```

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/BPRakwinoJlE0KdSe/builds/RBsSRayNsOCONdg6A/openapi.json
