Developer API
API Documentation
Integrate PayOnce VTU services into your apps with clean REST endpoints.
Base URL: https://api.payonce.com.ng/api/v1
API Reference
Authentication
All API requests must be authenticated using your API Key. Include the key in the request header.
x-api-key: YOUR_API_KEY_HERE
GET
Get Plans
Fetch available service plans based on network and category.
Parameters
network(string): mtn, airtel, glo, 9mobilecategory(string): data, airtime, cable, electricity
GET /plans?network=mtn&category=data
GET
Get Categories
Fetch available categories for a specific network.
Parameters
network(string): mtn, airtel, glo, 9mobileserviceType(string): data, airtime, etc.
GET /categories?network=mtn&serviceType=data
POST
Purchase Airtime
Body Parameters
| Field | Type | Description |
|---|---|---|
| networkId | string | mtn, airtel, glo, 9mobile |
| phone | string | Recipient phone number |
| amount | number | Amount to purchase |
| airtimeType | string | VTU (optional, default: VTU) |
// Request Body
{
"networkId": "mtn",
"phone": "08012345678",
"amount": 100,
"airtimeType": "VTU"
}POST
Purchase Data
Body Parameters
| Field | Type | Description |
|---|---|---|
| networkId | string | mtn, airtel, glo, 9mobile |
| planId | string | Plan ID from "Get Plans" endpoint |
| phone | string | Recipient phone number |
| amount | number | Plan price |
// Request Body
{
"networkId": "mtn",
"planId": "65f2...",
"phone": "08012345678",
"amount": 500
}POST
Verify Cable TV
Verify smartcard number before purchase.
// Request Body
{
"cableType": "dstv", // dstv, gotv, startimes
"smartCardNo": "1234567890"
}POST
Purchase Cable TV
// Request Body
{
"provider": "dstv",
"planId": "65f...",
"smartCardNo": "1234567890",
"customerName": "John Doe",
"phone": "08012345678",
"amount": 2500
}POST
Verify Electricity
// Request Body
{
"company": "ikejaelectric",
"metertype": "prepaid", // prepaid or postpaid
"meterno": "1234567890",
"amount": 1000 // optional, for validation
}POST
Purchase Electricity
// Request Body
{
"company": "ikejaelectric",
"type": "prepaid",
"meter_no": "1234567890",
"amount": 1000,
"planId": "65f...",
"phone": "08012345678"
}POST
Purchase Exam Pin
// Request Body
{
"planId": "65f...",
"noOfPin": 1
}