Pain001: ISO 20022-Compliant Payment Files#
Welcome to Pain001 โ a powerful Python library for automating ISO 20022-compliant payment file creation.
Pain001 simplifies payment processing by generating standardized payment initiation files (pain.001) from CSV files, SQLite databases, or Python data structures, with mandatory validation and enterprise-grade reliability.
Get up and running in minutes with pip install and a simple example.
Learn how to use Pain001 with CSV data, databases, and custom configurations.
Complete API documentation with all classes, functions, and methods.
Configure Pain001 for your specific payment processing needs.
Key Features#
๐ฆ ISO 20022 Compliance โ Generate files compliant with pain.001.001.03 through pain.001.001.11
๐ Multiple Data Sources โ Support for CSV files, SQLite databases, and Python data structures
โ Automatic Validation โ Built-in XSD schema validation for generated XML files
๐ Secure by Design โ Uses defusedxml to prevent XXE attacks and SQL injection protection
๐งช Fully Tested โ 98.55% test coverage with 568 comprehensive tests
๐ฆ Type-Safe โ Full type hints for better IDE support and mypy compatibility
๐ Production-Ready โ Used in production for SEPA and international payments
๐ผ Enterprise Grade โ Robust error handling, comprehensive logging, and detailed reporting
Supported ISO 20022 Versions#
Version |
Status |
CSV Fields |
Primary Use Case |
|---|---|---|---|
pain.001.001.03 |
โ Stable |
42 |
SEPA credit transfers |
pain.001.001.04 |
โ Stable |
47 |
Non-SEPA international payments |
pain.001.001.05 |
โ Stable |
47 |
Enhanced global payments |
pain.001.001.06 |
โ Stable |
44 |
Instant SEPA payments |
pain.001.001.07 |
โ Stable |
44 |
Extended optional elements for regional requirements |
pain.001.001.08 |
โ Stable |
44 |
Enhanced validation and optional elements |
pain.001.001.09 |
โ Stable |
23 |
Modern simplified structure |
pain.001.001.10 |
โ Stable |
23 |
Enhanced compliance & validation |
pain.001.001.11 |
โ Latest |
23 |
Advanced features & future-proof |
Why Pain001?#
- Reduce Complexity
Payment processing involves complex ISO 20022 standards and multiple validation steps. Pain001 handles all of this automatically.
- Ensure Compliance
Every generated file is validated against official XSD schemas, ensuring 100% compliance with payment networks.
- Save Time
Automated generation eliminates manual file creation and validation, reducing processing time from hours to minutes.
- Improve Reliability
With enterprise-grade error handling and comprehensive testing, Pain001 ensures consistent, reliable payment processing.
- Scale with Confidence
Process thousands of payments with the same confidence and reliability as a single payment.
Getting Started in 3 Steps#
Install
pip install pain001
Load Your Data
from pain001 import main main( xml_message_type='pain.001.001.03', xml_template_file_path='template.xml', xsd_schema_file_path='schema.xsd', data_file_path='payments.csv' )
Get Validated Payment Files
Your ISO 20022-compliant XML payment file is generated and validated automatically.
Contents#
Documentation
- Installation
- Usage Guide
- Configuration
- Structured Logging
- Examples
- Example 1: Basic SEPA Payment Processing
- Example 2: Batch Payment Processing from CSV
- Example 3: Database-Driven Payment Processing
- Example 4: Multi-Version Support
- Example 5: Error Handling and Logging
- Example 6: Large Batch Processing with Chunking
- Example 7: Payment Amount Validation
- Example 8: Custom Data Processing Pipeline
- See Also
- pain001