datavendor.ng merchant API
API Documentation
REST API for data, airtime, cable TV, electricity, exam pins, recharge cards and bulk SMS. Authenticate with your token and call the live base URL below.
JSON over HTTPSToken authenticationLive pricing
Base URL
https://datavendor.ngPOST
/api/topup/Buy Airtime
POST — VTU / Share & Sell airtime
api:readTop up any Nigerian line. `airtime_type` can be VTU, awuf4U, or Share and Sell.
Required headers
| Header | Value | Required |
|---|---|---|
| Authorization | Token YOUR_API_TOKEN | Yes |
| Content-Type | application/json | Yes (POST/PUT) |
| Accept | application/json | Recommended |
Endpoint
POST
https://datavendor.ng/api/topup/Parameters / payload fields
| Field | Type | Required | Description |
|---|---|---|---|
| network | integer | Yes | Network ID |
| amount | string/number | Yes | Amount in Naira |
| mobile_number | string | Yes | 11-digit number |
| Ported_number | boolean | Yes | true or false |
| airtime_type | string | Yes | VTU | awuf4U | Share and Sell |
Code samples
cURL
curl -X POST "https://datavendor.ng/api/topup/" \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"network":1,"amount":"100","mobile_number":"08012345678","Ported_number":true,"airtime_type":"VTU"}'Request body (JSON)
JSON
{
"network": 1,
"amount": "100",
"mobile_number": "08012345678",
"Ported_number": true,
"airtime_type": "VTU"
}Response sample (200)
JSON
{
"id": 512,
"ident": "AIRTIME1234567890",
"Status": "successful",
"amount": "100.00",
"balance_before": "9500.00",
"balance_after": "9380.00"
}