Smile Data API
Purchase Smile 4G LTE internet data bundles directly for your customers.
Fetch Smile Data Plans
Retrieve all available Smile 4G LTE data plans, prices, and plan IDs.
GET
https://suruleredatacom.com.ng/api/smile_plans
curl -X GET "https://suruleredatacom.com.ng/api/smile_plans" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json"
<?php
$url = 'https://suruleredatacom.com.ng/api/smile_plans';
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Token YOUR_API_KEY',
'Content-Type: application/json',
]
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
?>
const response = await fetch('https://suruleredatacom.com.ng/api/smile_plans', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
import requests
url = "https://suruleredatacom.com.ng/api/smile_plans"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
Response Example
[
{
"plan_id": 1,
"day": "30 Days",
"type": "Monthly",
"network": "Smile",
"datasize": "1.5GB",
"price": 1000
},
{
"plan_id": 2,
"day": "30 Days",
"type": "Monthly",
"network": "Smile",
"datasize": "3GB",
"price": 2000
}
]
Purchase Smile Data
Submit a request to purchase a Smile data subscription plan.
POST
https://suruleredatacom.com.ng/api/smile
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| plan | Integer | Required | The ID of the Smile data plan to purchase (e.g., 1, 2). |
| phone | String | Required | Smile account number or phone number attached to the account. |
| bypass | Boolean | Required | Set to true to skip strict number validation check. |
curl -X POST "https://suruleredatacom.com.ng/api/smile" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"plan": 1,
"phone": "08000000000",
"bypass": true
}'
<?php
$url = 'https://suruleredatacom.com.ng/api/smile';
$payload = [
'plan' => 1,
'phone' => '08000000000',
'bypass' => true
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_HTTPHEADER => [
'Authorization: Token YOUR_API_KEY',
'Content-Type: application/json',
]
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
?>
const response = await fetch('https://suruleredatacom.com.ng/api/smile', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
plan: 1,
phone: "08000000000",
bypass: true
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://suruleredatacom.com.ng/api/smile"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"plan": 1,
"phone": "08000000000",
"bypass": True
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
Response Example
{
"status": "success",
"message": "Smile data purchase successful",
"transref": "SMILE-982347293",
"amount": 3000
}