> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowpayroll.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# BACS and payment files

> Generate the BACS payment file for a completed pay run, fix the employees that fail bank validation, and upload the file to your bank.

When you lock a pay run, Flow Payroll builds a BACS payment file from its payslips. You download that file and upload it to your bank, and your bank makes the payments. There is nothing to assemble by hand.

<Note>
  Your payment format and BACS source account are set once per organisation. Until they are set, no payment file is generated for your pay runs. See [setting up your payment details](#setting-up-your-payment-details).
</Note>

## What the file contains

Each completed pay run has one payment file, identified by its pay schedule, tax year, pay frequency, and period. It holds:

* One credit record per employee being paid, carrying their sort code, account number, account name, net pay, and payment reference.
* The totals your bank reconciles against — the number of records, the number of employees, and the total amount.
* A contra record debiting your own account, in the formats that require one.

Amounts are taken from each employee's net pay on the locked payslip, so the file can only be produced once the period is locked.

Files are named from your organisation, the tax year, and the period — for example `Acme_2026-W25-260515-215906.txt`. The whole name stays within 50 characters, because some banks reject longer ones.

<Note>
  Download links expire. If a link has gone stale, open the pay run again to generate a fresh one.
</Note>

***

## Setting up your payment details

Your payment configuration drives every file Flow Payroll generates for the organisation.

| Setting | What it does |
| - | - |
| Payment format | Which bank layout the file is written in — see [payment file formats](#payment-file-formats) |
| File format | `txt` or `csv`, for the formats that support both |
| Sort code and account number | The account the payments are debited from |
| Account name | Your account name as your bank expects to see it. Written into the originator field of the file |
| Service user number | Your BACS service user number, issued by your bank. Written into the Standard 18 file header |
| Payment reference | An optional expression that builds each payment's reference |

A payment reference can mix static text with tokens — `{payDate}`, `{payPeriodStart}`, `{payPeriodEnd}`, `{year}`, `{period}`, and `{frequency}` — plus separator tokens for spaces, dashes, underscores, and slashes. References are truncated to 18 characters in the file, so keep them short.

***

## Payment file statuses

| Status | What it means |
| - | - |
| Generated | Every employee made it into the file. Download it and upload it to your bank |
| Partial success | A file was produced, but some employees were left out. Fix their details and regenerate, or pay them separately |
| Failed | No file was produced. Every employee needs attention |
| Retrying | A regeneration is in progress |
| Submitted | The file has been marked as sent to your bank |

<Warning>
  On a partial success, the file you download pays only the employees who passed validation. Check the excluded list before you upload it.
</Warning>

***

## When an employee is missing from the file

Every employee's bank details are checked before they go into the file. Anyone who fails is listed against the pay run with the field that caused it.

| Check | Rule |
| - | - |
| Sort code | Exactly six digits, once dashes and spaces are removed |
| Account number | Six to eight digits. Shorter numbers are padded to eight in the file |
| Account name | Must not be blank |
| Amount | Must not exceed £99,999,999.99 |

Account names are cleaned rather than rejected. Accents are stripped, the name is uppercased, anything outside A–Z, 0–9, space, hyphen, slash, ampersand, and full stop is removed, and the result is truncated to 18 characters. A long or accented name never blocks a file.

Correct the details on the employee's profile, then retry the payment file. A retry rebuilds the file with refreshed employee data, so anyone you have fixed is included.

***

## Payment file formats

| Format | File | Layout |
| - | - | - |
| Standard 18 | `.txt` | Fixed-width, 106 characters per record, wrapped in `VOL1`/`HDR`/`UHL1` header and `EOF`/`UTL1` trailer records |
| Barclays | `.txt` or `.csv` | 100-character fixed-width records, or one comma-separated row per payment with no header row |
| NatWest | `.txt` | Bankline bulk import — comma-separated, 85 fields per row, one `08` debit row followed by one `09` credit row per employee |
| Allica Bank | `.csv` | One comma-separated row per payment, under a header row. Sort codes are dash-separated and account names keep their original capitalisation |

<Warning>
  The NatWest file is comma-separated but must keep its `.txt` extension. Bankline rejects the same content saved as `.csv`.
</Warning>

### The Standard 18 record

Each payment record in a Standard 18 file is 106 characters, with fixed positions:

| Position | Contents |
| - | - |
| 1–6 | Employee's sort code |
| 7–14 | Employee's account number |
| 15 | Account type, always `0` |
| 16–17 | Transaction code — `99` for a credit, `17` for the contra record |
| 18–23 | Your sort code |
| 24–31 | Your account number |
| 32–35 | Blank |
| 36–46 | Amount in pence, zero-padded |
| 47–64 | Your account name |
| 65–82 | Payment reference |
| 83–100 | Employee's account name |
| 101–106 | Blank |

The contra record at the end of the payment lines carries your own account on both sides, the total of the file as its amount, and `CONTRA` in place of both account names.

### Templates

These are sample files in each layout, with dummy sort codes, account numbers, and employee names. Flow Payroll generates your real file for you — use these to check a layout against what your bank expects, or to give your bank a sample before your first upload.

<Accordion title="Standard 18 template (BACS_Standard18.txt)">
  Column positions matter in this format. Open it in a plain text editor, never a spreadsheet.

  ```text theme={null}
  VOL1000001                                                                      
  HDR1 123456                00010001       26117                                 
  HDR2                                                                            
  UHL1 26117          00        DAILY                                             
  2000001000000509912345612345678    00000377868                  Salary            OLIVIA TAYLOR           
  2000001000000909912345612345678    00000286444                  Salary            ISLA THOMAS             
  2000001000000809912345612345678    00000286444                  Salary            OLIVER EVANS            
  2000001000000109912345612345678    00000286444                  Salary            SARAH SMITH             
  2000001000001009912345612345678    00000286444                  Salary            HARRY ROBERTS           
  2000001000000609912345612345678    00000286444                  Salary            JAMES DAVIES            
  2000001000000309912345612345678    00000286444                  Salary            EMMA WILLIAMS           
  2000001000000409912345612345678    00000286444                  Salary            NOAH BROWN              
  2000001000000709912345612345678    00000286444                  Salary            AVA WILSON              
  2000001000000209912345612345678    00000286444                  Salary            LIAM JONES              
  1234561234567801712345612345678    00002955864CONTRA            CONTRA            Salary                  
  EOF1 123456                00010001       26117                                 
  EOF2                                                                            
  UTL10000002955864000000295586400000010000010                                    
  ```

  <a className="template-download" href="data:text/plain;base64,Vk9MMTAwMDAwMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKSERSMSAxMjM0NTYgICAgICAgICAgICAgICAgMDAwMTAwMDEgICAgICAgMjYxMTcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKSERSMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKVUhMMSAyNjExNyAgICAgICAgICAwMCAgICAgICAgREFJTFkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKMjAwMDAwMTAwMDAwMDUwOTkxMjM0NTYxMjM0NTY3OCAgICAwMDAwMDM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2MTIzNDU2NzggICAgMDAwMDAyODY0NDQgICAgICAgICAgICAgICAgICBTYWxhcnkgICAgICAgICAgICBBVkEgV0lMU09OICAgICAgICAgICAgICAKMjAwMDAwMTAwMDAwMDIwOTkxMjM0NTYxMjM0NTY3OCAgICAwMDAwMDI4NjQ0NCAgICAgICAgICAgICAgICAgIFNhbGFyeSAgICAgICAgICAgIExJQU0gSk9ORVMgICAgICAgICAgICAgIAoxMjM0NTYxMjM0NTY3ODAxNzEyMzQ1NjEyMzQ1Njc4ICAgIDAwMDAyOTU1ODY0Q09OVFJBICAgICAgICAgICAgQ09OVFJBICAgICAgICAgICAgU2FsYXJ5ICAgICAgICAgICAgICAgICAgCkVPRjEgMTIzNDU2ICAgICAgICAgICAgICAgIDAwMDEwMDAxICAgICAgIDI2MTE3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCkVPRjIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgClVUTDEwMDAwMDAyOTU1ODY0MDAwMDAwMjk1NTg2NDAwMDAwMDEwMDAwMDEwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCg==" download="BACS_Standard18.txt">Download BACS\_Standard18.txt</a>
</Accordion>

<Accordion title="Barclays template (BACS_Barclays.csv)">
  One row per payment: sort code, account name, account number, amount, reference, then the transaction code. There is no header row.

  ```csv theme={null}
  200000,HARRY ROBERTS,10000010,2716.48,Salary,99
  ```

  <a className="template-download" href="data:text/csv;base64,MjAwMDAwLEhBUlJZIFJPQkVSVFMsMTAwMDAwMTAsMjcxNi40OCxTYWxhcnksOTkNCg==" download="BACS_Barclays.csv">Download BACS\_Barclays.csv</a>
</Accordion>

<Accordion title="NatWest template (BACS_Natwest.txt)">
  Every row has 85 comma-separated fields, most of them empty. The `08` row names the account being debited; each `09` row is one employee's payment.

  ```text theme={null}
  ,,,08,,,,,JASPER RECRUITMENT,,,,12345612345678,,,,,,25092026,,,,,,,,,,,,,,,,,,25092026,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  ,,,09,,,,,,,,,,,,GBP,1964.84,,,,,,,,200000,,,,,,10000006,,JAMES DAVIES,,,,SALARY,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  ```

  <a className="template-download" href="data:text/plain;base64,LCwsMDgsLCwsLEpBU1BFUiBSRUNSVUlUTUVOVCwsLCwxMjM0NTYxMjM0NTY3OCwsLCwsLDI1MDkyMDI2LCwsLCwsLCwsLCwsLCwsLCwsMjUwOTIwMjYsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwNCiwsLDA5LCwsLCwsLCwsLCwsR0JQLDE5NjQuODQsLCwsLCwsLDIwMDAwMCwsLCwsLDEwMDAwMDA2LCxKQU1FUyBEQVZJRVMsLCwsU0FMQVJZLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsDQo=" download="BACS_Natwest.txt">Download BACS\_Natwest.txt</a>
</Accordion>

<Accordion title="Allica Bank template (BACS_Allica Bank.csv)">
  The only format with a header row. Sort codes are written with dashes, and names are not uppercased.

  ```csv theme={null}
  Name,Account Type,Reference,Sort Code,Account no,Amount
  Emma Williams,Personal,Salary,20-00-00,10000003,2864.44
  Olivia Taylor,Personal,Salary,20-00-00,10000005,2864.44
  Noah Brown,Personal,Salary,20-00-00,10000004,2864.44
  Ava Wilson,Personal,Salary,20-00-00,10000007,2864.44
  Oliver Evans,Personal,Salary,20-00-00,10000008,2864.44
  James Davies,Personal,Salary,20-00-00,10000006,2864.44
  Isla Thomas,Personal,Salary,20-00-00,10000009,2864.44
  Harry Roberts,Personal,Salary,20-00-00,10000010,2864.44
  Liam Jones,Personal,Salary,20-00-00,10000002,2864.44
  Sarah Smith,Personal,Salary,20-00-00,10000001,2864.44
  ```

  <a className="template-download" href="data:text/csv;base64,TmFtZSxBY2NvdW50IFR5cGUsUmVmZXJlbmNlLFNvcnQgQ29kZSxBY2NvdW50IG5vLEFtb3VudA0KRW1tYSBXaWxsaWFtcyxQZXJzb25hbCxTYWxhcnksMjAtMDAtMDAsMTAwMDAwMDMsMjg2NC40NA0KT2xpdmlhIFRheWxvcixQZXJzb25hbCxTYWxhcnksMjAtMDAtMDAsMTAwMDAwMDUsMjg2NC40NA0KTm9haCBCcm93bixQZXJzb25hbCxTYWxhcnksMjAtMDAtMDAsMTAwMDAwMDQsMjg2NC40NA0KQXZhIFdpbHNvbixQZXJzb25hbCxTYWxhcnksMjAtMDAtMDAsMTAwMDAwMDcsMjg2NC40NA0KT2xpdmVyIEV2YW5zLFBlcnNvbmFsLFNhbGFyeSwyMC0wMC0wMCwxMDAwMDAwOCwyODY0LjQ0DQpKYW1lcyBEYXZpZXMsUGVyc29uYWwsU2FsYXJ5LDIwLTAwLTAwLDEwMDAwMDA2LDI4NjQuNDQNCklzbGEgVGhvbWFzLFBlcnNvbmFsLFNhbGFyeSwyMC0wMC0wMCwxMDAwMDAwOSwyODY0LjQ0DQpIYXJyeSBSb2JlcnRzLFBlcnNvbmFsLFNhbGFyeSwyMC0wMC0wMCwxMDAwMDAxMCwyODY0LjQ0DQpMaWFtIEpvbmVzLFBlcnNvbmFsLFNhbGFyeSwyMC0wMC0wMCwxMDAwMDAwMiwyODY0LjQ0DQpTYXJhaCBTbWl0aCxQZXJzb25hbCxTYWxhcnksMjAtMDAtMDAsMTAwMDAwMDEsMjg2NC40NA0K" download="BACS_Allica Bank.csv">Download BACS\_Allica Bank.csv</a>
</Accordion>

***

## Uploading the file to your bank

Download the file and upload it through your bank's bulk payment channel — Bankline for NatWest, Barclays.Net or iPortal for Barclays, or your BACS bureau's own submission service. Your bank validates the file again on its side and reports the total it is about to pay, so check that total against the pay run summary before you approve it.

<Tip>
  Keep the file for your records. Together with the payslips and the payroll journal, it evidences what you paid and when.
</Tip>

***

## Where to go next

<CardGroup cols={2}>
  <Card title="Running a pay run" icon="money-check-dollar" href="/guides/pay-runs/running-a-pay-run">
    Take a period from open to locked and reported.
  </Card>

  <Card title="Payslips" icon="file-invoice" href="/guides/pay-runs/payslips">
    Preview, download, and send payslips to your employees.
  </Card>

  <Card title="Payroll journals" icon="book" href="/guides/pay-runs/payroll-journals">
    Post payroll costs to your accounting system.
  </Card>

  <Card title="Payment API" icon="code" href="/api-reference/payment/overview">
    Generate and fetch payment files programmatically.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.