Overview
The Payviox class is the main entry point for the Payviox SDK. It provides methods to create payment sessions, open payment pages, and retrieve available payment methods.Constructor
new Payviox(token)
Creates a new instance of the Payviox SDK.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | ✅ Required | Your Payviox API token. Obtain this from your dashboard at dash.payviox.com. Use test tokens (pk_test_...) for development and live tokens (pk_live_...) for production. |
Examples
Environment-specific tokens
It’s recommended to use different tokens for different environments:Available methods
Once instantiated, the Payviox class provides the following methods:| Method | Description | Link |
|---|---|---|
createSession() | Create a new payment session and optionally redirect or embed an iframe | View details |
openSession() | Manually redirect the user to the payment page | View details |
openIframe() | Manually open an iframe for a payment session | View details |
getPaymentsMethods() | Retrieve available payment methods | View details |
Quick start
Related resources
Installation
Install the Payviox SDK
Quickstart
Get started quickly
createSession()
Create payment sessions
Payment Methods
Understand payment methods