Developed Documentation
Integrate our services into your application seamlessly.
Base URL
https://api.nata.ng/api
🤖 Generate Code with AI
Want to integrate instantly? Copy this prompt and paste it into ChatGPT, Claude, Gemini, or Grok. The AI will instantly write the complete, working integration code for your specific programming language.
You are an expert backend developer. I need to integrate the Nata VTU API into my application.
Please write the integration code in [INSERT YOUR LANGUAGE/FRAMEWORK HERE, e.g. PHP/Laravel, Node.js, Python, etc].
Here are the API specifications:
- Base URL: https://api.nata.ng/api
- Authentication: All requests must include the HTTP header: `apikey: MY_API_KEY`
- Content-Type: application/json
Endpoints:
1. Check Balance
- GET /user
- Returns my balance and account details.
2. Get Data Plans
- GET /data-plans
3. Buy Data
- POST /buy-data
- Body Parameters: plan_id (int), category (string), phone (11-digit string), reference (unique string, 6-12 chars)
4. Buy Airtime
- POST /buy-airtime
- Body Parameters: network (15 for MTN, 6 for GLO, 1 for AIRTEL, 2 for 9MOBILE), amount (numeric, min 50), phone (11-digit string), reference (unique string, 6-12 chars)
5. Get Education Pin Prices
- GET /education
- Returns the exam bodies (waec, neco) and their prices.
6. Buy Education Pin (WAEC / NECO result checker)
- POST /buy-education
- Body Parameters: type ("waec" or "neco"), reference (unique string, 6-12 chars, letters, numbers, - and _ only)
- HTTP 200 with status "success": the pin (and serial for WAEC) is in data.pin and data.serial.
- HTTP 202 with status "pending": poll GET /transactions/{reference} until status is "completed" (pin included) or starts with "refunded".
7. Check Transaction Status
- GET /transactions/{reference}
Requirements:
- Create a reusable API Client/Service class.
- Include methods for: checking balance, fetching data plans, buying data, buying airtime, fetching education prices, and buying education pins.
- Handle HTTP errors gracefully.
Authentication
Authenticate your requests by including your API key in the header.
Heading: apikey Value: YOUR_API_KEY
User Details
Retrieve your account details and current balance.
/user
{
"data": {
"name": "John Doe",
"username": "johndoe1",
"email": "[email protected]",
"balance": 5000.00,
...
}
}
Data Plans
Fetch available data plans. You can optionally filter by category.
/data-plans
Query Params:
category(optional): Filter plans (e.g., mtn_sme, glo, airtel_gifting).
{
"success": true,
"data": [
{
"network": "mtn",
"name": "MTN",
"bundle": [
{
"plan_id": 50,
"category": "mtn_sme",
"price": 270.00,
"name": "1GB - 30 days"
}
]
}
]
}
Airtime List
Get the list of network IDs for airtime purchase.
/airtime
{
"success": true,
"data": [
{
"network": 15,
"name": "MTN airtime VTU"
},
...
]
}
Education List
Get the exam bodies you can buy result checker pins for, and the current price of each. Use the type value when purchasing.
/education
{
"success": true,
"data": [
{
"type": "waec",
"name": "WAEC Result Checker PIN",
"price": 3570
},
{
"type": "neco",
"name": "NECO Result Checker PIN",
"price": 1365
}
]
}
Prices shown are examples. Always read the live price from this endpoint.
Purchase Data
Initiate a data purchase transaction.
/buy-data
| Body Parameter | Type | Description |
|---|---|---|
| plan_id | Integer | ID of the plan (get from /data-plans) |
| category | String | Plan category (get from /data-plans) |
| phone | String | 11 Digit Phone Number |
| reference | String | Unique Ref (6-12 chars). Must be unique to you. |
{
"status": "success",
"message": "Data purchase initiated successfully."
}
Purchase Airtime
Initiate an airtime purchase transaction.
/buy-airtime
| Body Parameter | Type | Description |
|---|---|---|
| network | Integer | Network ID (15:MTN, 6:GLO, 1:AIRTEL, 2:9MOBILE) |
| amount | Numeric | Amount to purchase (Min: 50) |
| phone | String | 11 Digit Phone Number |
| reference | String | Unique Ref (6-12 chars). Must be unique. |
{
"status": "success",
"message": "Airtime purchase initiated successfully"
}
Purchase Education Pin
Buy one WAEC or NECO result checker pin. The price from /education is debited from your balance and the pin is returned in the response.
/buy-education
| Body Parameter | Type | Description |
|---|---|---|
| type | String | waec or neco (get from /education) |
| reference | String | Unique Ref (6-12 chars; letters, numbers, - and _). Must be unique. |
Success (HTTP 200). serial is only set for WAEC:
{
"status": "success",
"message": "WAEC pin purchased successfully.",
"data": {
"reference": "YOUR_REF",
"type": "education",
"status": "completed",
"amount": 3570,
"description": "Education Pin Purchase: WAEC",
"network": "WAEC",
"phone": null,
"previous_balance": "10000.00",
"current_balance": "6430.00",
"pin": "123456789012",
"serial": "WRN123456789",
"created_at": "2026-10-13T12:00:00.000000Z"
}
}
Pending (HTTP 202): the supplier did not confirm in time. Your balance stays debited while we keep checking. Poll /transactions/{reference} until status is completed (pin included) or starts with refunded (money returned).
{
"status": "pending",
"message": "Purchase is processing. Check GET /transactions/YOUR_REF for the pin.",
"data": { "reference": "YOUR_REF", "status": "pending", ... }
}
Errors. The amount is never kept on a failed purchase:
| HTTP | When |
|---|---|
| 422 | Invalid type, or reference missing, malformed or already used. Nothing is debited. |
| 400 | Insufficient balance. (nothing debited), or the purchase failed / pins are out of stock (amount refunded to your balance immediately). |
| 503 | Education pins are temporarily unavailable. Nothing is debited. |
{
"status": "error",
"message": "WAEC pins are out of stock, try again later. Your wallet has been refunded."
}
Transaction History
Fetch your latest 20 transactions.
/transactions
Check Transaction Status
Check the status of a specific transaction by passing your unique reference.
/transactions/{reference}
{
"status": "success",
"data": {
"reference": "YOUR_REF",
"status": "completed",
"amount": 500.00,
...
}
}