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://app.billsub.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://app.billsub.com.ng/api/v1.php?action=balance// Response 200 { "status": "success", "balance": 248530.00 }
Buy airtime
POST
https://app.billsub.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://app.billsub.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://app.billsub.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.