This demo calls 3 functions:
SendTransactions()
: Creates a sample ACH file with transactions to sendChargeBackTransactions()
: Creates a sample ACH file with a chargebackReadACH()
: Reads an ACH file
To read this code start with cmd/main.go
and then follow the functions at pkg/transactions.go
and pkg/read-ach.go
.
make build
or
go build cmd/main.go
In the base of the repository path:
bin/ach-demo
- Example sends a mixed credits and debits entries.
- Only one batch is sent, can be organized into multiples for different companies or dates
- In this examples, only Prearranged Payment and Deposit transaction types are sent
For the manipulation of ACH files, https://github.com/moov-io/ach was used. It is Apache-2.0 licensed and doesn't call any third party service.