NACHA files, also called ACH files, are text files that contain payment instructions. The below image is a simple ACH file created with ACH Pro.
It might look a little intimidating but with some practice you can learn to read and modify the contents. To do that, you'll first need to know the basics of ACH files and then we'll dive into specific details about how to build one.
If you want to skip the hassle of creating a file by hand, you can use ACH Pro to create ACH files from Excel, QuickBooks or our APIs.
Contents:
The Basics of the NACHA file format
ACH files are composed of lines called "records". Each record must be exactly 94 characters long and every 10 lines is called a "block" (this will be important later).
An ACH file can contain one or more batches and each batch can contain one or more transactions ("entry details"). The simplest valid ACH file would contain one batch with one transaction.
There are five record types that we'll cover in this guide. You can see each of these record types in the example file which contains one batch with two transactions.
File Header: Contains details that identify the file to the originating bank. The first character on the line must be a "1".
Batch Header: Contains details that identify a batch within a file. A file can contain multiple batches, each will have its own batch header. The first character on the line must be a "5".
Entry Detail: Contains details for a single transaction to a single account. A batch can contain multiple entry detail records. The first character on the line must be a "6".
Batch Control: Closes a batch and contains some validation calculations for the batch. The first character on the line must be an "8".
File Control: Closes a file and contains some validation calculations for the file. The first character on the line must be a "9".
There are some validation fields in the Batch Control and File Control that are calculated using information from the entry details. We'll cover these later in the post but be mindful that they are one of the primary areas in a file that people get wrong.
In our example, you may have noticed that after the file control (first line starting with "9") that there are four lines filled with 9s. These are filler lines that bring the total number of lines to a multiple of 10. Not all ACH systems require this but unless you know what your bank is expecting, you should include them.
In Depth Breakdown
This portion of the guide will cover the creation of an ACH file and the individual fields for each record type.
The scenario we'll follow is a common one; a business is sending payroll to its employees from a single operating account. In this case, there is only one employee but the concepts covered here can be applied to files with multiple employees or files for other purposes like accounts receivable.
We break down each record type below.
File Header
The file header, sometimes called the "1 record" contains details that identify the file to the originating bank. The length of the line must be exactly 94 characters.
Example:
101 026009593 02600959323010100000094101Bank Of America Bank Of America
Record Type: Must be "1".
Priority Code: Must be "01".
Immediate Destination: Must be a space followed by nine numbers, typically the originating bank's routing number.
Immediate Origin: Must be a space followed by nine numbers, typically the originating company's EIN.
File Creation Date: Must be "YYMMDD".
File Creation Time: Must be "HHmm".
File ID Modifier: Typically "1". Can be any digit or capital letter.
Record Size: Must be "094".
Blocking Factor: Must be "10".
Format Code: Must be "1".
Immediate Destination Name: Optional, 23 characters (right-fill with spaces if less than 23 characters). Typically originating bank's name.
Immediate Origin Name: Optional, 23 characters (right-fill with spaces if less than 23 characters). Typically the originating company's name.
Reference Code: Optional, 8 spaces.
Batch Header
The batch header, sometimes called the "5 record" contains details that identify a batch within a file. A file can contain multiple batches, each will have its own batch header.
Example:
5200Jill's Bakery 123456789 PPDPAYROLL 230110 1026009590000001
Record Type: Must be "5"
Service Class Code: Must be either "200", "220" or "225". "200" indicates the batch contains credit and debit entries. "220" indicates credits only. "225" indicates debits only.
Company Name: Must be name of originating company, 16 characters (right-fill with spaces if less than 16 characters).
Company Discretionary Data: Optional, 20 characters (fill with spaces if less than 20 characters).
Company Identification: Typically originating company's EIN, 10 characters (left-fill with spaces if less than 10 characters).
Standard Entry Class Code: "PPD" and "CCD" are most common. Use "PPD" if any entries are going to accounts owned by individuals. Use "CCD" if all entries are going to accounts owned by businesses.
Company Entry Description: Must be description of batch, 10 characters (right-fill with spaces if less than 10 characters).
Company Descriptive Date: Optional, 6 blank spaces.
Effective Entry Date: Must be "YYMMDD" that the entries should be available ("post") to the accounts. This must be a weekday at least one day in the future that isn't a Federal holiday.
Settlement Date: Must be 3 blank spaces.
Originator Status Code: Must be "1".
ODFI Identification: Must be first 8 digits of originating bank routing number.
Batch Number: Must be a sequential 7 digit number that identifies the batch. E.g. the first batch would be "0000001"
Entry Detail
Entry detail records, sometimes called "6 records", contain details for a single transaction to a single account. Batches can and normally does contain multiple entry detail records
Example:
622026009593111 0000152368emp1 Bob Smith 0026009590000001
Record Type: Must be "6".
Transaction Code: Must be 2 digits. This field is calculated based on the type of account and the type of transaction. E.g. A debit to a checking account would be "27"
Account Types: Checking = "2" | Savings = "3" | Loans = "5"
Transaction Types: Credit = "2" | Debit = "7"
RDFI Identification: Must be 9 digit routing number of receiving bank.
Account Number: Must be receiver's account number, 17 characters (right-fill with spaces if less than 17 characters).
Amount: Must be amount of transaction in cents, 10 characters (left-fill with 0s if less than 10 characters). E.g. $1232.65 would be "0000123265".
Unique ID: Optional, 15 characters. You can include a unique identifier for the receiver from your external systems, the receiver typically won't see this.
Receiver Name: Must be receiver's legal name, 22 characters (right-fill with spaces if less than 22 characters).
Discretionary Data: Must be 2 blank spaces.
Addenda Record Indicator: Must be "0" or "1". "0" indicates no addenda record follows this entry, "1" indicates an addenda record does follow this entry. This guide doesn't cover addenda records so you should use "0".
Trace Number: Must be 15 digit number, combination of ODFI identification and sequential number that identifies the entry within a file. E.g. the first entry in a file would be "026009590000001".
Batch Control
The batch control, sometimes called the "8 record", closes a batch and contains validation calculations for the batch.
Example:
82000000020005201918000000152368000000152368123456789 026009590000001
Record Type: Must be "8".
Service Class Code: Must match service class code from batch header.
Entry Count: Must be 6 digit count of all entry and addenda records in batch. E.g. a batch with 2 entries would be "000002".
Entry Hash: Must be 10 digit sum of all entry RDFI identification fields. If the sum is greater than 10 digits, use the 10 rightmost digits. In the example, the hash is "0005201918" = "02600959" + "02600959".
Total Debit Amount: Must be 12 digit sum of all debit entries in cents.
Total Credit Amount: Must be 12 digit sum of all credit entries in cents.
Company Identification: Must match company identification from batch header.
Message Auth Code: Must be 19 blank spaces.
Reserved: Must be 6 blank spaces.
ODFI Identification: Must match ODFI identification from batch header.
Batch Number: Must match batch number from batch header.
File Control
The file control, sometimes called the "9 record", closes a file and contains validation calculations for the file.
Record Type: Must be "9".
Batch Count: Must be 6 digit sum of batches in file. In a file with one batch, count would be "000001".
Block Count: Must be 8 digit sum of blocks in file (a block is 10 lines). In a file with 20 lines (including filler lines), count would be "00000008".
Entry Count: Must be 8 digit sum of entry and addenda lines in file. In a file containing 2 entries, count would be "00000002".
Entry Hash: Must be 10 digit sum of batch entry hashes. If the sum is greater than 10 digits, use the 10 rightmost digits. In a file with one batch, the file entry hash would match the batch control entry hash.
Total Debits: Must be 12 digits sum of all batch debits in cents. In a file with one batch, the file total debits will match the batch control total debits.
Total Credits: Must be 12 digits sum of all batch credits in cents. In a file with one batch, the file total credits will match the batch control total credits.
Reserved: Must be 39 blank spaces.
Filler Lines
After you've created all the records in your ACH file, you will need to determine how many blocks (multiple of 10 lines) are in the file. Pro tip: most text editors display the current line number that the cursor is on. If the number of lines is not a multiple of ten, you will need to add lines filled with "9" to reach a multiple of 10. Remember that every line in an ACH file must be 94 characters long.
Validation
It's highly recommended that you validate any NACHA files that you create by hand (and in our experience, occasionally files created in other software products). Fortunately, we have a free ACH file validator available at https://ach-pro.com/validator. We have a blog post that explains what it can do and how to use it.
Wrap Up
Using the above info, you should be able to construct a variety of ACH files. That being said, this guide only covers a small portion of the options available for ACH files. If you need more information about ACH rules and file formats, NACHA publishes rules and guidelines here. If you want to create ACH files without having to worry about the minutia we covered above, you can use an ACH creation tool like ACH Pro.
ACH Pro offers a full suite of tools to help you manage recipients, companies and banks. It also gives you the ability to create templates and import CSV files so you can easily reuse payment information. And if you need a custom solution or want to integrate it into your existing processes, you can use its full suite of APIs.
Comentários