Getting Started

Welcome to Zenith Pay's developer documentation. This guide will help you integrate our payment API into your application.

API Keys

To get started, you'll need API keys. You can find these in your Zenith Pay Dashboard.

Important: Never share your secret key or commit it to version control. Use environment variables instead.

Test Mode

pk_test_your_test_public_key
sk_test_your_test_secret_key

Live Mode

pk_live_your_live_public_key
sk_live_your_live_secret_key

Dedicated Account Assignment

Assign a dedicated virtual account to your customer using this API endpoint.

curl -X POST 'https://zenithpay.ng/api/dedicated_account/assign' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'bvn=12345678910&account_name=ZTS&first_name=John&last_name=Doe&email=JohnDoe%40doe.ng'
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://zenithpay.ng/api/dedicated_account/assign',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => http_build_query([
        'bvn' => '12345678910',
        'account_name' => 'ZTS',
        'first_name' => 'John',
        'last_name' => 'Doe',
        'email' => 'JohnDoe@doe.ng'
    ]),
    CURLOPT_HTTPHEADER => [
        'Accept: application/json',
        'Content-Type: application/x-www-form-urlencoded',
        'Authorization: Bearer YOUR_AUTH_TOKEN'
    ],
]);

$response = curl_exec($curl);
$error = curl_error($curl);
curl_close($curl);

if ($error) {
    echo "Error: " . $error;
} else {
    echo $response;
}
?>
const axios = require('axios');
const qs = require('querystring');

const data = qs.stringify({
    'bvn': '12345678910',
    'account_name': 'ZTS',
    'first_name': 'John',
    'last_name': 'Doe',
    'email': 'JohnDoe@doe.ng'
});

const config = {
    method: 'post',
    url: 'https://zenithpay.ng/api/dedicated_account/assign',
    headers: { 
        'Accept': 'application/json', 
        'Content-Type': 'application/x-www-form-urlencoded', 
        'Authorization': 'Bearer YOUR_AUTH_TOKEN'
    },
    data: data
};

axios(config)
.then(response => console.log(response.data))
.catch(error => console.error(error));
import requests

url = "https://zenithpay.ng/api/dedicated_account/assign"

payload = {
    'bvn': '12345678910',
    'account_name': 'ZTS',
    'first_name': 'John',
    'last_name': 'Doe',
    'email': 'JohnDoe@doe.ng'
}
headers = {
    'Accept': 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'Bearer YOUR_AUTH_TOKEN'
}

response = requests.post(url, data=payload, headers=headers)
print(response.text)

Note: Replace YOUR_AUTH_TOKEN with your actual bearer token. All sensitive information should be properly secured in production environments.

Request Parameters

Parameter Required Type Description
bvn Yes String Customer's Bank Verification Number
account_name Yes String Account name prefix
first_name Yes String Customer's first name
last_name Yes String Customer's last name
email Yes String Customer's email address

Response Example

{
    "status": "success",
    "message": "Account assigned successfully",
    "data": {
        "account_number": "1234567890",
        "bank_name": "Zenith Bank",
        "account_name": "ZTS - John Doe",
        "reference": "ZTS_ACCT_12345"
    }
}

Next Steps