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/charges
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. Format: Numeric, Length 3-17. Example: 0114584906 |
routing_number Required | Nine-digit routing number for the account. Format: Numeric, Length:9 Example: 129131673 |
first_name Required | Account holder's first name Format: AlphaNumeric, Length 2-50 Example: John |
last_name Required | Account holder's first name Format: AlphaNumeric, Length 2-50 Example: Hancock |
account_type Required | The type of account Format: One of the following: Personal Checking , Personal Savings , Business Checking , Business Savings Example: Personal Checking |
sec_code Required | A Standard Entry Class Code (SEC Code) is a way to classify an ACH payment. The value must be one of: ARC , BOC , CCD , POP , PPD , RCK , TEL , WEB .Example: WEB |
type Required | Type of flow. Must be one of the following: debit , credit Format: String Example: debit |
amount Required | 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 Format: Numeric, in cents Example: 9 for $0.091201 for $12.01 |
currency Required | Three-letter ISO currency code, in lowercase. Allowable Value: usd |
receipt_email Optional | The customer's email address Format: String, Length 5-75 Example:[email protected] |
receipt_phone Optional | The customer's phone number Format: Numeric 2-11 digits Example:6546456984 |
addressline1 Optional | The customer's address line 1. Format: Alphanumeric, Length: 5-50 Example: 103 Mason Street |
zip Optional | The customer's ZIP code, or ZIP+4 code Numeric and hyphen, Max length 10 Example: 10469 , 10469-2345 |
customerid Optional | Customer ID created via the Create a Customer API. Format: Alphanumeric Example: DjPnVDNApDDnVpMN |
In order to create an ACH transfer, you will need to provide the SEC Code.
Payarc supports the following:
ARC
,BOC
,CCD
,POP
,PPD
,RCK
,TEL
,WEB
.
SEC Code Description Details ARC Accounts Receivable Entries A single ACH debit used by originator for the conversion of an eligible source document received via the U.S. mail or delivery service; at a lockbox location; or in person at a manned location for the payment of a bill. BOC Back Office Conversion A single ACH debit initiated by an originator based on an eligible source document provided at the point-of-purchase or at a manned bill payment location for subsequent conversion during back office conversion. 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. POP Point of Purchase A single ACH debit initiated by an originator based on an eligible source document provided at a point-of-purchase or manned bill payment location. 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. RCK Re-presented Check Entries Originators can re-present a check that has been processed through the check collection system as a paper or image item, and returned because of insufficient or uncollected funds 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 3 months ago