Pay By ACH - One Time
This guide walks through creating and capturing a one-time payment by ACH where we don't have a customer record.
Create an ACH Charge
POST
https://testapi.payarc.net/v1/achcharges
Let's assume our customer is John
Hancock
, the owner of a Personal Checking
account with the routing number 129131673
and account number 0114584906
. We will create a one-time ACH debit for $12.01, which will be represented by the amount 1201
.
Parameter | Description |
---|---|
account_number Required | Account Number for the account.
|
routing_number | Nine-digit routing number for the account.
|
first_name | Account holder's first name
|
last_name | Account holder's first name
|
account_type | The type of account
|
sec_code | A Standard Entry Class Code (SEC Code) is a way to classify an ACH payment.
|
type | Type of flow. Must be one of the following:
|
amount | A positive integer in cents representing how much to charge. The minimum value for our test environment is 50, the equivalent of $0.50 USD
|
currency | Three-letter ISO currency code, in lowercase. |
receipt_email | The customer's email address
|
receipt_phone | The customer's phone number
|
addressline1 | The customer's address line 1.
|
zip | The customer's ZIP code, or ZIP+4 code |
customerid | Customer ID created via the Create a Customer API. |
In order to create an ACH transfer, you will need to provide the SEC Code.
Payarc supports the following:
CCD
,PPD
,TEL
,WEB
.
SEC Code
Description
Details
CCD
Corporate Credit or Debit
A single or a recurring ACH credit or debit originated to a corporate account. They are commonly used by Originators to pay vendors, concentrate funds from outlying accounts (cash concentration), to fund payroll, petty cash, or other disbursement accounts.
PPD
Pre-arranged Payment or Deposit
A single or a recurring ACH credit or debit sent by an originator to a consumer account to make or collect a payment, where authorization is obtained in writing.
TEL
Telephone Initiated Entries
A single or a recurring ACH debit that occurs when the consumer’s authorization for a transfer of funds is received orally via the telephone.
WEB
Internet-Initiated/Mobile Entries
Credit WEB Entries: A Person-to-Person entry transmitted on behalf of one natural person to another natural person, or between accounts belonging to the same natural person.
Debit WEB Entries: ACH entry initiated according to an authorization obtained via the internet or a wireless network (e.g. mobile device) except for an oral authorization via a telephone call.
The full list of SEC codes is maintained by NACHA, the government entity that runs the ACH system. For further details, please refer to: https://achdevguide.nacha.org/ach-file-details
var request = require('request');
var options = {
'method': 'POST',
'url': 'http://localapi5.payarc.net/v1/achcharges',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer {{Access-Token-From-Payarc-Dashboard}}'
},
body: '{"account_number":"0114584906","routing_number":"129131673","first_name":"John","last_name":"Hancock","account_type":"Personal Checking","receipt_email":"[email protected]","receipt_phone":"6546456984","address_line1":"103 Mason Street","zip":"10469","currency":"usd","amount":"1201","type":"debit","sec_code":"WEB"}'
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "http://localapi5.payarc.net/v1/achcharges");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer {{Access-Token-From-Payarc-Dashboard}}");
var content = new StringContent("{\"account_number\":\"0114584906\",\"routing_number\":\"129131673\",\"first_name\":\"John\",\"last_name\":\"Hancock\",\"account_type\":\"Personal Checking\",\"receipt_email\":[email protected],\"receipt_phone\":6546456984,\"address_line1\":103 Mason Street,\"zip\":10469,\"currency\":\"usd\",\"amount\":\"1201\",\"type\":\"debit\",\"sec_code\":\"WEB\"}", null, "application/x-www-form-urlencoded");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
We will receive a ACHCharge
, in our case its ID is g9dDE7GDaA527eAa
{
"data": {
"object": "ACHCharge",
"id": "g9dDE7GDaA527eAa",
"amount": "1201",
"created_by": "[email protected]",
"status": "validated",
"type": "debit",
"authorization_id": 123,
"validation_code": "parola",
"successful": true,
"response_message": "Api call is proxied, check your env for locall",
"created_at": "2023-11-22T15:43:55.000000Z",
"updated_at": "2023-11-22T15:44:30.000000Z",
"retried_achcharge_id": null,
"bank_account": {
"data": {
"object": "BankAccount",
"id": "D634EdsD6KLd5ea",
"first_name": "John",
"last_name": "Hancock",
"account_type": "Personal Checking",
"sec_code": "WEB",
"routing_number": "129131673",
"account_number": "****4906"
}
}
},
"meta": {
"include": [],
"custom": []
}
}
Congratulations on creating a one-time ACH Charge!
Updated 11 days ago