SEPA Direct Debit File Format: A Complete Practical Guide
2026-04-30
You’re probably dealing with one of these situations right now.
Your finance team exports a neat-looking Excel sheet. The bank rejects the file. Or your ERP produces something “close enough” to SEPA, but not close enough for the bank’s validator. Or you’ve inherited a direct debit process built on CSVs, manual edits, and one person who knows which column has to be fixed before upload.
That’s normal. The SEPA direct debit file format often feels more technical than it should. On the business side, you’ve got customer names, mandate references, collection dates, and amounts. On the bank side, you need a very specific XML structure that follows strict rules. The gap between those two worlds is where most errors happen.
The good news is that the format is learnable once you stop treating it like “mysterious bank code” and start treating it like a structured packing list. Each piece of business data has a place. Each place has rules. If the list is complete and organised properly, the bank accepts the file and processes the collection.
What Is the SEPA Direct Debit File Format?
SEPA stands for the Single Euro Payments Area. In plain terms, it’s a shared framework that lets banks and businesses use common rules for euro payments across participating countries. Instead of each country using its own domestic payment language, SEPA gives everyone a common one.
That common language matters most when you send payment instructions electronically. If one bank describes a direct debit in one format and another bank expects something different, somebody has to translate. That creates delays, errors, and manual work. SEPA fixed that by standardising the message format.
A useful way to think about the SEPA direct debit file format is as a universal shipping label for money. The business decides who should be charged, for how much, and on what date. The file tells the bank all of that in a structure every SEPA-aware bank can understand.

Why the format became non-negotiable
For direct debits, the standard XML message is called pain.008. That’s the rulebook used to describe a batch of collections. It tells the bank who the creditor is, which mandates are being used, which debtors should be debited, and how each transaction should be identified.
In the UK, pain.008.001.02 became mandatory on 1 August 2014, and by 2022 UK SEPA Direct Debit volumes had grown to over 4.5 billion transactions annually, representing 28% of all SEPA payment schemes, with a 12% compound annual growth rate from 2014 to 2022, according to the European Payments Council’s SEPA payment statistics.
That single fact tells you something important. This isn’t a niche banking format. It’s part of a mature, heavily used payment infrastructure.
Practical rule: If your business collects SEPA direct debits, XML isn’t an optional export format. It’s the bank-ready version of your collection instructions.
What makes XML different from a spreadsheet
A spreadsheet is flat. XML is hierarchical.
In Excel, each row looks self-contained. In a SEPA XML file, some information belongs to the full file, some belongs to a batch inside the file, and some belongs to one debtor transaction. That difference is where many finance teams get stuck.
SEPA XML also enforces stricter discipline than a spreadsheet does:
- Dates must be in the expected format
- Identifiers must be unique where required
- Mandatory fields can’t be left blank
- Characters that look harmless in Excel can break XML parsing
That sounds rigid because it is. But the rigidity is useful. It gives banks a standard message they can validate and process consistently, rather than trying to interpret every exporter’s own layout.
Deconstructing the Core SEPA XML Structure
A pain.008 file is easiest to understand if you picture a filing cabinet with three drawers. The top drawer holds information about the whole submission. The middle drawer groups related collections into a payment batch. The bottom drawer contains the individual direct debits.
If you put the right data in the wrong drawer, the bank won’t treat that as a small formatting issue. It may reject the file outright.

Group Header
The Group Header is the envelope around the entire file. It answers basic questions such as: who is sending this message, when was it created, and how should the bank identify it?
Common fields here include:
<MsgId>for the message identification<CreDtTm>or creation date/time information- Initiating party details, such as the creditor organisation name
The easiest mistake to make is assuming this is just descriptive metadata. It isn’t. Banks use these values to identify the file and detect duplicates.
Bank rules can be stricter than finance teams expect. Bank of Ireland requires the file to use the .xml extension, limits filenames to 50 characters, and applies a 35-character limit to fields such as Message Identification. It also rejects problematic characters and duplicate-style identifiers. The bank notes that non-compliant files can trigger immediate failures and lead to 15 to 20% higher operational costs through manual rework for UK SMEs, as set out in its PAIN.008.001.02 file structure guide.
That’s why a file called June DD final FINAL new.xml is a bad habit. A structured filename such as 20250630_DD_BATCH01.xml is far safer if it follows your bank’s rules.
Payment Information
The Payment Information block sits beneath the Group Header. Think of it as one batch within the file. It groups transactions that share the same collection characteristics.
You’ll usually find fields such as:
<PmtInfId>for the payment information identifier<ReqdColltnDt>for the requested collection date- Creditor details
- Scheme and sequence information
This layer matters because banks process direct debits in context. If several transactions are meant to be collected under the same creditor, on the same date, and under the same scheme settings, they belong together here.
A finance manager often asks, “Why can’t the bank just read the date from each row?” Because the XML is designed to group common instructions efficiently and unambiguously. The batch-level structure reduces ambiguity and helps the bank process related transactions consistently.
A good payment batch is boring. It has one clear identity, one collection date, and no mixed-up scheme logic.
Direct Debit Transaction Information
The Direct Debit Transaction Information section holds the individual debtor-level records. This is the row-by-row reality of your collection run.
Typical tags here include:
<EndToEndId>for the transaction reference<InstdAmt>for the amount<MndtId>for the mandate reference- Debtor name and account details
- Remittance or reference information
This is the part that is often recognised because it maps closely to spreadsheet rows. One customer. One amount. One mandate. One debit instruction.
The confusion starts when one spreadsheet column feeds multiple XML locations, or when the same business value has to be unique at different levels. For example, <EndToEndId> is not the same as <MsgId> or <PmtInfId>. They each identify a different thing.
The tags people mix up most often
Here’s the plain-English version:
| XML tag | What it identifies | Business meaning |
|---|---|---|
<MsgId> |
The whole message | The bank’s label for the full submitted file |
<PmtInfId> |
One batch inside the message | A grouped set of collections |
<EndToEndId> |
One transaction | The reference that follows a single debit |
<MndtId> |
The customer mandate | The authority that lets you collect from that debtor |
If you’re reviewing a file and everything seems present but the bank still rejects it, identifier logic is one of the first places to inspect.
Why structure matters more than appearance
An XML file can look tidy on screen and still fail validation. A missing closing tag, a field in the wrong level, or a non-unique identifier can make the bank reject the submission before any payment is attempted.
That’s why teams often move away from hand-editing XML and rely on generators that apply the schema consistently. If you want a practical example of how a generator handles these structural requirements, this pain.008 generator overview shows the kind of workflow many teams use to avoid format-level mistakes.
From Legacy Data to a Valid SEPA XML File
Most finance teams don’t start with XML. They start with a spreadsheet.
A typical file has columns such as Customer Name, IBAN, Amount, Mandate ID, Collection Date, and Invoice Reference. It’s readable, flexible, and easy to export from almost any accounting tool. It’s also the point where many first submissions go wrong.
That gap is visible in practice. A common challenge for UK businesses is converting legacy AEB formats or simple CSV exports into compliant pain.008 files. UK Finance data from 2025 shows an 18% failure rate for first-time B2B direct debit files originating from Excel, often because <MndtId> is missing or sequenced incorrectly, as described in this overview of SEPA payment file format issues.
A simple starting spreadsheet
Here’s a simplified example of what the raw data might look like before conversion:
| Customer Name | IBAN | Amount | Mandate ID | End-to-End Ref | Collection Date | Remittance Info |
|---|---|---|---|---|---|---|
| Greenfield Services Ltd | DE… | 125.00 | MAND-1001 | INV-2025-001 | 2025-07-01 | June service fee |
| Northshore Retail GmbH | FR… | 89.50 | MAND-1002 | INV-2025-002 | 2025-07-01 | June service fee |
| Alpine Trade BV | NL… | 240.00 | MAND-1003 | INV-2025-003 | 2025-07-01 | June service fee |
Nothing looks especially risky here. That’s what makes these errors frustrating. The file can look perfectly organised from a business perspective while still missing XML requirements the bank treats as mandatory.
How spreadsheet columns map to XML
The conversion process is really a mapping exercise. You’re taking familiar business columns and assigning each one to its correct XML field.
| Spreadsheet Column | SEPA XML Tag | Purpose |
|---|---|---|
| Customer Name | <Dbtr><Nm> |
Identifies the debtor |
| IBAN | <DbtrAcct><Id><IBAN> |
Specifies the debtor account |
| Amount | <InstdAmt> |
States the amount to collect |
| Mandate ID | <MndtId> |
Links the debit to the signed mandate |
| End-to-End Ref | <PmtId><EndToEndId> |
Tracks the transaction from sender to receiver |
| Collection Date | <ReqdColltnDt> |
Tells the bank when to attempt collection |
| Remittance Info | <RmtInf><Ustrd> |
Helps with downstream reconciliation |
In this scenario, finance and technical teams often talk past each other. Finance says, “The data is all there.” Tech says, “The structure is wrong.” Both are right.
If a spreadsheet is your working document, mapping is the translation layer. It’s the step that turns business meaning into bank meaning.
What the XML looks like after conversion
Once mapped, the spreadsheet data becomes a structured XML document. You don’t need to memorise every tag, but you do need to understand the shape:
- The file starts with the document root
- Then comes the Group Header
- Then the Payment Information block
- Then each Direct Debit Transaction Information item
A simplified example looks like this:
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02">
<CstmrDrctDbtInitn>
<GrpHdr>
<MsgId>DD20250701BATCH01</MsgId>
<InitgPty>
<Nm>Your Company Ltd</Nm>
</InitgPty>
</GrpHdr>
<PmtInf>
<PmtInfId>PMT20250701</PmtInfId>
<ReqdColltnDt>2025-07-01</ReqdColltnDt>
<DrctDbtTxInf>
<PmtId>
<EndToEndId>INV-2025-001</EndToEndId>
</PmtId>
<InstdAmt Ccy="EUR">125.00</InstdAmt>
<DrctDbtTx>
<MndtRltdInf>
<MndtId>MAND-1001</MndtId>
</MndtRltdInf>
</DrctDbtTx>
<Dbtr>
<Nm>Greenfield Services Ltd</Nm>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN>DE...</IBAN>
</Id>
</DbtrAcct>
<RmtInf>
<Ustrd>June service fee</Ustrd>
</RmtInf>
</DrctDbtTxInf>
</PmtInf>
</CstmrDrctDbtInitn>
</Document>
The actual file will contain more mandatory fields than this simplified example shows. But the important thing is the transformation. One row in the spreadsheet becomes one transaction block in XML, while shared data such as collection date sits higher up in the batch.
Where legacy formats create trouble
AEB files and older bank export formats create a different problem. They may contain most of the right business information, but not in the right naming, sequencing, or hierarchy for pain.008.
That’s why teams moving from older processes often need a conversion layer rather than a simple export button. If your starting point is a spreadsheet or legacy text file, this guide to converting CSV to SEPA XML is useful because it focuses on the actual mapping step rather than assuming you already have bank-ready data.
The hidden checks behind the conversion
A reliable conversion process usually has to do more than rearrange columns. It also needs to check:
- Whether mandate references are present and correctly sequenced
- Whether debtor names include characters that may cause XML issues
- Whether dates are consistently formatted
- Whether identifiers are unique where the bank expects uniqueness
- Whether account details belong in the right XML elements
This is why “copy and paste into a template” rarely scales. It works for one carefully supervised batch. It becomes fragile the moment the source data changes, a colleague uses a different export, or a bank-specific rule gets applied.
Troubleshooting Common SEPA File Rejection Errors
A rejected file usually arrives with a cryptic message, not a useful explanation. The bank might return an error code, mark the batch as failed, or reject only some transactions. Either way, your team has to work backwards from a technical symptom to a business fix.
The best way to approach this is to separate format errors, data errors, and mandate errors. Each one has a different root cause.
AC04 and account detail problems
One of the more useful rejection codes you may see in downstream reporting is AC04, which points to an invalid account. In practical terms, that usually means the account details provided for the debtor can’t be used as submitted.
The fix starts with the source record, not the XML editor.
- Check the debtor account data in the originating system. Don’t only inspect the generated file.
- Confirm the IBAN is complete and current. A valid-looking value copied from an old worksheet can still be wrong for the live mandate.
- Re-run validation before regeneration. If the conversion tool supports account checks, use them before creating a replacement file.
If the same customer appears correctly in your CRM but incorrectly in your bank file, the issue is often a mapping or export problem rather than the customer record itself.
XML structure failures
These are the most frustrating because the data may be correct, but the file still fails. Typical causes include malformed tags, misplaced nodes, invalid characters, or missing required elements.
You won’t solve these by staring at the rendered XML and hoping something jumps out. Use a schema-aware validator or a generation process that already enforces the right hierarchy.
A tidy-looking XML file is not proof of validity. Banks validate structure, field rules, and sometimes submission logic at the same time.
A few clues point to a structure issue:
| Symptom | Likely cause | Best first action |
|---|---|---|
| Whole file rejected immediately | Broken schema or forbidden characters | Validate the XML file before upload |
| Only one batch rejected | Batch-level identifiers or date logic | Review Group Header and Payment Information fields |
| Some transactions rejected | Transaction-level data issue | Inspect mandate, account, and reference fields |
Sequence type confusion
Sequence types create regular confusion, especially when a team changes systems or rebuilds its direct debit process.
If a mandate’s first collection is marked incorrectly, the bank may reject it even though the debtor, amount, and collection date are all correct. The XML can be well formed and still wrong in operational terms.
A safe internal practice is to define sequence ownership clearly:
- Finance owns the business status of the mandate
- The system owns how that status maps into the XML
- Someone checks exceptions before the upload
When those roles are blurred, sequence errors creep in subtly.
Character encoding and “harmless” symbols
This catches teams by surprise because spreadsheets are forgiving. XML is not.
Ampersands, apostrophes, and certain special characters can trigger parsing issues if they aren’t handled correctly. A customer name may look fine in Excel but fail in the bank validator once inserted into XML.
Common culprits include:
- Unescaped ampersands in names or remittance text
- Apostrophes where the bank explicitly disallows them in identifiers
- Copied text from emails or PDFs that brings hidden formatting
The fix is procedural. Clean the source data before generation, especially free-text fields. Don’t rely on manual last-minute edits in the XML file itself.
Mandate mismatches
When banks reject a transaction because the mandate data doesn’t line up, the problem often sits outside the file. The XML may faithfully reflect what your records say, but the underlying mandate details may be incomplete, outdated, or inconsistent.
Look closely at:
- Mandate reference consistency across systems
- Debtor name and account alignment with the mandate record
- Whether a migrated customer record lost a required field during import
If the rejection happens mainly on first submissions after a process change, that’s a strong sign the migration or mapping stage introduced gaps.
The Final Steps Validation and Bank Submission
Generating the file is only half the job. The last mile is where many avoidable failures happen.
A finance team often assumes that if a file can be opened and uploaded, it’s ready. Banks don’t think that way. They run their own validation checks, compare identifiers, inspect file naming, and apply institution-specific rules that sit on top of the core SEPA schema.
A practical pre-submission checklist
Use a short checklist before every upload, even if the process feels routine.
- Validate the XML structure. Check the file against the relevant pain.008 schema so broken tags or missing mandatory elements are caught before the bank sees them.
- Review identifiers for uniqueness. Message IDs and batch identifiers should follow your internal naming discipline and avoid accidental duplicates.
- Check field lengths and characters. A value that fits in Excel may exceed bank limits or contain characters the bank rejects.
- Match business totals to file totals. Confirm the number of transactions and aggregate amounts align with the source remittance list.
- Confirm the collection date and scheme details. These are small fields with large operational consequences.
Checklist mindset: Treat validation like a pre-flight inspection, not an afterthought. It’s cheaper to stop a bad file on your desk than to repair a rejected collection run.
What to expect during submission
Online banking portals differ, but the submission pattern is familiar. You upload the XML file, assign or confirm a batch reference, and wait for the portal to run its first checks. Some banks reject immediately. Others accept the upload and return a status later.
Watch for three things:
- Initial file acceptance
- Batch-level status
- Transaction-level exceptions
If the portal only says “rejected”, go back to the validation layer rather than guessing. If it accepts the file but flags some items later, inspect those transactions individually.
Keep a clean audit trail
Store three versions of every collection run:
| Version | Why keep it |
|---|---|
| Source spreadsheet or export | Shows what finance intended to collect |
| Generated XML file | Shows what was actually submitted |
| Bank response or confirmation | Shows what the bank accepted or rejected |
This isn’t bureaucracy. It’s how you resolve disputes quickly when someone asks whether the issue came from the customer data, the conversion step, or the bank submission.
Automating Your SEPA Workflow for Total Efficiency
Manual SEPA processing works until it doesn’t.
It works when volumes are low, one person knows the quirks, and the source data rarely changes. It starts to break when the business grows, when multiple people prepare collections, or when you need a reliable audit trail without checking every row by hand.

What automation changes in practice
Automation doesn’t just save keystrokes. It changes where errors are caught.
In a manual workflow, people usually detect problems at the end. The bank rejects the file, finance checks the XML, and someone repairs the source spreadsheet. In an automated workflow, the system can catch mapping issues, missing fields, invalid account data, or duplicate identifiers before the file reaches the bank.
That shifts the process from reactive to controlled.
A strong automated setup usually includes:
- Structured source data from ERP, billing, or CRM systems
- A conversion layer that maps business fields into pain.008
- Validation before file generation or submission
- Status feedback from the bank
- Reconciliation back into finance systems
Two automation paths
The first path is no-code or low-code conversion. This suits finance teams that already work in Excel, CSV, JSON, or legacy AEB formats but want a repeatable process with fewer manual edits.
The second path is API-led automation. This suits technical teams that want the ERP or internal platform to generate files directly, enforce field rules upstream, and handle feedback automatically.
Neither path changes the underlying SEPA direct debit file format. They change how consistently you produce it.
Reconciliation is where automation pays off twice
Collection generation gets most of the attention, but reconciliation is where teams often lose time. Legacy statement formats can make matching hard because different banks provide different “flavours” of reporting.
For reconciliation, CAMT.053 XML is superior to legacy MT940, cutting reconciliation time by 40 to 60% for PYMEs and helping achieve over 95% straight-through processing rates in UK SEPA schemes. It also includes granular rejection codes such as AC04 for invalid account, which makes automated exception handling far easier, as outlined in this guide to SEPA direct debit formats and CAMT.053 reporting.
That matters because automation isn’t complete if file generation is smooth but cash application still depends on manual statement reading.
The strongest SEPA workflow isn’t just “create XML faster”. It’s “generate, submit, reconcile, and resolve exceptions without rebuilding the story by hand”.
For teams thinking more broadly about where automation fits in finance operations, this practical guide to AI automation is a useful companion read because it frames process automation as an operational design problem, not just a software feature checklist.
What a mature workflow looks like
A mature SEPA setup usually has these characteristics:
| Workflow stage | Manual habit | Automated alternative |
|---|---|---|
| Data preparation | Export and clean spreadsheets manually | Pull structured records from source systems |
| File generation | Copy into templates or edit XML | Generate pain.008 consistently from mapped fields |
| Validation | Discover errors after bank upload | Catch schema and data issues before submission |
| Status handling | Read portal messages manually | Feed results into system workflows |
| Reconciliation | Match statements by hand | Use standardised XML reporting for automated matching |
A short walkthrough helps make that concrete:
If you’re evaluating how to remove repeated spreadsheet work from collections, this resource on automating SEPA direct debit collection gives a practical view of what that transition can look like.
The main point is simple. The SEPA XML standard is strict by design. You can keep handling that strictness manually, or you can build a workflow that absorbs it reliably every time.
If your team is still converting Excel, CSV, JSON, or legacy AEB files into bank-ready SEPA XML by hand, ConversorSEPA is worth a look. It’s a cloud service built for exactly this job: mapping business data to the required SEPA fields, validating it, and producing valid XML for direct debits and transfers without installation. For technical teams, it also offers a JSON API to automate file generation directly from internal systems.
Frequently Asked Questions
- What is the SEPA direct debit file format?
- The SEPA direct debit file format is a standardised XML structure known as pain.008 used to send batch collection instructions to banks across the Single Euro Payments Area. It organises payment data into a hierarchical structure with a Group Header, Payment Information, and individual transaction details. This format ensures banks across SEPA countries can process direct debit instructions consistently.
- Why does my bank reject my SEPA XML file?
- Banks reject SEPA XML files for several reasons including malformed XML tags, missing mandatory fields, non-unique identifiers, invalid characters, and incorrect sequence types. The most common issues involve duplicate message IDs, unescaped special characters in customer names, and mismatched mandate references. Always validate your XML against the pain.008 schema before uploading to your banking portal.
- How do I convert an Excel spreadsheet to a SEPA XML file?
- Converting a spreadsheet to SEPA XML requires mapping each column to its corresponding XML tag, such as Customer Name to Dbtr/Nm and IBAN to DbtrAcct/Id/IBAN. You also need to add batch-level information like the creditor details and collection date. Using a dedicated conversion tool or generator is recommended to ensure the file follows the correct hierarchical structure and passes bank validation.
- What is the difference between MsgId, PmtInfId, and EndToEndId in SEPA XML?
- MsgId identifies the entire submitted file, PmtInfId identifies a specific payment batch within the file, and EndToEndId identifies an individual transaction. Each serves a different purpose and must be unique at its respective level. Confusing these identifiers is one of the most common causes of file rejection by banks.