📘 API Documentation
Easily integrate game top-up services into your system using the LaoTopup API.
All requests must include api_key in the JSON body.
🌐 Base URL
All endpoints use the following base URL:
https://laotopup.com
🔑 Authentication
Every request must include api_key in the JSON body:
{
"api_key": "API-XXXXXXXX"
}
Obtain your api_key upon registration or from your profile page.
POST
/api/balance
Check your account balance.
Request
{
"api_key": "API-XXXXXXXX"
}
Response (Success)
{
"status": true,
"username": "john_doe",
"saldo": 150.50,
"spend": 200.00,
"role": "platinum"
}
Integration Code Examples
fetch('https://yourdomain.com/api/balance', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ api_key: 'API-XXXXXXXX' })
})
.then(res => res.json())
.then(data => console.log(data));
$data = ['api_key' => 'API-XXXXXXXX'];
$ch = curl_init('https://yourdomain.com/api/balance');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
url = "https://laotopup.com/api/balance"
data = {"api_key": "API-XXXXXXXX"}
response = requests.post(url, json=data)
print(response.json())
POST
/api/services
Retrieve the combined list of active game top-up services with prices adjusted according to your role.
Request
{
"api_key": "API-XXXXXXXX"
}
Response (Success)
{
"status": true,
"data": [
{
"product_name": "Mobile Legends 86 Diamond",
"category": "Games",
"layanan": "Mobile Legends",
"buyer_sku_code": "ml86",
"price": "10.00",
"status": "Available"
}
]
}
Integration Code Examples
fetch('https://yourdomain.com/api/services', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ api_key: 'API-XXXXXXXX' })
})
.then(res => res.json())
.then(data => console.log(data));
$data = ['api_key' => 'API-XXXXXXXX'];
$ch = curl_init('https://yourdomain.com/api/services');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
url = "https://laotopup.com/api/services"
data = {"api_key": "API-XXXXXXXX"}
response = requests.post(url, json=data)
print(response.json())
POST
/api/order
Place a game top-up order.
Request
{
"api_key": "API-XXXXXXXX",
"buyer_sku_code": "ml100",
"customer_id": "1234567890",
"zone_id": "optional_zone_id_for_games_like_genshin_impact",
"slug": "required_for_products (opsional tergantung produk)"
}
zone_id is optional and required only for games that need it (e.g., Genshin Impact). slug is required for products.
Response (Success)
{
"status": true,
"message": "Order successfully created",
"order_id": "ORDER-123456789",
"produk": "Mobile Legends 100 Diamond",
"harga": 12.50,
"customer_no": "1234567890",
"status_transaksi": "Pending"
}
Integration Code Examples
fetch('https://yourdomain.com/api/order', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
api_key: 'API-XXXXXXXX',
buyer_sku_code: 'ml100',
customer_id: '1234567890',
zone_id: 'optional_zone_id_for_games_like_genshin_impact',
slug: 'required_for_synn_products'
})
})
.then(res => res.json())
.then(data => console.log(data));
$data = [
'api_key' => 'API-XXXXXXXX',
'buyer_sku_code' => 'ml100',
'customer_id' => '1234567890',
'zone_id' => 'optional_zone_id_for_games_like_genshin_impact',
'slug' => 'required_for_synn_products'
];
$ch = curl_init('https://yourdomain.com/api/order');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
url = "https://laotopup.com/api/order"
data = {
"api_key": "API-XXXXXXXX",
"buyer_sku_code": "ml100",
"customer_id": "1234567890",
"zone_id": "optional_zone_id_for_games_like_genshin_impact",
"slug": "required_for_synn_products"
}
response = requests.post(url, json=data)
print(response.json())
POST
/api/status
Check the status of a transaction by order_id (internal order ID).
Request
{
"api_key": "API-XXXXXXXX",
"order_id": "ORDER-123456789"
}
Response (Success)
{
"status": true,
"data": {
"order_id": "ORDER-123456789",
"status": "Success",
"status_readable": "✅ Transaction Successful",
"message": "Transaction completed",
"sn": "ML123456789"
}
}
Integration Code Examples
fetch('https://yourdomain.com/api/status', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
api_key: 'API-XXXXXXXX',
order_id: 'ORDER-123456789'
})
})
.then(res => res.json())
.then(data => console.log(data));
$data = [
'api_key' => 'API-XXXXXXXX',
'order_id' => 'ORDER-123456789'
];
$ch = curl_init('https://yourdomain.com/api/status');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
url = "https://laotopup.com/api/status"
data = {
"api_key": "API-XXXXXXXX",
"order_id": "ORDER-123456789"
}
response = requests.post(url, json=data)
print(response.json())
POST
/api/history
View your transaction history.
Request
{
"api_key": "API-XXXXXXXX"
}
Response (Success)
{
"status": true,
"history": [
{
"invoice": "ORDER-123456789",
"service_id": "ml100",
"target": "1234567890",
"harga": 12.50,
"status": "Success",
"created_at": "Monday, 01 January 2025 12:00:00"
}
]
}
Integration Code Examples
fetch('https://yourdomain.com/api/history', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ api_key: 'API-XXXXXXXX' })
})
.then(res => res.json())
.then(data => console.log(data));
$data = ['api_key' => 'API-XXXXXXXX'];
$ch = curl_init('https://yourdomain.com/api/history');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests
url = "https://laotopup.com/api/history"
data = {"api_key": "API-XXXXXXXX"}
response = requests.post(url, json=data)
print(response.json())
⚠️ Important Notes
- All prices are in RM (Malaysian Ringgit).
- Failed transactions will be automatically refunded to your balance.
- IP Whitelist can be configured on your profile page for additional security.