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.- CDN
- NPM
- Download
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.
Never expose your API token in client-side code in production. Use it only for server-side operations or in secure environments.
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.