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 cable

X-API-Key
POST/cable/purchase

Subscribe a cable package. Pending orders: poll GET /transactions/{id} and POST /transactions/{id}/requery.

curl -X POST "https://api.vendpower.ng/api/v1/cable/purchase" \
  -H "X-API-Key: YOUR_X_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "biller_code": "DSTV",
    "plan_id": "dstv_compact",
    "customer_id": "1234567890",
    "customer_phone": "08031234567",
    "idempotency_key": "VP_UNIQUE_CABLE_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_codestringYesFrom cable billers
plan_idstringYesapi_cable_plan_id or plan id
customer_idstringYesValidated smartcard
customer_phonestringNoOptional contact phone
idempotency_keystringYesYour unique purchase key (recommended VP…). Re-sending the same key returns 409 with the original transaction — never charges twice.

Responses

200 OK — Success

{
  "success": true,
  "message": "Cable subscription completed successfully.",
  "data": {
    "id": 100,
    "reference": "VP_UNIQUE_CABLE_001",
    "idempotency_key": "VP_UNIQUE_CABLE_001",
    "status": "success",
    "category": "cable",
    "amount": 15700,
    "charge": 15857
  }
}

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 cable: poll GET /transactions/{id} and POST /transactions/{id}/requery.

VendPower Developer API