# Bacs Direct Debit Instruction The Bacs Direct Debit Instruction (DDI) is a Standard 18 file used to register and update mandates through the Bacs Automated Direct Debit Instruction Service (AUDDIS). FinDock uses this file format for native direct debit processing with [Bacs Manual](/docs/payment-processors/configuring-bacs-manual). ## Bacs Direct Debit Instruction 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 * 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 Instruction 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 mandate 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 mandate 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 mandate 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 | | 2 | 8 | 7-14 | Destination account number | Bank account from mandate | | 3 | 1 | 15 | Destination type of account | N/A | | 4 | 2 | 16-17 | Transaction code | `0N` (new, mandate status Pending registration), `0C` (cancel, mandate status Pending cancellation) | | 5 | 6 | 18-23 | Originating sort code | Sort code of target on mandate schedule | | 6 | 8 | 24-31 | Originating account number | Bank account of target on mandate schedule | | 7 | 4 | 32-35 | Free format | N/A | | 8 | 11 | 36-46 | Amount | N/A, zero filled | | 9 | 18 | 47-64 | User's name | Company name from target on mandate schedule | | 10 | 18 | 65-82 | User's reference | Mandate Id from mandate | | 11 | 18 | 83-100 | Destination account name | Account holder name from mandate | | 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, zero filled | | 4 | 13 | 18-30 | Monetary total of credit records | N/A, zero filled | | 5 | 7 | 31-37 | Count of debit records | N/A, zero filled | | 6 | 7 | 38-44 | Count of credit records | N/A, zero filled | | 7 | 8 | 45-52 | Reserved for future standardization | N/A | | 8 | 7 | 53-59 | DDI count | N/A, count of Standard Records in file | | 9 | 21 | 60-80 | For use by service user or bureau | N/A |