Skip to content

Create an ACH FIle

Setup our ACH file

Creating an Automated Clearing House (ACH) file can be done several ways:

Go Client

We have an example of using our Go client and uploading the JSON representation. The basic idea follows this structure:

  1. Create a BatchHeader record with ach.NewBatchHeader().
  2. Create an EntryDetail record with ach.NewEntryDetail().
  3. Create a Batch from our BatchHeader and EntryDetail.
  4. Using a constructor like batch := ach.NewBatchPPD(batchHeader) and adding the batch with batch.AddEntry(entry).
  5. Call and verify batch.Create() returns no error.
  6. Create our ACH File record file := ach.NewFile() and FileHeader with ach.NewFileHeader()
  7. Add the FileHeader (via file.SetHeader(fileHeader)) and Batch records to the file (via file.AddBatch(batch)).
  8. Call and verify file.Create() returns no error.
  9. Encode the File to JSON (via json.NewEncoder(&buf).Encode(&file)) for a net/http request.

Upload a JSON representation

In Ruby we have an example of creating an ACH file from JSON. The JSON structure corresponds to our api endpoint for creating files that the ACH HTTP server expects.

We have example ACH files in JSON.

Note: The header Content-Type: application/json must be set.

Upload a raw ACH file

Our ACH HTTP server also handles uploading raw ACH files which is the NACHA text format. We have example ACH files in their NACHA format.

Note: The header Content-Type: text/plain should be set.