Skip to main content
This page provides a working example of integrating with the Paysight Payment API using a simple HTML + JavaScript form.
Do not expose your live API keys or process raw cardholder data on non-PCI compliant servers. This example is for educational / demo purposes.

Overview

This example:
  1. Displays a payment form that collects an amount and customer information.
  2. Submits the data via JavaScript to the Payment API endpoint.
  3. Shows the API’s JSON response in the page.
It can be used for sandbox testing or as a starting point for integrating into your own page.

Full HTML Example

Paste this example into an .html file and update placeholders (e.g. API key, productId) with your own test or live credentials.
Payment API Example

How to Use

1

Replace productId with your own product ID

Replace {productId} in the fetch URL with your own product ID from the Paysight dashboard.
2

Put your own API key

Replace YOUR_API_KEY with your test or live API key.
3

Test the integration on a browser

Open the file in a browser.
4

Enter payment details

Input payment details and click Process Payment.
5

Review the response

Review the API’s response displayed below the form.

Payment API

Submit and manage payments directly via API.

Widget SDK Quick Start Guide

Embed a customizable, PCI-compliant payment widget quickly.

Paysight Reports

Analyze performance, payments and trends with Paysight Reports

Webhooks

Get real-time payment event notifications automatically.

Paysight’s Payment API allows you to build fully custom payment flows. This example is a starting point for connecting your frontend to the API and handling the response.