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.
| Status | Meaning |
|---|---|
401 | Missing or invalid API keys |
402 | Insufficient wallet balance |
422 | Invalid parameters |
429 | Rate limit exceeded |
502 | Provider failed (auto-refunded) |
Get balance
GET
https://paylux.com.ng/api/v1.php?action=balance// Response 200 { "status": "success", "balance": 248530.00 }
Buy airtime
POST
https://paylux.com.ng/api/v1.php?action=airtimeBody parameters
| Field | Type | Description | |
|---|---|---|---|
network | string | required | mtn, glo, airtel, 9mobile |
phone | string | required | 11-digit recipient number |
amount | number | required | Face 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
POST
https://paylux.com.ng/api/v1.php?action=dataBody parameters
| Field | Type | Description | |
|---|---|---|---|
plan_id | integer | required | ID from your plan catalog |
phone | string | required | 11-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
POST
https://paylux.com.ng/api/v1.php?action=electricityBody parameters
| Field | Type | Description | |
|---|---|---|---|
disco | string | required | DISCO code — see list below |
meter_number | string | required | Customer meter number |
meter_type | string | required | prepaid or postpaid |
amount | number | required | Amount to pay in Naira (min 1000) |
phone | string | Customer phone for receipt SMS |
Supported DISCOs
| Code | Name |
|---|---|
ekedc | Eko Electricity (EKEDC) |
ikedc | Ikeja Electric (IKEDC) |
aedc | Abuja Electricity (AEDC) |
phed | Port Harcourt Electricity (PHED) |
eedc | Enugu Electricity (EEDC) |
kedco | Kano Electricity (KEDCO) |
ibedc | Ibadan Electricity (IBEDC) |
bedc | Benin Electricity (BEDC) |
yedc | Yola 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
POST
https://paylux.com.ng/api/v1.php?action=cableBody parameters
| Field | Type | Description | |
|---|---|---|---|
provider | string | required | dstv, gotv, or startimes |
smart_card | string | required | Customer smart card / IUC number |
package_code | string | required | Bouquet/package code (see below) |
phone | string | Customer phone number |
Common package codes
| Provider | Code | Package |
|---|---|---|
| DSTV | DSTV PADI | Padi (₦2,500/mo) |
| DSTV | DSTV YANGA | Yanga (₦3,500/mo) |
| DSTV | DSTV CONFAM | Confam (₦9,000/mo) |
| DSTV | DSTV COMPACT | Compact (₦15,700/mo) |
| DSTV | DSTV PREMIUM | Premium (₦29,500/mo) |
| GOTV | GOTV SMALLIE | Smallie (₦1,575/mo) |
| GOTV | GOTV JINJA | Jinja (₦2,715/mo) |
| GOTV | GOTV JOLLI | Jolli (₦4,085/mo) |
| GOTV | GOTV MAX | Max (₦5,500/mo) |
| Startimes | nova | Nova (₦1,200/mo) |
| Startimes | basic | Basic (₦2,200/mo) |
| Startimes | smart | Smart (₦3,000/mo) |
| Startimes | classic | Classic (₦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
POST
https://paylux.com.ng/api/v1.php?action=bulksmsBody parameters
| Field | Type | Description | |
|---|---|---|---|
sender | string | required | Sender name (max 11 chars, alphanumeric) |
recipients | array | required | Array of 11-digit Nigerian phone numbers |
message | string | required | SMS 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 }