Checkout Integration

Servinux provides two ways to accept payments: a Drop-in Modal for a seamless UI experience, or a Direct API for full control over your payment flow. Both methods utilize our stateless high-speed engine for 24/7 reliability.

Option 1

Drop-in Checkout Modal

The fastest way to integrate. The Servinux SDK handles the entire payment lifecycle—including UI, dynamic account generation, real-time polling, and success redirections—statelessly.

1. Add the Script

<script src="https://merchant.servinux.com/sdk/checkout-v2.js"></script>

2. Initialize Payment

ServinuxCheckout.setup({
    key: 'sk_test_your_secret_key', // Your public API key from dashboard
    amount: 5000,                  // Amount in NGN
    email: '[email protected]', // Payer email
    onSuccess: function(response) {
        console.log("Payment Confirmed:", response.reference);
        // The modal handles the final redirect automatically.
    },
    onClose: function() {
        console.log("User closed the payment window.");
    }
});

Option 2

Direct API Integration

For developers building custom UIs. Our API utilizes Dynamic Virtual Accounts (DVA) to return GTBank details in real-time. This API supports Hybrid Header authentication to bypass firewall stripping.

Hybrid Authentication

Include either header. Using X-Servinux-Key is recommended for CyberPanel/LiteSpeed servers.

Authorization: Bearer sk_your_key X-Servinux-Key: Bearer sk_your_key
Endpoint https://merchant.servinux.com/api.php
Method POST

Request Body (JSON)

Field Type Description
action String Set to initiate_inline.
amount Number Total amount in Naira.
email String Customer email for payment tracking.

Success Response

{
    "success": true,
    "reference": "SERV_83035_17678",
    "account_number": "9123796549",
    "data": {
        "bank_name": "GTBank",
        "account_name": "SERV CHECKOUT",
        "amount": 5000
    }
}