Skip to main content

Prerequisites

Requirements:
  • Modern web browser with ES6 support
  • API token from your Payviox dashboard
  • Node.js 14+ (for npm installation)

Installation methods

You can integrate the Payviox SDK using different methods depending on your project setup.
Include the SDK directly in your HTML file using a CDN link.
index.html
Using the CDN is the fastest way to get started and automatically provides updates.

Get your API token

To use the SDK, you need an API token from your Payviox dashboard.
1

Log in to your dashboard

Navigate to https://dash.payviox.com and sign in with your credentials.
2

Access API settings

Go to Settings > API Keys in the sidebar menu.
3

Create or copy token

Click Create new API key or copy an existing key.
Use your public key (pk_) with the SDK — it’s built to be exposed in the browser. Your secret key (sk_) must never appear in client-side code: keep it on your server. See Authentication.

Initialize the SDK

Once installed, initialize the SDK with your API token:

Verify installation

Test your installation by fetching available payment methods:
test.js
If you see a list of payment methods in the console, your SDK is correctly installed and configured.

Environment configuration

Development vs Production

Use different API tokens for development and production environments:
config.js

Base URL configuration

The SDK automatically uses the correct base URLs:
  • API endpoint: https://api.payviox.com
  • Secure redirect: https://secure.payviox.com
These URLs are managed internally by the SDK and cannot be modified in standard configurations.

Next steps

Quickstart

Create your first payment session

Redirect integration

Implement redirect mode

Iframe integration

Implement iframe mode

API reference

Explore all SDK methods