Buy airtime
POST /api/airtime
curl -X POST https://trustplug.ng/api/airtime \
-H "Authorization: Token YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"mobile_number":"08012345678","amount":100,"request_id":"airtime-unique-001"}'Use an 11-digit Nigerian MTN number and a whole-naira amount from 1 to 5000. The API uses the key owner’s selected master SIM and saved transfer PIN. Web checkout deducts the amount from the customer wallet; confirmed failure refunds the reservation.
Check a purchase
POST https://trustplug.ng/api/airtime/status
Authorization: Token YOUR_SECRET_KEY
{"request_id":"airtime-unique-001"}Reuse the same reference for the same airtime purchase. A status check never sends another transfer. HTTP 202 means unconfirmed: keep checking this reference.
Web checkout sources
In the Airtime page, choose Wallet to pay the full amount using the saved admin API account. Choose SIM to use your own selected master and its airtime balance; only the existing SIM service charge is deducted from your wallet. The direct airtime API above uses the authenticated key owner’s master SIM.
Select vending type
Send "vending_type":"wallet" to pay from your wallet using the admin supplier. Send "vending_type":"sim" to use your own SIMs (your master SIM for airtime), with the existing service charge. Wallet purchases require sufficient funds. Use a unique request_id for each intended purchase and keep the same ID when checking it. Omit vending_type to preserve the legacy API behavior.