Complete Integration Examples
Three complete setups. Option 1 is the recommended integration — use it if you have a backend.Option 1: Backend session + SDK — Recommended
Your server creates the session (amount computed from your own data,ip passed for fraud prevention), the browser only receives a session ID.
server.js — Express
checkout.html
The amount never travels through the browser, so it can’t be tampered with — and you still get the SDK’s redirect handling.
Option 2: SDK only (no backend)
The SDK creates the session itself with your public key. Best for static sites, prototypes, and evaluating Payviox. Full HTML page with SDK integration:When you click “Pay Now”, the SDK automatically creates a session and redirects to the secure payment page.
Option 3: REST API only (no browser)
For backend services, mobile app backends, non-JavaScript stacks, and payment links sent by email.session_id. Build the payment page URL from it and send the customer there — an HTTP redirect, a link in an email, wherever your product reaches them:
Webhook Handler Examples
All three setups require a webhook handler on your server — it’s what confirms the payment.Testing Your Integration
1
Use test credentials
Use your test API token to avoid real charges:
2
Test card numbers
Use these test card numbers in the payment form:
4242 4242 4242 4242- Successful payment4000 0000 0000 0002- Card declined4000 0000 0000 0341- Insufficient funds
3
Test webhooks locally
4
Monitor in dashboard
View all test transactions in your dashboard.
Next Steps
SDK Documentation
Learn more about the SDK
API Documentation
Explore the REST API
Webhook Guide
Complete webhook documentation
Best Practices
Security and best practices