Running a Virtual Top-Up (VTU) business successfully in Nigeria goes beyond just having a website — automation is the key. If you’ve ever struggled with manually processing MTN data orders or updating your customers’ wallets, then it’s time to take your business to the next level.
With the Inlomax API, you can integrate MTN Data directly into your website, app, or software, allowing your customers to buy data instantly and automatically. Whether you’re a reseller, developer, or business owner, integrating MTN Data API through Inlomax gives you speed, efficiency, and control over your digital services.
In this article, you’ll learn everything you need to know — from getting your Inlomax API key, to coding the integration, and handling API responses.
Let’s dive in.
What is Inlomax API?
Inlomax API is a developer-friendly interface that allows you to connect your VTU platform to Inlomax’s powerful backend services. Through this API, you can automate the sale of:
- Data bundles (MTN, GLO, Airtel, 9mobile)
- Airtime top-up
- Cable TV subscriptions
- Electricity bill payments
- Exam pins and other digital products
The API enables real-time transactions, instant responses, and complete integration flexibility. In simpler terms, it’s what powers smart VTU platforms that run automatically 24/7 without manual work.
Why You Should Integrate MTN Data API Using Inlomax
If you’re building a VTU website or mobile app, integrating directly with Inlomax API comes with many advantages:
- Instant Data Delivery – Once a user buys data, the API handles the purchase automatically within seconds.
- Better Profit Margin – Inlomax offers competitive reseller prices, letting you earn more per data sale.
- Seamless Automation – No more manual entries; everything runs automatically through API endpoints.
- Secure Transactions – Every request is authenticated using API keys and tokens for maximum security.
- Scalable Solution – As your business grows, you can easily add more features and network APIs.
- Transaction Reports – You can track every transaction and response for monitoring and debugging.
Requirements Before You Begin
Before integrating MTN Data API using Inlomax, ensure you have the following ready:
- An Inlomax Account – Register at Inlomax.com.
- API Access Enabled – Log into your dashboard and get your API key under Developer Settings.
- A Working Website or App – You should already have your VTU platform (built with PHP, Python, Node.js, or any backend language).
- Basic Programming Knowledge – Understanding REST APIs, JSON responses, and HTTP requests.
- Internet Connection & Testing Environment – Use Postman or your local server for API testing.
Step 1: Get Your Inlomax API Key
Once logged into your Inlomax account, navigate to:
Dashboard → Developers
There, you’ll find your API Key.
Keep them private — they are your authentication credentials.
Example:
API Key: eyJhbGciOiJIUzI1NiIsInR...
You’ll use this key in your header when sending requests to the API.
Step 2: Understand the MTN Data API Endpoint
To integrate MTN data, Inlomax provides an endpoint like this:
POST https://inlomax.com/api/data
You’ll need to pass the following parameters in your request:
| Parameter | Description | Example |
|---|---|---|
| The recipient’s phone number | 08031234567 |
| The specific MTN data plan | 100 |
Header Example:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Step 3: Choose the Right MTN Data Plan
Inlomax provides a list of all available MTN data plans via a GET endpoint:
GET https://inlomax.com/api/services
This will return a JSON response like:
{
"status": "success",
"message": "Data plans fetched successfully",
"data": [
{
"serviceID":"35",
"network":"MTN",
"dataPlan":"500MB",
"amount":"300.00",
"dataType":"CORPORATE GIFTING",
"validity":"30 Days"
},
{
"serviceID":"23",
"network":"GLO",
"dataPlan":"1GB",
"amount":"500.00",
"dataType":"CORPORATE GIFTING",
"validity":"30 Days"
}
]
}
You can use these plan IDs in your integration form or database to allow customers to select MTN bundles.
Step 4: Example Integration Code (PHP)
Here’s how you can connect your VTU website to Inlomax API using PHP:
<?php
$apiUrl = "https://inlomax.com/api/data";
$apiKey = "YOUR_API_KEY"; // Replace with your Inlomax API key
$data = [
"serviceID" => "100",
"mobileNumber" => "08031234567"
];
$headers = [
"Authorization: Bearer $apiKey",
"Content-Type: application/json"
];
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
This script sends a data purchase request to Inlomax’s server and displays the response.
Step 5: Handling API Response
The response from Inlomax API is usually in JSON format. Example:
{
"status": "success",
"message": "Dear Customer, You have successfully gifted 0903837261 with 1.0GB of Data. Thank you.",
"data": {
"type": "data",
"reference": "INL|NQJK56QVZVHHX34RJ5XTMDXLG",
"amount": 1000,
"dataPlan": "5GB",
"dataType": "SME",
"network": "MTN",
"status": "success"
}
}
If the status is “success”, the data has been sent successfully.
If it’s “failed”, you can retry or log the issue for support.
For web API responses, always store the response data in your database for recordkeeping and user reference.
Step 6: Building a Frontend Form for MTN Data Purchase
You can create a simple HTML form for customers to buy MTN data:
<form action="buy_data.php" method="POST">
<label>Phone Number:</label>
<input type="text" name="mobile_number" required>
<label>Select Plan:</label>
<select name="serviceID">
<option value="500">MTN 500MB - ₦120</option>
<option value="1000">MTN 1GB - ₦230</option>
</select>
<button type="submit">Buy Data</button>
</form>
This connects to your PHP integration file (buy_data.php), sending user inputs to the API for processing.
Step 7: Error Handling and Security
Always include checks for:
- Invalid phone numbers
- Insufficient balance
- Expired or invalid API keys
- Duplicate transaction references
Example PHP error handling:
if ($response->status == "failed") {
echo "Transaction failed: " . $response->message;
} else {
echo "Success! Data sent to " . $response->data->network;
}
🔐 Security Tips:
- Never expose your API key in frontend code.
- Use HTTPS for all requests.
- Validate user inputs before sending requests to API.
- Log all transactions for monitoring.
Step 8: Testing Your Integration
You can use Postman or cURL to test your endpoint before going live.
Start by testing small data plans to confirm that everything works fine.
Step 9: Going Live and Accepting Payments
After confirming that your MTN Data API works perfectly, connect your payment gateway.
You can use any of the following:
- Paystack
- Flutterwave
Once payment is successful, trigger your API endpoint to deliver data automatically.
Example flow:
User Pays → Payment Verified → Send API Request → Data Delivered → User Notified
Step 10: Monitoring Transactions and Wallet Balance
Use this endpoint to check your wallet balance:
GET https://inlomax.com/api/balance
Response:
{
"status":"success",
"message":"Wallet balance fetched successfully",
"data":{
"funds":2393
}
}
You can also log each transaction in your database for tracking and generate reports for your users.
Step 11: Troubleshooting Common Issues
| Issue | Possible Cause | Solution |
|---|---|---|
| Invalid API Key | Wrong key or expired | Regenerate from dashboard |
| Transaction Failed | Network downtime | Retry or contact support |
| Wrong Plan ID | Invalid ID | Use the correct plan from /data/plans |
| No Response | Missing headers | Ensure Content-Type and Authorization are set |
| Duplicate Ref | Using same ref twice | Always generate unique references |
Step 12: Tips to Boost Your VTU Business Using the API
Integrating MTN Data API is just the beginning — here’s how to maximize your profits:
- Add Referral System: Reward users who bring new customers.
- Create Mobile App: Make your VTU business accessible on Android.
- Offer Discounts: Run weekend or festive promo data deals.
- Content Marketing: Post blogs about “cheap MTN data” or “how to buy data online.”
- Use SEO and Social Media: Drive traffic from Facebook, WhatsApp, and Google.
- Automate User Wallets: Let users fund their wallets anytime with instant top-ups.
- Add Other Networks: Include Airtel, Glo, and 9mobile using the same Inlomax API structure.
Conclusion
Integrating MTN Data API using Inlomax is one of the smartest moves you can make as a VTU business owner or developer. It gives you automation, speed, and control — the three most essential things every digital entrepreneur needs.
Once you’ve set up your API integration, your business can handle hundreds or even thousands of transactions daily without you lifting a finger.
If you haven’t already, sign up on Inlomax.com today to get your API key and start building your own automated VTU platform.
With the Inlomax API, you’re not just selling data —
you’re building a scalable digital business.