API Documentation
Integrate ZentPay services into your platform. Airtime, data, electricity, cable, and more.
Authentication
All requests require your API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY
How to get your key: Upgrade to the API Client plan, then go to Dashboard > API Keys.
Base URL
https://zentpay.com.ng/api/v1.php
Request Format
All POST requests use JSON body with Content-Type: application/json
GET Check Balance
?action=balance
// Response
{
"status": "success",
"balance": 5000.00
}
POST Buy Airtime
?action=airtime
| Parameter | Type | Status | Description |
network | string | Required | Network slug: mtn, glo, airtel, 9mobile |
phone | string | Required | 11-digit phone number |
amount | number | Required | Amount in Naira (min 50) |
reference | string | Optional | Your unique reference |
// Request
curl -X POST "https://zentpay.com.ng/api/v1.php?action=airtime" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"network": "mtn",
"phone": "08012345678",
"amount": 100
}'
// Response 200
{
"status": "success",
"message": "Airtime delivered",
"reference": "AIR_xxx"
}
POST Buy Data
?action=data
| Parameter | Type | Status | Description |
network | string | Required | Network slug |
phone | string | Required | Phone number |
plan_id | integer | Required | Plan ID from data-plans endpoint |
reference | string | Optional | Your unique reference |
Important: Get plan IDs from the
data-plans endpoint or the
API Pricing page. Do not hardcode plan IDs.
POST Pay Electricity
?action=electricity
| Parameter | Type | Status | Description |
disco | string | Required | Disco ID (e.g. ikeja-electric) |
meter_number | string | Required | Meter number |
amount | number | Required | Amount (min 500) |
meter_type | string | Optional | prepaid (default) or postpaid |
// Success response includes token
{
"status": "success",
"token": "1234-5678-9012-3456",
"reference": "ELC_xxx"
}
POST Pay Cable TV
?action=cable
| Parameter | Type | Status | Description |
provider | string | Required | dstv, gotv, or startimes |
iuc_number | string | Required | Smartcard/IUC number |
plan_id | integer | Required | Cable plan ID from cable-plans |
GET List Data Plans
?action=data-plans
Returns all data plans with pricing for your membership level.
// Response
{
"status": "success",
"data": [
{
"id": 1,
"network": "MTN",
"type": "SME",
"name": "MTN 1GB SME 30 Days",
"price": 430.00
}
]
}
GET List Cable Plans
?action=cable-plans
Error Handling
{
"status": "error",
"message": "Insufficient balance"
}
| Code | Meaning |
200 | Success |
400 | Bad request (missing or invalid parameters) |
401 | Unauthorized (invalid or missing API key) |
402 | Insufficient balance |
429 | Rate limited (max 60 requests/min) |
500 | Server error |
Ready to Integrate?
Get your API key and start building
Get Started