Quick Start
This page helps you quickly set up and process ACH credit and direct debit payments using Xplor Pay JavaScript SDK.
About Xplor Pay ACH Transactions
The Xplor Pay ACH Transactions lets you accept direct debit and credit payments securely through the Automated Clearing House (ACH) network.
You can process ACH transactions using one of the following integration methods:
Prerequisites
To leverage Xplor Pay ACH Transactions, ensure the following prerequisites are met:
✅ Access to the Xplor Pay JavaScript SDK.
✅ API access key issued to you by Xplor Pay.
✅ A sandbox URL for testing the integration.
Set up the ACH payment form
To set up the the ACH payment form with the Xplor Pay JavaScript SDK:
Add a
<div>tag to host the ACH payment form.
<div id="payment-form"></div>Include the Xplor Pay JavaScript SDK library.
<script src="https://gateway-sb.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-sb.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 a 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 JWT token in the request headers for authentication.
See the jwt field in the successful response from the JavaScript SDK.
Send a transaction request to the ACH Transactions API 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?

