JavaScript SDK

This page provides an overview of Xplor Pay’s JavaScript SDK solution and explains how it enables merchants and integrators to securely accept web-based payments integration.

About JavaScript SDK

The Xplor Pay’s JavaScript SDK enables merchants to securely accept payments directly on their websites using a hosted payment form. It embeds a PCI-compliant payment iframe into the merchant’s checkout experience, allowing customers to enter payment details without exposing sensitive data to the merchant’s servers. The SDK supports card payments, digital wallets (Apple Pay and Google Pay), and compatible card readers, providing a flexible and secure way to accept payments across web-based channels. It generates secure payment tokens that merchants submit from their backend systems to complete transactions, helping reduce PCI scope while maintaining control over the flow.

Business challenges addressed

Integrating the JavaScript SDK helps address common web payment challenges by:

  • Embedding a secure, PCI-compliant payment form into a website

  • Reducing PCI compliance complexity by securing payment data

  • Eliminating the need to store or process sensitive cardholder information

  • Improving checkout conversion with trusted and familiar payment methods

  • Supporting secure payment acceptance across browsers and devices

Key capabilities

JavaScript SDK provides the following core capabilities:

  • Embed a secure, hosted payment form into a merchant website

  • Tokenize payment details for safe backend transaction processing

  • Support manual card entry, Apple Pay, and Google Pay on the web

  • Enable browser-based payments using supported USB card readers

  • Customize the payment form appearance to match website branding

Use cases

JavaScript SDK covers some of the following scenarios:

  • Accepting online card payments through a web-based checkout page

  • Offering Apple Pay or Google Pay for faster customer checkout

  • Integrating secure payment acceptance into custom web applications

  • Supporting both card-not-present and card-present workflows on the web

JavaScript SDK process flow

1

Initiate the SDK.

The merchant loads the JavaScript SDK and initializes it using the public key and environment configuration.

2

Display the payment form.

The SDK renders a secure, hosted payment form within the website.

3

Collect payment details.

Customers enter payment information or use a supported digital wallet, such as Apple Pay or Google Pay, once enabled.

4

Generate secure payment token.

The SDK generates a signed JSON Web Token (JWT) when the customer submits the form.

5

Process the transaction.

The merchant’s backend submits the JWT token to the payment gateway to complete the transaction and optionally create a reusable card token.

6

Receive transaction result.

The system returns the transaction response, including approval status and relevant transaction details.

Technical requirements

To use Recurring Payments, you need:

  • Website hosted over HTTPS

  • JavaScript-enabled, supported web browsers

  • Public and API keys issued to you by Xplor Pay

Last updated

Was this helpful?