Skip to main content

Overview

The Payviox JavaScript SDK provides a simple and secure way to integrate payment processing into your web applications. With support for both redirect and iframe integration modes, you can create seamless payment experiences for your customers.

Key features

Multiple integration modes

Choose between redirect or iframe mode to match your application’s user experience.

Secure payment sessions

Create encrypted payment sessions with comprehensive customer and order data.

Payment method discovery

Query available payment methods filtered by currency and country.

Error handling

Built-in error handling with detailed error messages for debugging.

Quick example

example.js
// Initialize the SDK with your API token
const payviox = new Payviox('your_api_token');

// Create a payment session
const sessionId = await payviox.createSession({
  amount: 1000,
  currency: 'USD',
  customer: 'customer_123',
  description: 'Order #12345',
  paymentMethodId: 'pm_card',
  order_id: 'order_12345',
  items: [
    {
      name: 'Product A',
      quantity: 2,
      price: 500
    }
  ]
}, {
  redirect: true
});

Integration modes

Redirect mode

Redirect your customers to a secure Payviox-hosted payment page. This is the simplest integration method and provides a fully managed payment experience.
Redirect mode is recommended for quick integrations and provides the highest level of PCI compliance.

Iframe mode

Embed the payment flow directly into your website using an iframe. This provides a more seamless user experience while maintaining security.
When using iframe mode, ensure your domain is whitelisted in your Payviox dashboard settings.

Get started

Resources