Skip to main content

Overview

Redirect mode redirects your customers to a Payviox-hosted payment page where they complete their payment. This is the simplest and most secure integration method.
Redirect mode is recommended for:
  • Quick integrations
  • Maximum PCI compliance
  • When you don’t need custom payment UI

How it works

1

Create payment session

Your application creates a payment session with customer and order details.
2

Redirect to Payviox

Customer is redirected to the secure Payviox payment page using the session ID.
3

Customer completes payment

Customer enters their payment information on the Payviox-hosted page.
4

Return to your site

After payment, customer is redirected back to your specified URL with the payment result.

Implementation

Example with automatic redirect

payment.js

Session parameters

The createSession() method accepts two parameter objects:

Payment session details (SessionParameters)

Integration options (PayvioxParameters)

Item object structure

Each item in the items array must have:

Return value

The createSession() method returns a Promise that resolves to:
  • void when using redirect: true (page redirects before returning)
  • string (session ID) in all other cases

Best practices

Always validate payment parameters on your server before creating sessions:
Implement retry logic for transient failures:

Next steps

Iframe integration

Embed payments in your page

Error handling

Handle errors gracefully

Testing

Test your integration