Skip to content

Black Fridayup to −40%

Black FridayEnds in

Your first year, 40% cheaper

Open your account and send your first Verifactu invoice today.

The discount applies automatically when you choose your plan.

or
Continue with Google
Verifactu

in every invoice.

Find out more
Back to Guides
Guide

How to generate a SEPA batch in XML for your bank, step by step

Group your payments received or payments made into an ISO 20022 XML file, validate it before sending it and understand what marking the batch as processed does to your invoices.

Updated 15 November 2026 · 12 min read

Content generated with AI and reviewed by the Fube team. How we create our content

SEPA batchISO 20022direct debitbank transfertreasury
How to generate a SEPA batch in XML for your bank, step by step

How to generate a SEPA batch XML file for your bank step by step

When you have to collect twenty fees or pay a dozen supplier invoices, the tedious part isn't deciding the amounts: it's keying in transaction after transaction in your online banking, with the risk of mistyping an IBAN and having the bank return it. The alternative is to group everything into a SEPA batch: a single file that brings together many payments received or many payments made, and that you upload in one go.

Important from the outset: Fube generates and validates the file, but it doesn't send it to the bank for you. You download the XML, upload it to your online banking and then mark the batch as submitted in Fube. Fube isn't connected to your bank to send batches or order payments.

Before you start

The SEPA module isn't included in Starter or Pro. It comes with the Business and Elite plans. If in Treasury you see a card introducing the module instead of the list, it's a question of plan: check it on the pricing page.

And for the batch to go through first time, have whatever its type requires sorted:

  • Your company's bank account set up in Fube: the account where you'll receive payments, or from which you'll pay. It's managed in bank accounts.
  • To collect by direct debit, two things. One, an active SEPA mandate for each customer. And two, the one that's always forgotten: the creditor identifier filled in on that bank account. It's an optional field when setting up the account — it appears as Creditor identifier — but without it, validation of any direct debit batch fails outright, with the message ‘The company must have a creditor identifier for direct debit batches’. Fill it in before putting anything together.
  • To pay by bank transfer you don't need a mandate or a creditor identifier: you initiate the payment yourself. The IBAN for each payment comes from the supplier's bank account, on their record, so each supplier must have theirs set up.
  • Be clear about what you're going to include: each batch carries a single type of transaction. Either payments received or payments made.

Step 1 — Decide the batch type

The first split determines everything else: direct debits to collect, transfers to pay.

  • A direct debit batch is used to collect from your customers by charging the amount to their account. It generates a pain.008 file and requires a signed mandate from each customer.
  • A transfer batch is used to pay suppliers from your account. It generates a pain.001 file and doesn't need a mandate.

Step 2 — Create the batch

In Treasury › Direct debits › Batches, create a new one and fill in its details:

  • Reference: a unique identifier for the batch, of up to 35 characters. It travels in the XML file, so it's best to make it recognisable: the month and the batch number, for example.
  • Batch type: direct debit (payments received) or transfer (payments made).
  • Execution date: the date on which the bank will process the batch. It can't be earlier than today.
  • Your company's bank account. The field changes name depending on the type: for transfers it's called Originator account — the one you pay from — and for direct debits Creditor account — where you'll receive the payments —.

Once created, the batch is in Draft: while it stays that way, you can add and remove transactions.

Step 3 — Add the transactions (and respect the three batch rules)

With the batch in draft, click Add transactions. Fube offers you the transactions in draft and not assigned to a batch that match the batch type; you create them beforehand, each in its own section:

  • In a direct debit batch, each transaction is a direct debit, which can have the invoice it collects linked to it.
  • In a transfer batch, each transaction is a transfer, which can have the expense it pays linked to it.

Grouping many transactions into one file is precisely the point, but there are three rules that validation applies and that you should know before putting the batch together, not afterwards:

  1. Types aren't mixed. A collection batch doesn't accept transfers, and vice versa.
  2. A direct debit batch doesn't mix schemes. Either all CORE, or all B2B.
  3. A direct debit batch doesn't mix collection types. Not one FRST with several RCUR, nor any other combination.

The third is the one that bites hardest, because the case that triggers it is the most normal thing in the world: in the month you add new customers you have a couple of FRST and twenty RCUR. That's two batches, not one.

Step 4 — Validate the batch

Before generating anything, run Validate batch. Fube checks the whole batch and tells you what doesn't add up before the bank returns it to you. Among other things, it checks:

  • That there's at least one transaction, and that all of them have their mandatory details.
  • That the IBANs and BICs are valid.
  • That the mandates are active and have an IBAN and signature date, for direct debits.
  • That the source account is configured and, for direct debits, has a creditor identifier.
  • That the amounts are greater than zero.
  • That schemes and collection types aren't mixed.
  • That the bank account linked to each mandate still belongs to its customer. If an account was reassigned to another customer after the mandate was signed, the batch is blocked: it's the last reversible point before money moves with the wrong link.

As well as errors, validation can return non-blocking warnings: the most common is a payment or execution date that has already passed, because the bank will normally move it to the next working day.

Fixing things here is much cheaper than doing so after the bank rejects the file.

Step 5 — Export the XML (it downloads in the same action)

Once the batch is ready, click Export XML. Two things worth knowing:

  • It validates first on its own. If something doesn't add up, it won't export: it shows you the validation result instead. So in practice the previous step is optional, although it's still more convenient to validate while you're making corrections.
  • Exporting and downloading are the same action. Fube generates the file, changes the batch to Exported and downloads it straight away. If the download fails for whatever reason, the batch is already exported: don't repeat the export; use Download XML from its record.

The format depends on the type: pain.008.001.02 for direct debits and pain.001.001.03 for transfers, the European standard ones. Before your first batch, check in your online banking that it accepts them and where to upload them.

And here something happens that you can't see: when you export, the invoices linked to the direct debits change to ‘SEPA payment in progress’. It stops being your draft and becomes money in transit.

Step 6 — Upload the file to your online banking

Upload the XML to your bank's online banking. This part is done outside Fube: each bank has its own section for uploading batch files, usually under ‘Files’, ‘SEPA batches’ or ‘File import’.

Step 7 — Mark the batch as submitted and processed

The last stretch looks like follow-up paperwork and it isn't: these two marks change the payment status of your documents.

  • Once you've uploaded the file, click Mark as submitted. The batch changes to Submitted to bank.
  • When the bank confirms the transactions, click Mark as processed. The batch changes to Processed, all its transactions become Confirmed and the linked invoices are marked as Paid.

In short, what each step does to your documents:

What you doWhat happens to the linked invoice
Export XMLChanges to SEPA payment in progress
Mark as submittedNothing; only the batch status changes
Mark as processedChanges to Paid
Cancel an exported batchReturns to the status it would have without the batch: pending, overdue or partially paid

In a transfer batch the same happens to the linked expenses: exporting puts them in the batch, and marking it as processed leaves them paid, with the payment recorded. A transfer with no linked expense doesn't affect any document: you pay that expense yourself with Record payment.

So: mark it as ‘processed’ when the bank actually confirms, not when you upload the file. You're recording the money as received in your accounts.

What you can do in each status

ActionAvailable inWhat it's for
Add transactionsDraftAdds available transactions to the batch
Remove transactionsDraftReturns transactions to draft
Validate batchDraftChecks IBAN, mandates, amounts and account
Export XMLDraftGenerates the file and downloads it
Download XMLExported or laterDownloads the generated file again
Mark as submittedExportedRecords that you've sent the XML to the bank
Mark as processedSubmitted to bankConfirms the transactions and marks the linked invoices and expenses as paid
Cancel batchDraft or ExportedCancels it and releases its transactions

The Partial status appears in the list, but nothing assigns it: Fube isn't connected to your online banking. Rejected is set by the returns file when the bank rejects the entire batch; the question below explains it.

Cancelling a batch doesn't withdraw it from the bank

This deserves its own section, because it's the only way to collect payment twice without realising.

Cancelling is available in Draft and Exported, and it does three things: it returns the transactions to draft so you can redo the batch, it records that the batch wasn't submitted, and it deletes the XML file —from storage too, because it contains your customers' IBANs—.

What it does not do is withdraw anything from your bank. And here's the catch: Exported doesn't mean ‘not delivered’. The file reaches the bank when you upload it, which is right after exporting it, and marking it as ‘submitted’ is later paperwork that many people skip. If you cancel in Fube a batch that you've already uploaded to your online banking and redo it, you're collecting payment twice. Before cancelling an exported batch, make sure you didn't upload the file.

Edge cases and common errors

  • Validation complains about the creditor identifier. It's not about the direct debits: it's about your bank account. Fill in the Creditor identifier field in its record and validate again.
  • Validation says you're mixing schemes or collection types. Split the batch into two batches: one per scheme, and within each, one per collection type.
  • I want to collect a payment and the customer has no mandate. That's not possible. First create the mandate, signed by the customer.
  • I mixed incoming and outgoing payments. That's not allowed: two batches, each with its own file.
  • The batch says it's exported and the file doesn't appear. Open it from its record, which is where the full batch is loaded; the download usually works from there.
  • The bank returns a payment to me. Fube doesn't find out on its own. Download the batch's returns file from your online banking —the pain.002— and upload it in Direct debits with Import returns: it marks as returned the direct debits the bank rejects, with their reason. For a single one, use Mark as returned in the direct debit's menu. Both remove the payment from the invoice and leave it Returned; the batch doesn't change status. It's explained step by step in collect an invoice by direct debit.
  • Reconciling what has actually come in or gone out. Once the batch is processed, the transactions appear on your statement. To match them with invoices and expenses, use bank reconciliation.

Frequently asked questions

Does Fube send the batch to the bank for me?

No. Fube generates and validates the XML file; you download it and upload it to your bank's online banking. Then you mark the batch as submitted, and as processed when the bank confirms.

What file does it generate and will my bank accept it?

XML in the European ISO 20022 standard: pain.008.001.02 for direct debit batches and pain.001.001.03 for transfer batches, the European standard ones. Your online banking will tell you whether your bank accepts them and where to upload them.

How many transactions fit in a batch?

Fube doesn't impose a limit, but your bank may have one —number of transactions or maximum amount per file—. Check with your bank.

Can I modify a batch after generating the file?

While it's Exported you can cancel it, redo the transactions and create another one, with the warning above: if you've already uploaded the file to the bank, redoing it duplicates the transactions. Once marked as submitted, it can't be modified.

What do I do if the bank rejects the entire batch?

Upload the file your bank gives you in Import returns. If the bank rejects the whole batch, without details for each direct debit, Fube shows you which batch it is and the bank's reason, and when you confirm, it moves the batch to Rejected and makes its direct debits available again for another batch, with their invoices no longer ‘in batch’. None of them is marked as returned: a rejection like this arrives before anything has been collected. Check the reason —format, incorrect IBAN, unregistered mandates—, correct the details in Fube and generate a new batch with those direct debits. The batch must have been exported or submitted to the bank; otherwise, the file will not affect it.

Generate your first batch

Grouping your payments or your outgoing payments into a single file saves you keying in each transaction one by one and, with the prior validation, prevents a good share of returns caused by incorrect details. Make sure your creditor identifier is set up, separate batches by scheme and collection type, and mark them as ‘processed’ only when the bank confirms.

If you don't have an account yet, create one and check pricing to see which plan includes the SEPA module; you'll find full details of the module in Treasury SEPA. Remember: Fube generates the file; sending it to the bank is up to you.

Do it in Fube, not by hand

Invoices, expenses and taxes with Verifactu, in minutes.

Start for free

No card needed · Verifactu included

The tax news that affects you, in your inbox.

Product news, invoicing guides and the tax changes that really matter. No spam, just what's important.

Protected by reCAPTCHA. Google's Privacy Policy and Terms apply.

Invoicing done right, finally without nasty surprises.

Create your free account and issue your first Verifactu-compliant invoice in a matter of minutes. The record is sent to the AEAT automatically, built in.

No credit cardVerifactu includedInvoices with QR code and fingerprintHelp in Spanish