ACH Transactions
The ACH Transactions solution lets you accept direct debit and credit payments securely through the Automated Clearing House (ACH) network.
Prerequisites
To process ACH transactions, ensure you have following:
✅ Integrated JavaScript SDK.
✅ API access key issued to you by Xplor Pay.
✅ A sandbox URL for testing the integration.
Set up ACH payment form
To set up the the ACH payment form using the Add payment form:
Add a
<div>tag to host the ACH payment form.
<div id="payment-form"></div>Include the JavaScript SDK library.
<script src="https://gateway-int.clearent.net/js-sdk/js/clearent-host.js"></script>Initialize the SDK with your sandbox base URL and public key.
<script type="text/javascript">
ClearentSDK.init({
"baseUrl": "https://gateway-int.clearent.net",
"pk": "YOUR_PUBLIC_KEY"
});
</script>The ACH payment form appears on your webpage with fields for bank account number, routing number, and account type.
Get JSON Web Token
To get a JSON Web Token:
Add the
getPaymentToken()method to your site to receive a success response.
ClearentSDK.getPaymentToken().then(
(result) => {
console.log("ACH Token Success");
console.log(result);
},
(error) => {
console.log("ACH Token Error");
console.log(error);
}
);The response includes a jwt field with the tokenized ACH payment authorization.
{
"code": "200",
"status": "success",
"exchange-id": "ID-clearent-mobile-jwt-1-c32bfe39-d454-4e34-8b4f-94d850643e48",
"payload": {
"mobile-jwt": {
"jwt": "eyJhbGciOi23UzIh4iJ9...",
"last-four": "6789"
},
"payloadType": "mobile-jwt"
}
}Process ACH payment
To process the ACH payment:
Use the POST method.
Include the
mobile-jwttoken in the request headers for authentication.
Send a transaction request to the ACH Transaction endpoint with required fields.
The success response returns the ACH transaction status as Pending, Approved, or Failed in the status field.
Last updated
Was this helpful?

