Base URL: https://vtusub.com/api.php
GET /?route=account
Account details
Returns the authenticated website owner's account, wallet balance, and whether a transaction PIN has been set. The PIN itself is never returned.
curl "https://vtusub.com/api.php?route=account" \
-H "Authorization: Bearer YOUR_API_KEY"
Sample response
{
"success": true,
"data": {
"id": 42,
"name": "Jane Doe",
"email": "jane@example.com",
"role": "reseller",
"wallet_balance": 12500.00,
"currency": "NGN",
"transaction_pin_set": true
}
}
GET /?route=balance
Wallet balance
curl "https://vtusub.com/api.php?route=balance" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": { "balance": 12500.00, "currency": "NGN" }
}
GET /?route=plans&service=data
List plans
Call this endpoint first. Use search=ALL to return every active plan, or filter with search=MTN, search=GLO, search=AIRTEL, or search=9MOBILE. Use the returned id as price_id and copy its network into the order payload.
curl "https://vtusub.com/api.php?route=plans&service=data&search=ALL" \
-H "Authorization: Bearer YOUR_API_KEY"
Sample response
{
"success": true,
"data": [{
"id": 123,
"network": "MTN",
"item_name": "1.5GB",
"validity": "30 days",
"price": 1200.00
}]
}
POST /?route=data
Buy data
Set network to the network you want. The price_id must come from the same network in the plans response.
curl -X POST "https://vtusub.com/api.php?route=data" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"price_id": 123,
"network": "MTN",
"phone": "08031234567",
"transaction_pin": "1234"
}'
Sample success response
{
"success": true,
"message": "Data purchase successful.",
"receipt_id": 789
}
Other networks
"network": "GLO"
"network": "AIRTEL"
"network": "9MOBILE"
POST /?route=airtime
Buy airtime
Use the airtime plan price_id returned by GET /?route=plans&service=airtime. Send the matching network and the face value you want delivered.
curl -X POST "https://vtusub.com/api.php?route=airtime" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"price_id": 456,
"network": "AIRTEL",
"phone": "08031234567",
"amount": 1000,
"transaction_pin": "1234"
}'
Sample success response
{
"success": true,
"message": "Airtime purchase successful.",
"reference": "AIR-AB12CD34EF56",
"charge": 990.00,
"receipt_id": 790
}
Network examples
"network": "MTN"
"network": "GLO"
"network": "AIRTEL"
"network": "9MOBILE"
Response codes
200 successful request, 401 missing or invalid key, 422 invalid order or insufficient balance, 503 provider unavailable.
Sample error response
{
"success": false,
"message": "The selected price_id does not belong to the requested network."
}