# Bacs Direct Debit collection file The Bacs Direct Debit payment instruction is a Standard 18 file used to communicate payment collection instructions through the Bacs Service. FinDock uses this file format for native direct debit processing with [Bacs Manual](/docs/payment-processors/configuring-bacs-manual). ## Bacs Direct Debit collection file structure The Standard 18 format defines a fixed-width file structure with the following records: * VOL - defines the file and the originator; 80 characters * HDR1 - identifies the file, e.g. sequency number, creation date, etc.; 80 characters * HDR2 - indicates if the file includes a single processing day or multiple processing days; 80 characters * UHL1 - includes designated Bacs processing day and other general data points; 80 characters * Standard Record(s) - each Standard Record line represents a debit to collect; 106 characters * Contra Record(s) - each Contra Record line represents a credit to pay; ; 106 characters * EOF1 - End of file indicator for HDR1; 80 characters * EOF2 - End of file indicator for HDR2; 80 characters * UTL1 - sum totals for amounts and number of records included in file; 80 characters ## Bacs Direct Debit collection file field mapping The following table outlines how Salesforce data is mapped to Bacs Direct Debit payment instructions. Please note the mappings cover the most common data points and is not an exhaustive mapping of all possible variables. ### VOL Record mapping | No. | Length | Position | Contents | Mapping | | --- | --- | --- | --- | --- | | 1 | 3 | 1-3 | Label identifier | N/A, always `VOL` | | 2 | 1 | 4 | Label identifier | N/A, always `1` | | 3 | 6 | 5-10 | Serial number | Day of year the file was generated (DDD) + running number of files generated for the payment schedule target | | 4 | 1 | 11 | Accessibility indicator | N/A | | 5 | 20 | 12-31 | Reserved field | N/A | | 6 | 6 | 32-37 | Reserved field | N/A | | 7 | 14 | 38-51 | Owner Id | Service User Number from target on payment schedule | | 8 | 28 | 52-79 | Reserved field | N/A | | 9 | 1 | 80 | Label standard level | N/A, always `1` | ### HDR1 Record mapping | No. | Length | Position | Contents | Mapping | | --- | --- | --- | --- | --- | | 1 | 3 | 1-3 | Label identifier | N/A, always `HDR` | | 2 | 1 | 4 | Label identifier | N/A, always `1` | | 3 | 17 | 5-21 | File identifier | Same as VOL serial number | | 4 | 6 | 22-27 | Accessibility indicator | N/A | | 5 | 4 | 28-31 | File section number | N/A, always `0001` | | 6 | 4 | 32-35 | File sequence number | N/A, always `0001` | | 7 | 4 | 36-39 | Generation number | N/A | | 8 | 2 | 40-41 | Generation version number | N/A | | 9 | 6 | 42-47 | Creation date | Date the file was generated (YYDDD) | | 10 | 6 | 48-53 | Expiration date | UHL1 processing day +1 | | 11 | 1 | 54 | Accessibility indicator | N/A | | 12 | 6 | 55-60 | Block count | N/A | | 13 | 13 | 61-73 | System code | N/A | | 14 | 7 | 74-80 | Reserved field | N/A | ### HDR2 Record mapping | No. | Length | Position | Contents | Mapping | | --- | --- | --- | --- | --- | | 1 | 3 | 1-3 | Label identifier | N/A, always `HDR` | | 2 | 1 | 4 | Label identifier | N/A, always `2` | | 3 | 1 | 5 | Record format | N/A, always `F` | | 4 | 5 | 6-10 | Block length | N/A, always `02000` | | 5 | 5 | 11-15 | Record length | N/A, `00100` (single processing day) | | 6 | 35 | 16-50 | Reserved for operating systems | N/A | | 7 | 2 | 51-52 | Buffer offset | N/A | | 8 | 28 | 53-80 | Reserved field | N/A | ### UHL1 Record mapping | No. | Length | Position | Contents | Mapping | | --- | --- | --- | --- | --- | | 1 | 3 | 1-3 | Label identifier | N/A, always `UHL` | | 2 | 1 | 4 | Label identifier | N/A, always `1` | | 3 | 6 | 5-10 | Bacs processing day | Processing date from payment schedule (YYDDD) | | 4 | 10 | 11-20 | Identifying number of receiving party | N/A, always `999999 ` | | 5 | 2 | 21-22 | Currency code | N/A, always `00` | | 6 | 6 | 23-28 | Country code | N/A | | 7 | 9 | 29-37 | Work code | N/A, `1 DAILY ` (single processing day) | | 8 | 3 | 38-40 | File number | Running number of generated files for target on payment schedule | | 9 | 7 | 41-47 | Reserved field | N/A | | 10 | 7 | 48-54 | Audit print identifier | N/A | | 11 | 26 | 55-80 | For use by service user or bureau | N/A | ### Standard Record mapping | No. | Length | Position | Contents | Mapping | | --- | --- | --- | --- | --- | | 1 | 6 | 1-6 | Destination sort code number | Sort code from mandate linked to installment | | 2 | 8 | 7-14 | Destination account number | Bank account from mandate linked to installment | | 3 | 1 | 15 | Destination type of account | N/A | | 4 | 2 | 16-17 | Transaction code | See [installment status and transaction codes](/docs/payment-processors/using-bacs-manual#installment-status-and-transaction-codes) | | 5 | 6 | 18-23 | Originating sort code | Sort code of target on payment schedule | | 6 | 8 | 24-31 | Originating account number | Bank account of target on payment schedule | | 7 | 4 | 32-35 | Free format | N/A | | 8 | 11 | 36-46 | Amount | Amount of installment in pence | | 9 | 18 | 47-64 | User's name | Company name from target on payment schedule | | 10 | 18 | 65-82 | User's reference | Mandate Id from installment | | 11 | 18 | 83-100 | Destination account name | Account holder name from installment | | 12 | 6 | 101-106 | Bacs processing day of data | N/A | ### Contra Record mapping | No. | Length | Position | Contents | Mapping | | --- | --- | --- | --- | --- | | 1 | 6 | 1-6 | Originating sort code number | Sort code of target on payment schedule | | 2 | 8 | 7-14 | Originating account number | Bank account of target on payment schedule | | 3 | 1 | 15 | Type of user's account | N/A | | 4 | 2 | 16-17 | Transaction code | N/A, always `99` (credit) | | 5 | 6 | 18-23 | Originating sort code | Sort code of target on payment schedule | | 6 | 8 | 24-31 | Originating account number | Bank account of target on payment schedule | | 7 | 4 | 32-35 | Free format | N/A | | 8 | 11 | 36-46 | Amount | Amount of installment in pence | | 9 | 18 | 47-64 | Narrative of user's choice | Payment schedule record name + Processing date (YYYYMMDD) | | 10 | 18 | 65-82 | Contra reference | N/A, always `CONTRA ` | | 11 | 18 | 83-100 | Abbreviated account name of user's nominated account | Company name of target on payment schedule | | 12 | 6 | 101-106 | Bacs processing day of data | N/A | ### EOF1 Record mapping | No. | Length | Position | Contents | Mapping | | --- | --- | --- | --- | --- | | 1 | 3 | 1-3 | Label identifier | N/A, always `EOF` | | 2 | 1 | 4 | Label identifier | N/A, always `1` | | 3-11 | 50 | 5-54 | Same as HDR1 | HDR1 positions 5-54 | | 12 | 6 | 55-60 | Block count | N/A | | 13-14 | 20 | 61-80 | Same as HDR1 | HDR1 positions 61-80 | ### EOF2 Record mapping | No. | Length | Position | Contents | Mapping | | --- | --- | --- | --- | --- | | 1 | 3 | 1-3 | Label identifier | N/A, always `EOF` | | 2 | 1 | 4 | Label identifier | N/A, always `2` | | 3-8 | 76 | 5-80 | Same as HDR2 | HDR2 positions 5-80 | ### UTL1 Record mapping | No. | Length | Position | Contents | Mapping | | --- | --- | --- | --- | --- | | 1 | 3 | 1-3 | Label identifier | N/A, always `UTL` | | 2 | 1 | 4 | Label identifier | N/A, always `1` | | 3 | 13 | 5-17 | Monetary total of debit records | N/A, calculated during file generation | | 4 | 13 | 18-30 | Monetary total of credit records | N/A, calculated during file generation | | 5 | 7 | 31-37 | Count of debit records | N/A, calculated during file generation | | 6 | 7 | 38-44 | Count of credit records | N/A, always `1` | | 7 | 10 | 45-54 | Reserved for future standardization | N/A | | 8 | 28 | 55-80 | For use by service user or bureau | N/A |