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.

Xplor Pay integrates with third-party providers such as Paya and DCS to process ACH payments and manage reporting.

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.

Visit Let's Get Started - Xplor Pay and get API access key.

A sandbox URL for testing the integration.

1

Set up the ACH payment form

To set up the the ACH payment form with the Xplor Pay JavaScript SDK:

  1. Add a <div> tag to host the ACH payment form.

<div id="payment-form"></div>
  1. Include the Xplor Pay JavaScript SDK library.

<script src="https://gateway-sb.clearent.net/js-sdk/js/clearent-host.js"></script>
  1. 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.

2

Get a JSON Web Token

To get a JSON Web Token:

  1. 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"
   }
}
3

Process ACH payment

To process the ACH payment:

  1. Use the POST method.

  2. Include the JWT token in the request headers for authentication.

  1. 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?