How to Integrate Inlomax Data API to Automate Data Purchase (Full Guide for Developers)
If you’re building an app, website, or platform that allows users to buy data bundles automatically, the Inlomax API gives you a powerful, fast, and reliable way to make that possible.
In this post, we’ll show you how to use the Inlomax Data API endpoint to buy data directly from your code — with sample PHP integration and a real sample response.
Table of Contents
What Is Inlomax API?
The Inlomax API is a simple and secure way for developers, fintech startups, and VTU resellers to connect their apps or websites to the Inlomax system.
It allows you to perform automated actions like:
- Buying data and airtime
- Paying TV cable and electricity bills
- Checking account balances and transaction statuses
In this article, we’ll focus on the Data API endpoint — how to use it to buy data programmatically.
Introduction to the Data Endpoint
The Data Endpoint lets you send a POST request with a few parameters (your API key, service ID, and phone number) to purchase a data bundle instantly.
This is useful if you run:
- A data reselling website
- A mobile app for top-ups
- A billing system or automation platform
API Endpoint: Buy Data
Endpoint:
POST https://inlomax.com/api/data
Headers:
Authorization: Token YOUR_API_KEY
Content-Type: application/json
Request Body Example:
{
  "serviceID" : "100",
  "mobileNumber" : "0903837261"
}
Replace:
- YOUR_API_KEYwith your actual API key (found in your Inlomax Developer Dashboard)
- serviceIDwith the ID of the data plan you want to buy
- mobileNumberwith the recipient’s phone number
PHP Integration Example
Here’s how to integrate it using PHP and cURL:
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://inlomax.com/api/data',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "serviceID": "100",
    "mobileNumber": "0903837261"
  }',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Token YOUR_API_KEY',
    'Content-Type: application/json'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
This PHP code connects to the Inlomax API and sends a POST request to buy a data plan instantly.
Sample Response
When the API request is successful, you’ll get a JSON response like this:
{
  "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"
  }
}
Meaning:
- status— tells you if the request was successful
- message— confirmation message
- reference— unique transaction ID for tracking
- amount,- dataPlan, and- network— transaction details
Why Developers Love Inlomax API
- Fast delivery — instant response and fulfillment
- Secure — token-based authentication
- Easy integration — developer-friendly endpoints
- Multiple services — data, airtime, bills, TV, and more
- Detailed documentation — clear request and response structure
Conclusion
With the Inlomax API, you can automate data purchases, reduce manual work, and offer a smooth experience to your app or website users.
If you’re a developer, this is your chance to turn your platform into a VTU-powered system — capable of selling data and other digital services automatically.
👉 Get your API key now at Inlomax Developer Portal and start integrating today.