VendPower Developers

API Documentation

REST API for electricity, betting wallets, cable TV, mobile data, airtime, and Vend Airtime to Cash. Authenticate with an approved X-API-Key.

JSON over HTTPS X-API-Key auth Idempotent purchases
All systems normal

Base URL

https://api.vendpower.ng/api/v1

Purchase airtime

X-API-Key
POST/airtime/purchase

Send face value in amount (NGN). Wallet debit = face × charge_percent / 100. Success: 200 · pending: 201 · failed/refunded: 400. Poll like cable.

curl -X POST "https://api.vendpower.ng/api/v1/airtime/purchase" \
  -H "X-API-Key: YOUR_X_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "biller_code": "MTN",
    "phone": "08031234567",
    "amount": 1000,
    "idempotency_key": "VP_AIRTIME_001"
  }'

Authentication

Send your approved API key on every request. Keep it on your server only.

HeaderValueRequired
X-API-KeyYOUR_X_API_KEYYes
Content-Typeapplication/jsonYes
Acceptapplication/jsonRecommended

Authentication failures (401 / 403 / 429) are listed in Authentication.

Parameters

Body parameters

NameTypeRequiredDescription
biller_codestringYesMTN | GLO | AIRTEL | 9MOBILE
phonestringYesNigerian MSISDN, e.g. 08031234567 (11 digits). Must match the network for airtime and data.
amountnumberYesFace airtime amount in NGN
idempotency_keystringYesYour unique purchase key (recommended VP…). Re-sending the same key returns 409 with the original transaction — never charges twice.

Responses

200 OK — Delivered · 201 Created — Pending

{
  "success": true,
  "message": "Airtime delivered successfully.",
  "data": {
    "id": 88001,
    "reference": "VP_AIRTIME_001",
    "idempotency_key": "VP_AIRTIME_001",
    "status": "success",
    "category": "airtime",
    "amount": 1000,
    "charge": 1000,
    "biller_name": "MTN",
    "customer_phone": "08031234567",
    "metadata": {
      "phone": "08031234567",
      "network": "MTN",
      "biller_code": "MTN"
    }
  }
}

Errors

Errors specific to this endpoint, in addition to common authentication and validation failures.

CodeHTTPWhen
VALIDATION_ERROR422Request body failed validation or business rules.
INSUFFICIENT_BALANCE400 / 402Wallet balance is too low for this purchase.
DUPLICATE_IDEMPOTENCY409This idempotency_key was already used — requery the returned transaction.
SERVICE_UNAVAILABLE503Upstream provider or service is temporarily unavailable.

Notes

  • Pending (201): poll GET /transactions/{id or reference} and POST /transactions/{id}/requery until terminal.
  • For T2 (9mobile), send biller_code: "9MOBILE".

VendPower Developer API