RefMatch · Guide
Xero batch payment file rejected by your bank The usual causes, and how to fix each one before anyone approves the run
A UK bank portal rejects a Xero batch payment file when the file does not match the portal's own import format. Xero builds bank-specific files only for HSBC UK and Santander UK; every other bank gets a generic BACS file that you may have to edit. Below are the causes that Xero users report most often and that banks' import guides warn about, what each one can look like, and the fix.
Guide
The short answer
A Xero batch payment file is usually rejected for one of five reasons: the portal expects a different layout, a total or line count is missing, a reference or name contains characters the portal does not accept, a reference is too long, or the file has two lines to the same account. Xero's UK help page says that for banks other than HSBC UK and Santander UK it creates a BACS file and that “you might need to change formatting” to meet your bank's requirements. If the rejection started suddenly with a file that used to work, the bank has probably changed its specification: Santander Connect users report exactly that.
Which cause is behind the rejection?
Only the Santander message below is quoted from users; error texts differ from portal to portal, so the middle column describes what each cause can look like.
| Cause | What it can look like | Fix |
|---|---|---|
| Generic BACS layout, portal expects its own | File type not recognised, or columns mapped to the wrong fields | Use your portal's import template, or ask your bank which format it accepts |
| Missing total or line count | On Santander Connect: “Invalid Record Total information” | Add the batch total and the number of payment lines to the trailer record |
| Special characters | A line or the whole file is rejected | Keep names and references to capital letters, digits, spaces and . - / |
| Reference too long | Reference cut short, or the line is rejected | Keep the beneficiary reference within 18 characters |
| Two lines to the same account | Duplicate payment warning or rejection, depending on the portal | Check your portal's rule; some accept it if the references differ |
Why does Santander Connect reject the Xero file with “Invalid Record Total information”?
Santander Connect rejects the Xero file with “Invalid Record Total information” because the trailer record that Xero exports has no total and no line count. A user on Xero Product Ideas reported in November 2024 that the trailer of the “Santander Connect BACS payments” export reads PAYMENT,TRAILER,,. Filling in the two empty fields with the batch total and the number of payment lines, as in PAYMENT,TRAILER,214.60,1, made the import work for them.
A second change followed. In January 2026 a user on the same thread reported that Santander made a mandatory change to its bulk import specification, effective 12 January, and that the “Santander Connect Standard bulk payments” export no longer imports without manual edits: removing the empty line at the end of the file, and adding the debit account reference on the first line. A comment from October 2026 describes the same errors on a first bulk payment after moving to Santander.
The idea, export file in a Santander-compatible format, had 17 votes and the status “submitted” when we checked (6 November 2026). These fixes come from users, not from Xero or Santander, and we have not tested them on a live Santander Connect account. Check them against Santander's current import specification before you rely on them.
What if your bank is not HSBC UK or Santander UK?
For NatWest Bankline, Barclays iPortal, Lloyds Commercial Banking Online, Metro Bank and every other UK bank, Xero exports a generic BACS file. Whether your portal accepts it depends on the portal:
- NatWest, RBS and Ulster Bankline publish a CSV import file guide, so the expected layout can be checked field by field.
- Barclays iPortal and Lloyds Commercial Banking Online do not publish their import formats openly. The import template is usually agreed with your bank, and the Xero file has to match it.
- Small-business online banking often has no file import at all. Xero's help page asks you to check with your bank first: “Not all banks support batch payments.”
Before you edit anything, also check two settings on the Xero side. Xero asks for a Service User Number (SUN) or Owner ID in your organisation's financial settings for BACS payments, or 000000 if you do not have one, and it warns that special characters in the bills you pay can cause errors.
Can you fix the file by hand?
You can fix a rejected file by hand, and most of the workarounds on Xero Product Ideas do exactly that. The risks are the same every time:
- Totals and counts must match the lines. If you remove, split or change a payment line, update the total and the line count in the header or trailer too, or the file is rejected again.
- Spreadsheets change the file. Opening a CSV in Excel can drop leading zeros from sort codes and account numbers, or change the date format. Edit it in a plain text editor.
- Every run needs the same edit. A manual fix has to be repeated on each export, by whoever runs payments that week. Users on the Santander thread describe it as extra time and extra risk on a process that used to be quick.
- Test without paying. Several portals let you import a file and check it before anyone authorises it. NatWest Bankline, for example, lets you cancel an imported file; Barclays iPortal has a trial import for some file types.
If the rejection is about two lines to the same supplier, the cause is different: Xero merges bills to the same supplier into one line on purpose. Our guide on why Xero merges bills to one supplier explains the options.
How RefMatch does it
We build RefMatch, so read this part with that in mind. RefMatch is a read-only Xero app that builds your bank file with one line and one reference per invoice, in your bank portal's import format. The file carries the totals and line counts that format expects. You upload it and approve it in your own bank, as you do today.
For Bankline and Santander Connect we build the file to the bank's published import guide. For portals whose format is not public, such as iPortal and Commercial Banking Online, we build it with you. No RefMatch file has been accepted by a live bank portal yet. We call a portal supported only after a pilot customer's bank accepts our file.
- We build your first file from a real Xero batch, for your bank portal.
- You test-upload it without authorising any payment. Nothing is paid unless you choose to.
- If your bank accepts it, you can carry on at £29 per Xero organisation per month, locked for 12 months. If it does not, you pay nothing.
What we checked, and what we did not
- Checked on 6 November 2026: Xero's UK help page on paying multiple bills (bank-specific formats, generic BACS file, SUN, special characters); the Santander thread on Xero Product Ideas (votes, status, the reported error and fixes, comment dates).
- Checked earlier from the banks' published import guides: reference length and allowed characters for NatWest Bankline, Santander Connect, HSBCnet and Metro; the option to cancel an imported file on Bankline.
- Not tested: the Santander trailer and January 2026 fixes on a live Santander Connect account, and the exact error text of portals other than Santander Connect. We have not yet uploaded a RefMatch file to a live bank portal; the founding pilot is how we test it, portal by portal, without authorising payments.