The SEPA File: Easy Creation, Conversion & API
2026-07-11
Every company that works internationally or processes multiple payments eventually faces a choice: Continue with manual file preparation, or switch to standardized SEPA files. The difference isn’t purely technical but affects billing efficiency, error rates, and staff time.
A SEPA file is the technically correct way to submit payments to your bank. It’s standardized, machine-readable, and processed automatically. Once understood, working with SEPA files becomes a normal business procedure, not an IT hurdle.
If you’re processing first payment files, it helps to understand what’s actually happening. You’re not sending random data to the bank. You’re submitting a formally defined XML document. The bank loads it into their payment system, validates it, and executes it automatically.
What Is a SEPA File and Why Does It Matter
A SEPA file is a standardized XML document containing payment instructions. Based on ISO 20022 standard, it replaced national formats as mandatory on February 1, 2014. Today, banks don’t accept proprietary formats from companies anymore. Paytech companies generating old formats face rejection.
The business value
Why is this important for your company? A few practical reasons:
- Automation - Payments process automatically once uploaded. No manual intervention.
- Reduced errors - Standardized format eliminates typos and format confusion.
- Scalability - One SEPA file handles up to 100,000 individual payments.
- Compliance - Using current formats means regulatory compliance for EU payments.
Especially for recurring payments—memberships, subscriptions, loan installments—SEPA files transform workflows. What once took hours of manual work becomes a simple weekly upload.
File types: pain.001 and pain.008
Two SEPA file types dominate:
pain.001 contains credit transfers (you send money). Example: paying suppliers, employee salaries, refunds. Simple structure with clear sender/receiver.
pain.008 contains direct debits (you collect money). Example: membership fees, subscription billing, invoice collection. More complex due to mandate requirements.
The difference matters because structure, required fields, and validation rules differ. Mixing them or using wrong type quickly causes bank rejection.
Structure and Hierarchy: How SEPA Files Are Built
Understanding file structure helps catch errors early. SEPA files aren’t flat lists but hierarchical documents.
The four-level hierarchy
At the top sits the document wrapper with global metadata. Below that is the payment initiation block, stating basic details. Third level holds payment information blocks—these bundle common data like sender account. Finally, individual transactions sit at the bottom.
Why this hierarchy? Practical efficiency. Instead of repeating your company name in each payment, you declare it once at payment block level. Banks process files faster because they parse structure, not individual fields.
Creation Methods: Excel vs CSV vs API
Few companies do pure XML by hand. Instead, they start with data in Excel or CSV, then convert.
Excel-based approach
Advantages: Users understand Excel. Flexible for one-off adjustments. Good for visible data.
Disadvantages: Prone to formatting errors. Special characters cause problems. Hard to enforce required fields. Not ideal for recurring.
Best for: First exploration, smaller payment runs, teams without technical resources.
CSV approach
Advantages: Simple, clean format. Easy for systems to generate. Less formatting ambiguity. Good for automation.
Disadvantages: Less visible than Excel tables. Requires clear header agreement. More technical.
Best for: Recurring exports from ERP or accounting software.
API approach
Advantages: Fully automated, no manual steps. Validates on submission. Integrates directly with payment system.
Disadvantages: Requires development. Initial setup cost. Learning curve.
Best for: High-volume companies, recurring patterns, complete integration.
From Data to Valid SEPA File: Practical Workflow
A reliable workflow prevents most problems:
- Prepare data - Clean, validate, organize in source format (Excel/CSV).
- Verify required fields - All mandatory information present?
- Check data quality - IBANs correct? Amounts without symbols? Dates consistent?
- Map to SEPA structure - Assign source columns to XML fields.
- Generate XML - Tool creates file. Manual creation rarely makes sense.
- Validate against schema - Check technical XML correctness.
- Final review - Second person checks amounts, counterparties.
- Upload to bank - Many banks now accept via portal or API.
This process isn’t rigid. Experienced teams skip steps. New teams should follow completely.
Common SEPA File Errors and Prevention
Most errors fall into a few categories. Knowing them saves debugging time.
Data quality errors
- IBANs - Wrong format, typos, missing countries. Single typo stops execution.
- Amounts - Formatted as text, contain symbols, have wrong decimal separators.
- Names - Special characters, length exceeded, encoding issues.
- Dates - Mixed formats, values outside valid ranges.
Prevention: Validate source data before conversion. Don’t assume Excel columns are clean.
Structure errors
- Missing required fields - XML technically valid but bank rejects due to missing mandate info.
- Wrong PAIN version - File uses outdated PAIN.008.001.02, rejected November 2026.
- Namespace issues - XML declares wrong namespaces, parser can’t read structure.
Prevention: Know your PAIN version. Validate against schema. Test with small file first.
Assignment errors
- Duplicate mandate references - Same mandate listed twice.
- Mismatched IBANs - Account number doesn’t match counterparty name.
- Wrong purpose codes - Payment purposes classified incorrectly.
Prevention: Maintain clean master data. Use consistent identifiers. Document mappings.
Validation and Testing Before Bank Upload
Never send first production file without local testing. Validation steps:
- Check XML opens - Use text editor or XML viewer. Valid XML parses cleanly.
- Count records - Verify payment count matches expectations.
- Spot-check amounts - Sample five transactions for correctness.
- Validate schema - Use online SEPA validator or bank’s tool.
- Test with bank - Many banks offer sandbox. Test before production.
Banks provide detailed error logs when rejections occur. Read them carefully. Most provide specific field causing issue, not just generic “invalid file.”
API Integration for Larger Operations
Once SEPA file generation becomes regular, automation makes sense.
Typical API workflow:
- Your ERP or accounting system has API sending payment data.
- Payment service receives data, validates, generates SEPA XML.
- File gets automatically uploaded to bank.
- Confirmation sent back to origin system.
This eliminates manual steps entirely. Staff no longer exports, converts, uploads. They confirm in origin system, and payment system handles rest.
Summary: Key Points for Your SEPA File Process
- A SEPA file is standardized XML that banks require for all payments.
- pain.001 is for transfers (you send money), pain.008 for direct debits (you collect).
- Data quality matters more than file type. Clean source prevents most errors.
- Always validate locally before bank upload.
- For recurring processes, automation pays off quickly.
- If stuck, check data first, then format, then technical structure.
Frequently Asked Questions
- What is a SEPA file and why is it important?
- A SEPA file is a standardized XML document companies use to submit transfers and direct debits to their bank. Based on ISO 20022 standard and mandatory since February 2014 in Germany, it replaces older national formats. Key types are pain.001 (transfers) and pain.008 (direct debits). Correctly built SEPA files enable automated processing and reduce manual errors.
- What input formats are supported for SEPA files?
- Common formats are Excel and CSV. Excel is flexible but error-prone with formatting. CSV is simpler and more reliable for system transfers. JSON works well for technical integrations and APIs. Older AEB formats and legacy ERP exports can also be converted with proper mapping.
- How many payments can one SEPA file contain?
- A single SEPA file can contain up to 100,000 payment records. This makes SEPA especially valuable for large companies with high payment volumes. The purpose field per payment is limited to maximum 140 characters to maintain scalability.
- What should I check before uploading a SEPA file?
- Before upload verify: 1) All required fields present? 2) IBANs and assignments correct? 3) Purpose text properly formatted? 4) File uses current PAIN version accepted by bank? 5) XML structure technically validated? Person A should prepare, Person B should review and approve before upload.