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.

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

Get balance

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

Buy airtime

POSThttps://app.billsub.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://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

POSThttps://app.billsub.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.