Paylux VTU API

Sell airtime, data, pay bills, and send SMS from your own app using your wallet balance. Same pricing and tier discounts as the dashboard. REST over HTTPS, JSON in and out.

To access the API, upgrade your account to API Client tier. Your API keys will be generated automatically.

// Base URL
http://vtuapp.paylux.com.ng/api.php?action={action}

Authentication

Send your key pair as headers on every request. Get your keys from Dashboard → API Keys after upgrading to API Client tier.

X-Public-Key: pk_1a2b3c4d5e6f...
X-Secret-Key: sk_9i8u7y6t5r4e...

Errors & Rate Limits

Errors return a non-2xx status and a JSON body with a message. Rate limit is 60 requests/minute per key.

StatusMeaning
401Missing or invalid API keys
402Insufficient wallet balance
422Invalid parameters
429Rate limit exceeded
502Provider failed (auto-refunded)

Get Balance

GET /api.php?action=balance
// Response 200
{
  "status": "success",
  "balance": 24850.00,
  "tier": "API Client"
}

Buy Airtime

POST /api.php?action=airtime

Body Parameters

FieldTypeDescription
networkstring requiredmtn, glo, airtel, 9mobile
phonestring required11-digit recipient number
amountnumber requiredFace value in Naira (min 50)
// Response 200
{
  "status": "success",
  "reference": "DB8A2F3C...",
  "charged": 475.00,
  "balance": 24375.00
}

Buy Data

POST /api.php?action=data

Body Parameters

FieldTypeDescription
plan_idinteger requiredID from the plans catalog (GET /api.php?action=plans)
phonestring required11-digit recipient number
// Response 200
{
  "status": "success",
  "reference": "DB3B71F2...",
  "plan": "1GB mtn",
  "charged": 245.00,
  "balance": 24130.00
}

Get Data Plans

GET /api.php?action=plans&network=mtn

Returns all active data plans. Optional network query parameter to filter.

Pay Electricity

POST /api.php?action=electricity

Body Parameters

FieldTypeDescription
discostring requiredekedc, ikedc, aedc, phed, eedc, kedco, ibedc, bedc, yedc
meter_numberstring requiredCustomer meter number
meter_typestring requiredprepaid or postpaid
amountnumber requiredAmount in Naira (min 1000)
phonestringPhone for receipt SMS
// Response 200 (includes prepaid token!)
{
  "status": "success",
  "reference": "DBE7C3A1...",
  "token": "1234-5678-9012-3456-7890",
  "units": "62.50 kWh",
  "charged": 5000.00,
  "balance": 19130.00
}

Pay Cable TV

POST /api.php?action=cable

Body Parameters

FieldTypeDescription
providerstring requireddstv, gotv, startimes
smart_cardstring requiredSmart card / IUC number
package_codestring requiredBouquet code (e.g. DSTV COMPACT)
phonestringCustomer phone

Send Bulk SMS

POST /api.php?action=bulksms

Body Parameters

FieldTypeDescription
senderstring requiredSender name (max 11 chars)
recipientsarray requiredArray of 11-digit phone numbers
messagestring requiredSMS text (160 chars = 1 page)
// Response 200
{
  "status": "success",
  "reference": "DBS2E8F7...",
  "sent": 50,
  "pages": 1,
  "charged": 200.00,
  "balance": 18930.00
}

Refund Policy

If a provider fails after we debit your wallet, the full amount is automatically refunded and the response returns a 502 status. You never lose money on a failed transaction.