Developers

Paylux API

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

Introduction

All requests go to a single base URL. You must be on the API tier to generate keys, do that from your developer page.

// Base URL
https://paylux.com.ng/api/v1.php?action={action}

Authentication

Send your key pair as headers on every request. Your secret key is shown once at creation and never retrievable again.

X-Public-Key: pk_1a2b3c4d5e6f7g8h
X-Secret-Key: sk_9i8u7y6t5r4e3w2q1a2b3c4d
Tip: lock a key to your server IP from the developer page to block use if it ever leaks.

Errors & rate limits

Errors return a non-2xx status and a JSON body with a message. 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

GEThttps://paylux.com.ng/api/v1.php?action=balance
// Response 200
{
  "status": "success",
  "balance": 248530.00
}

Buy airtime

POSThttps://paylux.com.ng/api/v1.php?action=airtime

Body parameters

FieldTypeDescription
networkstringrequiredmtn, glo, airtel, 9mobile
phonestringrequired11-digit recipient number
amountnumberrequiredFace value in Naira (min 50)
// Request
curl -X POST "https://paylux.com.ng/api/v1.php?action=airtime" \
  -H "X-Public-Key: pk_..." \
  -H "X-Secret-Key: sk_..." \
  -H "Content-Type: application/json" \
  -d '{"network":"mtn","phone":"08030000000","amount":500}'

// Response 200
{
  "status": "success",
  "reference": "APIA9F2C...",
  "charged": 490.00
}

Buy data

POSThttps://paylux.com.ng/api/v1.php?action=data

Body parameters

FieldTypeDescription
plan_idintegerrequiredID from your plan catalog
phonestringrequired11-digit recipient number
// Response 200
{
  "status": "success",
  "reference": "APID3B71...",
  "charged": 2450.00
}
Refund guarantee: if the provider fails after we debit, your wallet is refunded automatically and the transaction is marked failed.

Pay electricity bill

POSThttps://paylux.com.ng/api/v1.php?action=electricity

Body parameters

FieldTypeDescription
discostringrequiredDISCO code — see list below
meter_numberstringrequiredCustomer meter number
meter_typestringrequiredprepaid or postpaid
amountnumberrequiredAmount to pay in Naira (min 1000)
phonestringCustomer phone for receipt SMS

Supported DISCOs

CodeName
ekedcEko Electricity (EKEDC)
ikedcIkeja Electric (IKEDC)
aedcAbuja Electricity (AEDC)
phedPort Harcourt Electricity (PHED)
eedcEnugu Electricity (EEDC)
kedcoKano Electricity (KEDCO)
ibedcIbadan Electricity (IBEDC)
bedcBenin Electricity (BEDC)
yedcYola Electricity (YEDC)
// Request
curl -X POST "https://paylux.com.ng/api/v1.php?action=electricity" \
  -H "X-Public-Key: pk_..." \
  -H "X-Secret-Key: sk_..." \
  -H "Content-Type: application/json" \
  -d '{"disco":"ikedc","meter_number":"1234567890","meter_type":"prepaid","amount":5000,"phone":"08030000000"}'

// Response 200
{
  "status": "success",
  "reference": "APIE7C3A...",
  "token": "1234-5678-9012-3456-7890",
  "units": "62.50 kWh",
  "charged": 5000.00
}

Pay cable TV subscription

POSThttps://paylux.com.ng/api/v1.php?action=cable

Body parameters

FieldTypeDescription
providerstringrequireddstv, gotv, or startimes
smart_cardstringrequiredCustomer smart card / IUC number
package_codestringrequiredBouquet/package code (see below)
phonestringCustomer phone number

Common package codes

ProviderCodePackage
DSTVDSTV PADIPadi (₦2,500/mo)
DSTVDSTV YANGAYanga (₦3,500/mo)
DSTVDSTV CONFAMConfam (₦9,000/mo)
DSTVDSTV COMPACTCompact (₦15,700/mo)
DSTVDSTV PREMIUMPremium (₦29,500/mo)
GOTVGOTV SMALLIESmallie (₦1,575/mo)
GOTVGOTV JINJAJinja (₦2,715/mo)
GOTVGOTV JOLLIJolli (₦4,085/mo)
GOTVGOTV MAXMax (₦5,500/mo)
StartimesnovaNova (₦1,200/mo)
StartimesbasicBasic (₦2,200/mo)
StartimessmartSmart (₦3,000/mo)
StartimesclassicClassic (₦5,200/mo)
// Request
curl -X POST "https://paylux.com.ng/api/v1.php?action=cable" \
  -H "X-Public-Key: pk_..." \
  -H "X-Secret-Key: sk_..." \
  -H "Content-Type: application/json" \
  -d '{"provider":"dstv","smart_card":"1012345678","package_code":"DSTV COMPACT","phone":"08030000000"}'

// Response 200
{
  "status": "success",
  "reference": "APIC9D1B...",
  "package": "DSTV Compact",
  "charged": 15700.00
}

Send bulk SMS

POSThttps://paylux.com.ng/api/v1.php?action=bulksms

Body parameters

FieldTypeDescription
senderstringrequiredSender name (max 11 chars, alphanumeric)
recipientsarrayrequiredArray of 11-digit Nigerian phone numbers
messagestringrequiredSMS message text (160 chars = 1 page)
Pricing: Each SMS page per number is charged at the rate configured in Admin → Settings. A 161-char message counts as 2 pages.
// Request
curl -X POST "https://paylux.com.ng/api/v1.php?action=bulksms" \
  -H "X-Public-Key: pk_..." \
  -H "X-Secret-Key: sk_..." \
  -H "Content-Type: application/json" \
  -d '{"sender":"MyBrand","recipients":["08030000000","08051234567"],"message":"Hello! Your order is ready."}'

// Response 200
{
  "status": "success",
  "reference": "APIS2E8F...",
  "sent": 2,
  "pages": 1,
  "charged": 7.00
}