Quickstart
Create your Test API credentials from Advertise Mode → API. Test requests do not call the external VTU provider.
https://gozietasks.name.ng/api/v1/plansUse this first to discover active Airtime and Data plans.
GET https://gozietasks.name.ng/api/v1/plans?service=airtime&network=MTN Authorization: Bearer YOUR_TEST_API_KEY
Authentication
Private endpoints use a Bearer API key. Keys are stored as hashes and the complete secret is shown only when it is created.
Authorization: Bearer YOUR_GOZIETASKS_API_KEY Content-Type: application/json
Plans
Retrieve active plans configured by GozieTasks Admin. The response includes the plan ID you can use for a purchase.
/api/v1/plans| Parameter | Type | Description |
|---|---|---|
| service | string | airtime or data |
| network | string | Optional network filter such as MTN |
{
"success": true,
"data": {
"plans": [{
"id": 1,
"service": "airtime",
"network": "MTN",
"selling_price": 500
}]
}
}Airtime purchase
Purchase an active Airtime plan using the API account balance. Use an idempotency key generated by your own system for each order.
/api/v1/airtime/purchasePOST https://gozietasks.name.ng/api/v1/airtime/purchase Authorization: Bearer YOUR_API_KEY Idempotency-Key: ORDER-10001 Content-Type: application/json { "plan_id": 1, "phone": "+2348012345678" }
Data purchase
/api/v1/data/purchasePOST https://gozietasks.name.ng/api/v1/data/purchase Authorization: Bearer YOUR_API_KEY Idempotency-Key: ORDER-10002 { "plan_id": 8, "phone": "+2348012345678" }
Transaction status
/api/v1/transactions/{reference}Use the returned transaction reference to check processing, success, failure or reversal.
GET https://gozietasks.name.ng/api/v1/transactions/API-REFERENCE Authorization: Bearer YOUR_API_KEY
Errors
| HTTP | Meaning | Typical action |
|---|---|---|
| 400 | Invalid request | Check parameters and JSON. |
| 401 | Authentication failed | Check the API key. |
| 403 | Access denied | Check key status, mode or IP restrictions. |
| 429 | Rate limit exceeded | Wait and retry according to your limit. |
| 500 | Server/provider error | Check transaction status before retrying. |
