Integrate VTU services into your application
To use these API endpoints, you must upgrade your account to an API User role. API users get special pricing and programmatic access to all VTU services.
Visit your dashboard to request an API user upgrade.
https://api.yourapp.comMTN
ID: 1
AIRTEL
ID: 2
GLO
ID: 3
9MOBILE
ID: 4
Ikeja Electric
ID: 1
Eko Electric
ID: 2
Abuja Electric
ID: 3
Kano Electric
ID: 4
Port Harcourt Electric
ID: 5
All API requests require authentication using a Bearer token
/v1/auth/logincurl -X POST https://api.yourapp.com/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "your-email@example.com",
"password": "your-password"
}'{
"ok": true,
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": "user_id",
"fullName": "John Doe",
"email": "john@example.com",
"role": "api-user"
}
}Retrieve authenticated user information and wallet balance
/v1/api/mecurl -X GET https://api.yourapp.com/v1/api/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"{
"ok": true,
"user": {
"id": "user_id",
"fullName": "John Doe",
"email": "john@example.com",
"phone": "+2348012345678",
"role": "api-user"
},
"wallet": {
"balanceKobo": 500000
}
}Fetch available data plans with API user pricing
/v1/api/planscurl -X GET "https://api.yourapp.com/v1/api/plans?service=data&networkId=1" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"{
"ok": true,
"items": [
{
"id": "plan_id",
"service": "data",
"networkId": 1,
"network": "MTN",
"planType": "SME",
"planName": "1GB - 30 Days",
"validity": "30 Days",
"price": 25000
}
]
}Purchase data for a phone number
/v1/api/buy-datacurl -X POST https://api.yourapp.com/v1/api/buy-data \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"planId": "plan_id_here",
"phone": "08012345678"
}'{
"ok": true,
"transaction": {
"_id": "transaction_id",
"kind": "purchase_data",
"status": "success",
"amountKobo": 25000,
"createdAt": "2024-01-01T00:00:00.000Z"
}
}Purchase airtime for a phone number
/v1/api/buy-airtimecurl -X POST https://api.yourapp.com/v1/api/buy-airtime \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"networkId": 1,
"phone": "08012345678",
"amountKobo": 10000
}'{
"ok": true,
"transaction": {
"_id": "transaction_id",
"kind": "purchase_airtime",
"status": "success",
"amountKobo": 10000
}
}Fetch available cable TV subscription plans
/v1/api/cable-planscurl -X GET "https://api.yourapp.com/v1/api/cable-plans?cableId=1" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"{
"ok": true,
"items": [
{
"id": "plan_id",
"cableId": 1,
"cable": "DSTV",
"planName": "Compact Plus",
"price": 1450000
}
]
}Subscribe to a cable TV plan
/v1/api/pay-tvcurl -X POST https://api.yourapp.com/v1/api/pay-tv \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cablePlanId": "plan_id_here",
"smartCardNumber": "1234567890"
}'{
"ok": true,
"transaction": {
"_id": "transaction_id",
"kind": "purchase_tv",
"status": "success",
"amountKobo": 1450000
}
}Pay for electricity using meter number
/v1/api/pay-electricitycurl -X POST https://api.yourapp.com/v1/api/pay-electricity \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"discoId": 1,
"meterNumber": "12345678901",
"meterType": "prepaid",
"amountKobo": 500000
}'{
"ok": true,
"transaction": {
"_id": "transaction_id",
"kind": "purchase_electricity",
"status": "success",
"amountKobo": 500000
}
}All API responses follow a consistent format. Successful responses have ok: true, while errors have ok: false with a message field explaining the error.
{
"ok": false,
"message": "Insufficient wallet balance"
}