Overview
VTUAgent is a Nigerian VTU platform for selling airtime, mobile data, cable TV subscriptions and electricity from your own product, funded from a prepaid wallet.
Use this documentation to integrate with the VTUAgent API, understand the available endpoints, and test requests against the generated API reference. Every purchase is confirmed synchronously where possible and reconciled through a transaction-status endpoint and signed webhooks where it is not.
API base URL
https://api.vtuagent.com/v1
Authentication
Generate an API key from the VTUAgent dashboard and send it with every request as Authorization: Bearer {your_api_key}. Requests with a missing, malformed or revoked key return 401 Unauthorized.
Wallet
All purchases are debited from your VTUAgent wallet at the moment they are accepted. If the provider later rejects a purchase (424), the amount is refunded automatically. Top up your wallet from the dashboard.
VTUAgent integration flow
- API — Create an API key and send it with every request.
- API — Call
POST /webhook/setwith your HTTPS endpoint to receive signed notifications for airtime and data purchases. Verify each delivery withhash = hex(sha256("{your_api_key}:{reference}"))and respond200. - API — For data, call
GET /data/plansto list every bundle priced for your account tier. Store theplan_idvalues; thepriceshown is exactly what your wallet will be debited. - API — For cable TV, call
POST /cabletv/variationswith the provider (dstv,gotv,startimes) to list bouquets and their prices, thenPOST /cabletv/verifywith the customer’s smartcard number to retrieve the account holder’s name. - API — For electricity, call
POST /electricity/verifywith the disco, meter number and meter type (prepaid/postpaid) to retrieve the customer name and address. - UI — Show the customer the plan, bouquet or meter details and your retail price, and ask them to confirm.
- API — Place the purchase with a unique
request_ref(UUID recommended, ≤ 50 characters):POST /airtime/purchase,POST /data/purchase,POST /cabletv/purchaseorPOST /electricity/purchase. Your wallet is debited immediately. Never resubmit the samerequest_ref— it is rejected with400; create a new reference for a new attempt. - API — Read the response
status:successful(200) means delivered;failed(424) means the provider rejected it and your wallet has been refunded;pending(202) means the provider has not confirmed yet. For electricity, a successful prepaid purchase returns the metertokenandunits— show them to the customer. - Webhook/API — For a
pendingpurchase, wait for theairtime.purchase.*ordata.purchase.*webhook, or pollPOST /transaction/statuswith yourrequest_refuntilstatusissuccessfulorfailed. Cable TV and electricity do not emit webhooks — poll the status endpoint. - API — Call
POST /transaction/statusat any time to retrieve a transaction’s final state, amount, and your wallet balance before and after the debit. Each call also re-sends atransaction.requerywebhook.
