Developer Documentation

Getting Started with ZenithPay

Welcome to ZenithPay's developer documentation. This guide will help you integrate our payment API into your application and start accepting payments in minutes.

Quick Start

Follow these simple steps to integrate ZenithPay into your application:

1

Sign Up

Create your free ZenithPay account and get instant access to your dashboard.

2

Get API Keys

Find your API keys in the dashboard under Settings → API Keys.

3

Integrate

Use our API to start accepting payments in your application.

API Keys & Authentication

To use the ZenithPay API, you'll need your API keys. You can find these in your Dashboard under Settings → API Keys.

Important Security Note

Never share your secret key or commit it to version control. Always use environment variables to store your API keys securely. The secret key should only be used on your server, never in client-side code.

Test Mode

TESTING

Use these keys during development and testing.

Public Key

pk_test_your_test_public_key

Secret Key

sk_test_your_test_secret_key

Live Mode

PRODUCTION

Use these keys for real transactions in production.

Public Key

pk_live_your_live_public_key

Secret Key

sk_live_your_live_secret_key

Dedicated Account Assignment

Assign a dedicated virtual account to your customers. This allows them to make payments directly to a unique account number tied to their profile.

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' \
  -d 'account_name=ZTS' \
  -d 'first_name=John' \
  -d 'last_name=Doe' \
  -d 'email=JohnDoe@doe.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_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)

Authentication Required

Replace YOUR_AUTH_TOKEN with your actual bearer token. All API requests must include proper authentication headers.

Request Parameters

Parameter Required Type Description
bvn Required String Customer's Bank Verification Number (11 digits)
account_name Required String Account name prefix for the virtual account
first_name Required String Customer's first name
last_name Required String Customer's last name
email Required String Customer's email address (must be valid)

Response Example

Success Response (200 OK)

{
    "status": "success",
    "message": "Account assigned successfully",
    "data": {
        "account_number": "1234567890",
        "bank_name": "Zenith Bank",
        "account_name": "ZTS - John Doe",
        "reference": "ZTS_ACCT_12345",
        "customer": {
            "id": "cust_xyz789",
            "first_name": "John",
            "last_name": "Doe",
            "email": "JohnDoe@doe.ng"
        }
    }
}