The number in the first position of each record defines what type of record it is:
1 - File Header
5 - Batch Header
6 - Transactions
7 - Addenda record (optional)
8 - Batch Footer
9 - File Footer
Sample ACH File Format
The file header and footer are marked in yellow:
1 - File Header
9 - File Footer
File Header (1 record) | ||||
Positions | Length | Name | Contents | Description |
1-1 | 1 | Record Type Code | 1 | Constant |
2-3 | 2 | Priority Code | 01 | Constant |
4-13 | 10 | Immediate Destination | bNNNNNNNNNN | Typically your bank's 9 digit ABA Routing number, preceding with a blank space. Determined by your bank. |
14-23 | 10 | Immediate Origin | Numeric | Typically a "1" + your Federal ID number. Determined by your bank. |
24-29 | 6 | File Creation Date | YYMMDD | Must be in YYMMDD format |
30-33 | 4 | File Creation Time | HHMM | Must be in HHMM format (use 24 hour format) |
34-34 | 1 | File ID Modifier | Alphanumeric | Alphanumeric field, upper-case A-Z and 0-9 allowed. Start with A and increment for each file created during the calendar day. |
35-37 | 3 | Record Size | 094 | Constant |
38-39 | 2 | Blocking Factor | 10 | Constant |
40-40 | 1 | Format Code | 1 | Constant |
41-63 | 23 | Immediate Destination Name | Alphanumeric | Enter your bank's name |
64-86 | 23 | Immediate Origin Name |
Alphanumeric | Enter your company's name |
87-94 | 8 | Reference Code | Blank | 8 blank spaces - constant |
File Footer (9 record) | ||||
Positions | Length | Name | Contents | Description |
1-1 | 1 | Record Type Code | 9 | Constant |
2-7 | 6 | Batch Count | Numeric | Number of batches in file |
8-13 | 6 | Block Count | Numeric | Number of blocks in file (10 records = 1 block) |
14-21 | 8 | Entry/Addenda Count | Numeric | Number of detail entry (transactions) and addenda records within the file. |
22-31 | 10 | Entry Hash | Numeric | Sum of the receiving DFI ID (first 8 digits of the other party's ABA routing number) for each entry/transaction within the file. If the sum exceeds 10 places, use the rightmost 10 digits. |
32-43 | 12 | Total Debit Entry Dollar Amount | Numeric | Total debits for the file. No decimal. |
44-55 | 12 | Total Credit Entry Dollar Amount | Numeric | Total credits for the file. No decimal. |
56-94 | 39 | Reserved | Blank | Constant |
Note: Padding record - in gray:
ACH files need to be created in multiples of 10 records. In this sample, there are 9 records including the file header and footer noted in yellow. In this case, we needed to add one additional padding record (99999...) to make the file contain a multiple of 10 records.
Therefore, an ACH may have anywhere from no padding (99999...) records up to 9 records.
Batch Header (5 record) | ||||
Positions | Length | Name | Contents | Description |
1-1 | 1 | Record Type Code | 5 | Constant |
2-4 | 3 | Service Class Code | 200 220 225 |
Represents whether the batch contains: |
5-20 | 16 | Company Name | Alphanumeric | Your company name. |
21-40 | 20 | Company Discretionary Data | Alphanumeric | Optional. May be instructed by your bank. Otherwise (typically), leave blank |
41-50 | 10 | Company Identification | Numeric | Typically a "1" + your Federal ID number. Determined by your bank. Often the same as the Immediate Origin ID in the file header. No hyphen, numbers only. |
51-53 | 3 | Standard Entry Class Code (SEC) | PPD, CCD | 3 letter mnemonic which identifies the batch and its' layout. |
54-63 | 10 | Company Entry Description | Alphanumeric | A description as to the general nature of the transactions to help the other parties identify the purpose. Examples: Payroll, Payables, etc... PRINTED - This value will appear on the other party's bank statement |
64-69 | 6 | Company Descriptive Date | Alphanumeric, often YYMMDD | Optional. Descriptive date - often in YYMMDD with the same value as the effective date. Useful in recurring transaction scenarios, such as payroll. |
70-75 | 6 | Effective Entry Date | YYMMDD | Effective / transaction date. Date the other party is to be debited or credited. |
76-78 | 3 | Reserved | Blank | Julian Settlement Date - left blank. Will be filled in by your bank. |
79-79 | 1 | Originator Status Code | 1 | Constant |
80-87 | 8 | Originating DFI ID | Numeric | Enter the first 8 digits of your ABA routing number |
88-94 | 7 | Batch Number | Numeric | Start with 00000001 and increment by 1 for each batch. |
Batch Footer (8 record) | ||||
Positions | Length | Name | Contents | Description |
1-1 | 1 | Record Type Code | 8 | Constant |
2-4 | 3 | Service Class Code | 200 220 225 |
Represents whether the batch contains: |
5-10 | 6 | Entry/Addenda Count | Numeric | Number of detail entry (transactions) and addenda records within the batch. |
11-20 | 10 | Entry Hash | Numeric | Sum of the receiving DFI ID (first 8 digits of the other party's ABA routing number) for each entry/transaction within the batch. If the sum exceeds 10 places, use the rightmost 10 digits. |
21-32 | 12 | Total Debit Entry Dollar Amount | Numeric | Total debits for the batch. No decimal. |
33-44 | 12 | Total Credit Entry Dollar Amount | Numeric | Total credit for the batch. No decimal. |
45-54 | 10 | Company Identification | Numeric | Typically a "1" + your Federal ID number. Determined by your bank. Must match the entry in the batch header. |
55-73 | 19 | Message Authentication Code | Blank | Blank |
74-79 | 6 | Reserved | Blank | Blank |
80-87 | 8 | Originating DFI ID | Numeric | Enter the first 8 digits of your ABA routing number Must match the entry in the batch header. |
88-94 | 7 | Batch Number | Numeric | Start with 00000001 and increment by 1 for each batch. Must match the entry in the batch header. |
There are three transactions (Entry Detail) records in this sample marked in in yellow:
6 - Transactions (Entry Detail)
Entry Detail / Transaction (6 record) | ||||
Positions | Length | Name | Contents | Description |
1-1 | 1 | Record Type Code | 6 | Constant |
2-3 | 2 | Transaction Code | 22
|
For
credit (ie. payroll, vendor payments)
transactions: |
4-11 | 8 | Receiving DFI ID | Numeric | First 8 digits of the other party's ABA routing number |
12-12 | 1 | Check Digit | Numeric | Last digit of the other party's ABA routing number |
13-29 | 17 | DFI Account Number | Alphanumeric | Other party's account number. Note: This is an alphanumeric field and should be left justified. |
30-39 | 10 | Amount | Numeric | Transaction amount. No decimal. |
40-54 | 15 | Identification Number | Alphanumeric | Optional. Helps the receiver (other party) identify themselves within your system, should they need to contact you. Typically their account number. PRINTED - This value may appear on the other party's bank statement |
55-76 | 22 | Receiving Company Name | Alphanumeric | The other party's company name (in CCD) - or if a consumer transaction (in PPC) such as payroll, the individual's name. |
77-78 | 2 | Discretionary Data | Alphanumeric | Typically blank, unless instructed otherwise by your bank. |
79-79 | 1 | Addenda Record Indicator | 0 or 1 | 0 - No addenda following 1 - Addenda following |
80-94 | 15 | Trace Number | Numeric | The first 8 digits of your Originating DFI number, followed by the entry detail sequence number, |
Addenda Record - optional (7 record) | ||||
Positions | Length | Name | Contents | Description |
1-1 | 1 | Record Type Code | 7 | Constant |
2-3 | 2 | Addenda Type Code | 05 |
Constant. Only valid value for CCD and PPD originations. Other SEC codes can contain other values. |
4-83 | 80 | Payment Related Information | Alphanumeric | Invoice or other remittance information specific to the entry detail / transaction. |
84-87 | 4 | Addenda Sequence Number | 0001 | As PPD and CCD codes only support 1 addenda record, this will always be 0001. |
88-94 | 7 | Entry Detail Sequence Number | Numeric | This 7 digit field contains the last 7 digits of the related (preceding) entry detail / transaction record's trace number. |
Notes:
The screen shots on this page contain text describing fields for PPD and CCD transactions, using common-use terms and descriptions, along with fictitious routing & account numbers and typical use examples/formats.
NACHA field names and rules follow each illustration.
Offset Records - Balanced files
Some banks will require a balanced file - where the debits and credits need to be equal. To do this, you will need to add an offset record to balance the file. Therefore, if the file has $1,000 in debits and $10,00 in credits, you will need to create a debit offset record of $9,000.
Advanced note: The offsets are calculated by effective date. Therefore, if a file has transactions with multiple effective dates, you will need to group and total the transactions by date - and then create multiple offset transactions - one for each effective date.
Pre-note records
Pre-notes are transactions used to confirm the other party's account. They are $0.00 transactions and can be either debits or credits. It is important to enable the user/system to designate whether they want a debit or credit pre-note - as this should be the same logic as the 'live' transactions will be in the future.
For example, if you want to test the bank account of a new client, you will want to debit pre-note. The reason being, if you use a credit pre-note, and the client has a debit block on their account - the credit pre-note will be successful, however the 'live' transaction might fail.
Encryption
Remember to encrypt all account numbers for data at rest.
Batching Rules
An ACH file has one file header and one file footer, and contains at least one batch.
The batches each have a header and footer.
Within each batch are the transactions.
While there can only be one file header and footer, there is no limit to the number of batches or transactions (#1).
Legal Notice
This information is intended to be an abridged guide with commentary - and is not meant as a substitute for the official Nacha ACH Rules and Regulations publication. For an official copy of the ACH Rules and Regulations, please visit https://www.nacha.org/rules
If you are creating ACH files outside of Treasury Software's ACH Universal and need to troubleshoot the file creation process, we recommend that you import the same data into ACH Universal and compare your results.
For rules clarification and explanation, please contact your bank, NACHA or a regional payment association directly.
Footnotes:
1 - There is no limit to the number of transactions, but with certain ACH SEC codes not covered here (ie CTX), there is a limit to 9,999
records.