📶 Data API (VTU)
Purchase data bundles for any Nigerian mobile network. Choose from various plans with different data sizes and validity periods.
⚡ Quick Overview
POST
/devapi/v1/data
Multiple Plans
Daily, weekly, monthly data options
Discounts Available
Get discounts on data purchases
All Networks
MTN, Airtel, Glo, 9mobile, Smile
⚠️ Important: Get Variations First!
Before You Buy Data
Unlike airtime, you need to specify a
variation_id for data purchases.
First, call the variations endpoint to get available data plans and their IDs.
Step 1: Get Available Data Plans
GET
/devapi/v1/variations?product=data&service_id=mtn
cURL - Get MTN Data Plans
curl -X GET "https://iacafe.com.ng/devapi/v1/variations?product=data&service_id=mtn" \ -H "Authorization: Bearer YOUR_API_KEY"
Response - Data Plans
{
"code": "success",
"message": "MTN Variations Retrieved",
"product": "Data",
"data": [
{
"variation_id": "244542",
"name": "500MB - 30 Days",
"price": "150"
},
{
"variation_id": "244543",
"name": "1GB - 30 Days",
"price": "300"
},
{
"variation_id": "244544",
"name": "2GB - 30 Days",
"price": "500"
}
]
}
📋 Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request_id |
string | Yes | Your unique transaction ID |
phone |
string | Yes | Phone number to receive data (11-16 digits) |
service_id |
string | Yes | Network: mtn, airtel, glo, 9mobile, smile |
variation_id |
string | Yes | The plan ID from variations endpoint |
No Amount Needed!
You don't need to send an
amount parameter.
The price is automatically determined by the variation_id.
💻 Code Example
cURL - Buy 2GB MTN Data
curl -X POST "https://iacafe.com.ng/devapi/v1/data" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_id": "data_mtn_1704067200_xyz789",
"phone": "08012345678",
"service_id": "mtn",
"variation_id": "244544"
}'
📤 Response Examples
200 OK Success Response
Completed Order
{
"code": "success",
"message": "ORDER COMPLETED",
"data": {
"product_name": "Data",
"service_name": "MTN",
"status": "completed-api",
"order_id": 355961,
"phone": "08012345678",
"variation_id": "244544",
"plan_name": "2GB - 30 Days",
"quantity": 1,
"amount": "500.00",
"discount": "10.00",
"amount_charged": "490.00",
"request_id": "data_mtn_1704067200_xyz789"
}
}
400 Invalid Variation ID
Error Response
{
"success": false,
"error": {
"code": "invalid_variation_id",
"message": "Invalid variation_id or price not found"
}
}