• This repository has been archived on 27/Aug/2022
  • Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 7 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A RESTful API enabling electronic payments to be submitted and received without a deep understanding payment file specification

moov-io/paygate

Project Status

We have designed and released achgateway for orchestrating ACH uploads in real production scenarios. Please read over our guide to achgateway and give us feedback on the design or your experience! We have also realized that KYC/KYB, data modeling, workflows, and risk analysis are difficult to open-source. We are interested in hearing how you have solved these problems internally and want to develop something in the open. Thank you to everyone who has contributed and helped us grow.


GoDoc Build Status Coverage Status Go Report Card Apache 2 licensed

Moov Paygate is a RESTful HTTP API enabling Automated Clearing House (ACH) transactions and returns to be processed with an Originating Depository Financial Institution (ODFI) without a deep understanding of a full NACHA file specification.

If you believe you have identified a security vulnerability please responsibly report the issue as via email to [email protected]. Please do not post it to a public issue tracker.

Docs: Project | API Endpoints | Admin API Endpoints

This project is sponsored by Moov Financial, Inc which offers commercial support, hosting, and additional features. Refer to our Moov's payout documentation for more information.

Getting Started

We publish a public Docker image moov/paygate from Docker Hub or use this repository. No configuration is required to serve on :8083 and metrics at :9093/metrics in Prometheus format. We also have docker images for OpenShift.

Start PayGate and its dependencies:

docker-compose up

Create an example Transfer

go run examples/getting-started/main.go
Created source customer 1b1747b770bc471a478a9ae22d99973e956199aa
Customer status is verified
Created source customer account 164213fa5901431dffa324fbf16e10210fe3f6da
Approved source account
===========
Created destination customer 81393acbf9b45abc164c51689aa095528affc8e1
Customer status is verified
Created destination customer account 2a1969745050c7ccd9b2d9ba4abaf49c07c4d42e
Approved destination account
===========
{
  "transferID": "dd4dfea8ea5fe52d46d9749fc84ad6695d3d2a05",
  "amount": {
    "currency": "USD",
    "value": 125,
  },
  "source": {
    "customerID": "1b1747b770bc471a478a9ae22d99973e956199aa",
    "accountID": "164213fa5901431dffa324fbf16e10210fe3f6da"
  },
  "destination": {
    "customerID": "81393acbf9b45abc164c51689aa095528affc8e1",
    "accountID": "2a1969745050c7ccd9b2d9ba4abaf49c07c4d42e"
  },
  "description": "test transfer",
  "status": "processed",
  "sameDay": false,
  "returnCode": {
    "code": "",
    "reason": "",
    "description": ""
  },
  "created": "2020-07-10T16:59:19.6422361Z"
}
Success! A Transfer was created.

An ACH file was uploaded to a test FTP server at ./testdata/ftp-server/outbound/
total 8
-rw-r--r--  1 adam  staff  950 Jul 10 09:59 20200710-071000301.ach

View all uploaded files with achcli from moov-io/ach.

achcli ./testdata/ftp-server/outbound/*.ach
Uploaded ACH file
Describing ACH file './testdata/ftp-server/outbound/20200710-071000301.ach'

  Origin     OriginName    Destination  DestinationName  FileCreationDate  FileCreationTime
  221475786  Teachers FCU  071000301    FRBATLANTA       200710            1259

  BatchNumber  SECCode  ServiceClassCode  CompanyName  DiscretionaryData  Identification  EntryDescription  DescriptiveDate
  1            PPD      200               John Doe                        MOOVO3S6TA      test trans        200710

    TransactionCode  RDFIIdentification  AccountNumber      Amount  Name                    TraceNumber      Category
    32               10200101            654321             125     Jane Doe                221475784797987

    TransactionCode  RDFIIdentification  AccountNumber      Amount  Name                    TraceNumber      Category
    27               22147578            123456             125     John Doe                221475784797988

  BatchCount  BlockCount  EntryAddendaCount  TotalDebitAmount  TotalCreditAmount
  1           1           2                  125               125

Micro-Deposits

Micro Deposits are used to validate a customer can access an account at another Financial Institution. Typically they are two deposits under $0.50 and a balancing withdraw. The customer supplies both deposited amounts as verification.

Start PayGate and its dependencies:

docker-compose up

Setup the micro-deposit account to originate from.

go run examples/micro-deposits-setup/main.go
Created micro-deposit source customer df7a3f35038be2b3e332625e94b58b66fed703b8
Customer status is verified
Created customer account 460026b50830443a77253a0e6c7ca1bebae8a731
Approved micro-deposit source account
===========
In ./examples/config.yaml replace the 'validation:' YAML block with:
validation:
  microDeposits:
    source:
      customerID: "df7a3f35038be2b3e332625e94b58b66fed703b8"
      accountID: "460026b50830443a77253a0e6c7ca1bebae8a731"
===========

Restart PayGate with 'docker-compose up' and run go run /examples/micro-deposits/main.go

After updating PayGate's config and restarting (docker-compose restart)

go run examples/micro-deposits/main.go
Created customer 2774a3f7a5eef61dd6e2a18ac5d939dd35099161 to approve
Customer status is verified
Created destination customer account bd2b81017ecf791cdb3e722eebbe675ae67357d9
Initiating micro-deposits...
Initiated micro-deposits for destination account
Found micro-deposits: [
  {
    "currency": "USD",
    "value": 21
  },
  {
    "currency": "USD",
    "value": 2
  },
]
Customer accounts: [
  {
    "accountID": "bd2b81017ecf791cdb3e722eebbe675ae67357d9",
    "maskedAccountNumber": "**4321",
    "routingNumber": "102001017",
    "status": "validated",
    "type": "Checking"
  }
]
Success! The account was validated with micro-deposits

An ACH file was uploaded to a test FTP server at ./testdata/ftp-server/outbound/
total 8
-rw-r--r--  1 adam  staff  1900 Jul 10 10:17 20200710-071000301.ach

View all uploaded files with achcli from moov-io/ach.

achcli ./testdata/ftp-server/outbound/*.ach
Uploaded ACH file
Describing ACH file './testdata/ftp-server/outbound/20200710-071000301.ach'

  Origin     OriginName    Destination  DestinationName  FileCreationDate  FileCreationTime
  221475786  Teachers FCU  071000301    FRBATLANTA       200710            1315

  BatchNumber  SECCode  ServiceClassCode  CompanyName     DiscretionaryData  Identification  EntryDescription  DescriptiveDate
  1            PPD      220               Micro Deposits                     MOOVO3S6TA      validation        200710

    TransactionCode  RDFIIdentification  AccountNumber      Amount  Name                    TraceNumber      Category
    22               10200101            654321             15      Jane Doe                221475787457191

  BatchNumber  SECCode  ServiceClassCode  CompanyName     DiscretionaryData  Identification  EntryDescription  DescriptiveDate
  2            PPD      220               Micro Deposits                     MOOVO3S6TA      validation        200710

    TransactionCode  RDFIIdentification  AccountNumber      Amount  Name                    TraceNumber      Category
    22               10200101            654321             25      Jane Doe                221475783240158

  BatchNumber  SECCode  ServiceClassCode  CompanyName  DiscretionaryData  Identification  EntryDescription  DescriptiveDate
  3            PPD      225               Jane Doe                        MOOVO3S6TA      validation        200710

    TransactionCode  RDFIIdentification  AccountNumber      Amount  Name                    TraceNumber      Category
    27               10200101            654321             40      Jane Doe                221475781875397

  BatchCount  BlockCount  EntryAddendaCount  TotalDebitAmount  TotalCreditAmount
  3           2           3                  40                40

Next Steps

Read over our PayGate documentation for configuration files, api and admin endpoints, ACH details and more information.

Getting Help

channel info
Project Documentation Our project documentation available online.
Twitter @moov You can follow Moov.io's Twitter feed to get updates on our project(s). You can also tweet us questions or just share blogs or stories.
GitHub Issue If you are able to reproduce a problem please open a GitHub Issue under the specific project that caused the error.
moov-io slack Join our slack channel (#paygate) to have an interactive discussion about the development of the project.

Supported and Tested Platforms

  • 64-bit Linux (Ubuntu, Debian), macOS, and Windows

Contributing

Yes please! Please review our Contributing guide and Code of Conduct to get started! Checkout our issues for first time contributors for something to help out with.

Paygate includes several "long" tests which spawn Docker containers, make requests over the internet, and perform more complicated tests. To skip these long tests add the -short flag to go test.

This project uses Go Modules and uses Go 1.14 or higher. See Golang's install instructions for help setting up Go. You can download the source code and we offer tagged and released versions as well. We highly recommend you use a tagged release for production.

Further Reading

Test Coverage

Improving test coverage is a good candidate for new contributors while also allowing the project to move more quickly by reducing regressions issues that might not be caught before a release is pushed out to our users. One great way to improve coverage is by adding edge cases and different inputs to functions (or contributing and running fuzzers).

Tests can run processes (like sqlite databases), but should only do so locally.

Each PR should increase the overall coverage, if possible. You can run make cover-test to save a coverage profile and make cover-web to open the HTML view in your default browser.

License

Apache License 2.0 See LICENSE for details.

Google Cloud Run Button

Run on Google Cloud

More Repositories

1

ach

ACH implements a reader, writer, and validator for Automated Clearing House (ACH) files. The HTTP server is available in a Docker image and the Go package is available.
Go
451
star
2

iso8583

A golang implementation to marshal and unmarshal iso8583 message.
Go
330
star
3

watchman

AML/CTF/KYC/OFAC Search of global watchlist and sanctions
Go
330
star
4

awesome-fintech

A curated collection of open source fintech libraries and resources.
139
star
5

metro2

Open Source Metro 2 consumer credit history report for credit report file creation and validation
Go
95
star
6

fed

Fuzzy FedACH and FedWire ABA Routing Number and Bank Name Lookup.
Go
88
star
7

wire

FedWire funds service file parser and writer. The HTTP server is available in a Docker image and the Go package is available.
Go
81
star
8

customers

Customer registry supporting Know Your Customer (KYC), Customer Identification Program (CIP), and OFAC checks
Go
67
star
9

terms-dictionary

Simple definitions of terms, acronyms, abbreviations, companies, and projects related to financial services and Moov.
63
star
10

imagecashletter

X9’s Specifications for ICL (Image Cash Letter) to provide Check 21 services. The HTTP server is available in a Docker image and the Go package is available.
Go
63
star
11

iso20022

Enabling ISO 20022 standards in the Go programming language
Go
60
star
12

signedxml

pure go library for processing signed XML documents
Go
52
star
13

achgateway

Payment gateway enabling automated ACH operations in a distributed and fault tolerant way.
Go
52
star
14

rtp20022

ISO20022 messages in Go for Real Time Payments (RTP)
Go
51
star
15

accounts

accounts - General Ledger and financial account service with an HTTP API
Go
48
star
16

go-sftp

A Go client for performing common SFTP operations
Go
43
star
17

iso8583-connection

πŸ“‘ Go-powered ISO8583 connection handler offering advanced binary framing, message interleaving, and a robust connection pool for load distribution and seamless reconnections.
Go
42
star
18

irs

Internal Revenue Service (IRS) Filing Information Returns Electronically (FIRE)
Go
42
star
19

infra

Random tools used by Moov
Shell
24
star
20

fincen

Fincen BSA E-Filing forms
Go
19
star
21

cryptfs

Implementation of io/fs.FS that transparently encrypts and decrypts files
Go
17
star
22

base

core libraries used in Moov projects
Go
17
star
23

ach-node-sdk

Generated Typescript SDK for the moov-io/ach service
TypeScript
16
star
24

bai2

BAI2 file format is a cash management balance reporting standard
Go
15
star
25

ruby-ach-demo

Automated Clearing House (ACH) demo in ruby
Ruby
14
star
26

ach-test-harness

Programmatic and configurable ACH scenario testing of returns, NOC/corrections, reconciliation, etc.
Go
14
star
27

ach-node-example

TypeScript
13
star
28

ach-web-viewer

Web interface for viewing ACH files in a variety of sources (filesystem, GCS buckets, etc)
Go
9
star
29

fintech-devcon-agenda

The official Fintech DevCon 2021 schedule
9
star
30

compliance

Open Source templates for polices, procedures, and narratives.
Shell
7
star
31

1120x

XSLT
6
star
32

pinblock

Personal Identification Number (PIN) management and security in financial services.
Go
6
star
33

bankcron

CLI wrapper to only run commands on banking days
Go
6
star
34

cadeft

Canadian Payments Association CPA-005 Layout - 1464 byte file
Go
6
star
35

x12

[WIP] ASC X12 standards reader/writer
Go
5
star
36

charts

Kubernetes Helm Charts for the Moov ecosystem
Mustache
4
star
37

fintech-FAQs

A place to ask and answer common questions about building a fintech offering
3
star
38

iso4217

πŸ’° Golang package providing ISO 4217 currency data and validation, facilitating efficient currency lookup via alpha and numeric codes.
Go
3
star
39

dukpt

ANSI X9.24 DUKPT libraries and tools
Go
3
star
40

check-imaging

Python
2
star
41

moov-slack-code-of-conduct

The code of conduct for participating in the Moov slack community
2
star
42

fips-state-codes

Go
2
star
43

go-ftp

A Go client for performing common FTP operations
Go
2
star
44

bertlv

A Go Package for Parsing and Building BER-TLV Data Structures
Go
1
star
45

homebrew-comply-fork

Homebrew tap for Comply
Ruby
1
star