The ACH Commerce CGI Gateway (ACHGate) is a HTTP 1.1 Common Gateway Interface application for ACH Commerce developed by HTS. It’s purpose is to provide an online internet gateway for uploading ACH Commerce transactions and to provide several checks on the data to ensure validity including a Thompson Financial database check and others.
| Field Name | Type / Format | Description |
|---|---|---|
| usermode | alphanumeric | Describes the user mode for the software to run |
| action | alphanumeric | Describes the action the software is to perform |
| replymode | alphanumeric | Describes the format that the software will return |
| login | alphanumeric | User Login ID |
| password | alphanumeric | User Password |
| merchantid | alphanumeric(10) | Merchant ID of the customer. ACH Customer Origin ID. |
| batchid | alphanumeric(10) | Sub Merchant ID or the customer. ACH Commerce Batch ID |
| verstr | alphanumeric | Verification string. Determines what checks will be performed for the check transaction. |
| routing | numeric(9) | Routing/Transit ID of a check transaction. Captured from the MICR line. |
| account | numeric(17) | Check Writers account number. Captured from the MICR line. |
| fname | alphanumeric | Check writers first name. |
| minit | alphanumeric | Check writers middle initial. |
| lname | alphanumeric | Check writers last name |
| individualid | alphanumeric(15) | Unique identifier for the chck transaction. Possible the check number scanned from the MICR line. |
| checknum | numeric | Check number scanned from the MICR line. |
| amount | numeric | Amount of the check transaction. |
| trancode | numeric | Check transaction code. Defaults to 27 |
| sec | alphanumeric | Standard Entry Class Code. Defaults to PPD |
| eedate | YYMMDD | Effective Entry Date. Defaults to today’s date. |
| description | alphanumeric | Check transaction description. |
| paymentid | alphanumeric | Optional Payment ticket ID |
| paymentname | alphanumeric | Optional Payment ticket name. |
| paymentdate | YYMMDD | Optional Payment ticket date. |
| paymentdesc | alphanumeric | Optional Payment ticket description. |
| Field | Code | Description |
|---|---|---|
| usermode | wwwbrowser | Displays a sample web browser form for input. |
| cgi | Data is being sent as separate CGI parameters. DEFAULT. | |
| xml | Data is being sent as an XML document (Disabled) | |
| csv | Data is being passed as a CSV |
| Field | Code | Description |
|---|---|---|
| action | submit | Submits a check transaction for verification |
| Field | Code | Description |
|---|---|---|
| verstr | R | Routing number check indicator |
| T | Thompson database check indicator | |
| S | Store check to database | |
| E | Equifax check (disabled) | |
| A | Account mash check (disabled) |
Note: These fields are concatenated into one string to include more than one in each request. For example to perform a routing number check – R, a Thompson check - T and a check store – S all in the same request you would pass the string RTS.
| Field | Code | Description |
|---|---|---|
| replymode | csv | Returns a | delimited response |
| html | Returns an html response (default) | |
| xml | Returns an XML response (disabled) |
To use this gateway you will need to have access to either a web browser or some form of HTTP client such as the excellent LWP Perl modules. Sample code using the LWP Perl modules will be included in your API documentation. The LWP Perl sample code shows you how to make a basic request to the test server.
For windows users, you will need to purchase a COM library that can do HTTP or you will need to access the wininet.dll API directly. There is no sample code available for this at this time. If you require such sample code please give us a call and we will try to help.
To connect to the gateway you will need to access the following URL. The recommended way to access this gateway is using an HTTP Post request. HTTP Get requests should work fine but may be eliminated in the future so please do not use them for anything other than testing. The following web based example uses an HTTP request because it is easier to show you the functionality this way. This method should not be used for production code. We cannot provide support for people who choose to use the HTTP Get method to connect to the gateway.
Sample Routing Check Request with bad routing number:
Sample Routing Check Request with good routing number:
Sample Web Browser Form:
http://www.checkserv.com/achgate/achgate.cgi?usermode=wwwbrowser
# Create a user agent object
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->agent("AgentName/0.1 " . $ua->agent);
# Create a request
my $req = new HTTP::Request POST => 'http://www.checkserv.com/achgate/achgate.cgi';
$req->content_type('application/x-www-form-urlencoded');
$req->content('usermode=cgi&action=submit&verstr=R&login=demo&password=test&merchantid=1234567890&batchid=1234567890&routing=123456789');
# Pass request to the user agent and get a response back
my $res = $ua->request($req);
# Check the outcome of the response
if ($res->is_success) {
print $res->content;
} else {
print "Bad luck this time\n";
}
-------------
File
Formats
See ACH Rule Book for technical specifications.
Software to structure an ACH file can be provided.
A file contains individual records of information that contain all the information necessary to insure proper routing of transactions and settlement to the company creating the file. Records are separated by a carriage return.
Each record contains individual fields. These fields contain information needed to insure proper routing and timing of transactions as well as settlement to the company creating the transactions.
In a comma delimited or text file, fields are separated by a comma. Because commas are used to separate fields, commas must not be used within a field.
Each field is limited to a maximum number of characters. Although each field is assigned a maximum number of characters, some fields may contain a fewer number of characters than the maximum allowed. In order for the file to be processed successfully, the fields must be placed in the order below and must adhere to the format requirements. A brief explanation and example for each field is included in the comments section.
Field Name |
Field Length |
Format |
Comments |
|
Origin ID |
10 |
Numeric |
1+Tax ID of company creating the file by default; or the ID assigned to you by ACH Commerce. |
|
Origin Name |
23 |
Alphanumeric |
Name of company creating file. |
|
Batch ID |
10 |
Alphanumeric |
This field must uniquely identify the company responsible for the transactions within a batch. Examples: A store number, merchant number, or tax id number |
|
Batch Name |
16 |
Alphanumeric |
Name of company responsible for transactions within the batch. |
|
SEC |
3 |
Alphanumeric |
PPD=Prearranged Payment & Deposit CCD=Corporate Consolidated Deposit Contact ACH Commerce if your transactions do not fit one of these categories. |
|
Description |
10 |
Alphanumeric |
Examples: PAYROLL, DUES, FEES |
|
EE Date |
6 |
YYMMDD |
Date the transaction is intended to post to the individual or company account. |
|
Individual ID |
15 |
Alphanumeric |
This field must uniquely identify the individual or company being debited or credited. |
|
Name |
22 |
Alphanumeric |
Name of individual or company being debited or credited. No embedded commas. |
|
Routing# |
9 |
Numeric |
Routing/ABA number of the individual or company bank. |
|
Account# |
17 |
Alphanumeric |
The account number at the individual or company bank that is to be debited or credited. |
|
Trancode |
2 |
Numeric |
27 Debit to Checking 37 Debit to Savings 22 Credit to Checking 32 Credit to Savings |
|
Amount |
11 |
Numeric |
Amount may include only 2 decimal places. |
|
Optional |
20 |
Alphanumeric |
This field may be used for the company responsible for each batch at their discretion. |
|
Optional |
2 |
Alphanumeric |
This field is a discretionary field available to attach information to an individual transaction within a batch. The company responsible for creating the batch may use this field at their discretion. |
Example of a file with two records:
1621812909,ACH
Commerce,1621812909,ACH Commerce,PPD,Dues,000728,407086177,Debbie
Hickok,064208518,200001238,27,100.00,,
1621812909,ACH Commerce,1621812909,ACH Commerce,PPD,Dues,000728,407086188,Amy Hickok,064208518,200001238,27,200.00,,