Selamat datang di ZoneGame API
Base URL: https://api.zonegame.store
Autentikasi: Semua request wajib menyertakan API key di header:
Authorization: Bearer {your_api_key}
Hubungi admin untuk mendapatkan API key.
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {your_api_key}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Dapatkan API key dari admin.
Profile
Info Akun Mendapatkan informasi akun dan saldo user.
requires authentication
Example request:
curl --request GET \
--get "https://api.zonegame.store/api/v1/profile" \
--header "Authorization: Bearer {your_api_key}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.zonegame.store/api/v1/profile"
);
const headers = {
"Authorization": "Bearer {your_api_key}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"success": true,
"data": {
"name": "John Doe",
"email": "john@example.com",
"phone": "08123456789",
"tier": "member",
"balance": 50000
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Products
List Produk Mendapatkan semua produk yang tersedia beserta harga sesuai tier user.
requires authentication
Example request:
curl --request GET \
--get "https://api.zonegame.store/api/v1/products?category=consequatur" \
--header "Authorization: Bearer {your_api_key}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.zonegame.store/api/v1/products"
);
const params = {
"category": "consequatur",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {your_api_key}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"success": true,
"data": [
{
"code": "MLID5",
"name": "5 Diamond (5 + 1)",
"category": "Mobile Legends : Indonesia",
"price": 1500
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Detail Produk Mendapatkan detail satu produk berdasarkan kode.
requires authentication
Example request:
curl --request GET \
--get "https://api.zonegame.store/api/v1/products/consequatur" \
--header "Authorization: Bearer {your_api_key}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.zonegame.store/api/v1/products/consequatur"
);
const headers = {
"Authorization": "Bearer {your_api_key}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"success": true,
"data": {
"code": "MLID5",
"name": "5 Diamond (5 + 1)",
"category": "Mobile Legends : Indonesia",
"price": 1500
}
}
Example response (404):
{
"success": false,
"message": "Produk tidak ditemukan"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Orders
Buat Order Membuat transaksi topup baru.
requires authentication
Example request:
curl --request POST \
"https://api.zonegame.store/api/v1/order" \
--header "Authorization: Bearer {your_api_key}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_code\": \"consequatur\",
\"target\": \"consequatur\",
\"server_id\": \"consequatur\",
\"trx_id\": \"consequatur\",
\"callback_url\": \"http:\\/\\/kunze.biz\\/iste-laborum-eius-est-dolor.html\"
}"
const url = new URL(
"https://api.zonegame.store/api/v1/order"
);
const headers = {
"Authorization": "Bearer {your_api_key}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_code": "consequatur",
"target": "consequatur",
"server_id": "consequatur",
"trx_id": "consequatur",
"callback_url": "http:\/\/kunze.biz\/iste-laborum-eius-est-dolor.html"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"message": "Order berhasil dibuat",
"invoice_id": "INV-XXXXXXXXXXXXX",
"trx_id": "ORDER-001",
"product": "5 Diamond (5 + 1)",
"target": "938572270",
"nickname": "Whyy",
"region": "ID",
"price": 1500,
"status": "pending"
}
Example response (400):
{
"success": false,
"message": "Saldo tidak cukup",
"balance": 1000,
"price": 1500
}
Example response (422):
{
"success": false,
"message": "USER_REGION_IS_NOT_BR",
"nickname": "Whyy",
"region": "ID"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cek Status Order Mengecek status transaksi berdasarkan trx_id.
requires authentication
Example request:
curl --request GET \
--get "https://api.zonegame.store/api/v1/order/consequatur" \
--header "Authorization: Bearer {your_api_key}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.zonegame.store/api/v1/order/consequatur"
);
const headers = {
"Authorization": "Bearer {your_api_key}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"success": true,
"data": {
"invoice_id": "INV-XXXXXXXXXXXXX",
"trx_id": "ORDER-001",
"product": "5 Diamond (5 + 1)",
"target": "938572270",
"server_id": "12729",
"price": 1500,
"status": "success",
"serial_number": "Whyy . RefId: DGG-XXXX",
"created_at": "2026-03-19T15:00:00.000000Z"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Callback API
Setelah transaksi selesai, kami kirim POST request ke callback_url yang kamu berikan saat order.
Endpoint Callback Kamu
POST https://your-website.com/callback
Data yang Dikirim
{
"invoice_number": "INV-XXXXXXXXXXXXX",
"trx_id": "ORDER-001",
"response_note": "Whyy . RefId: DGG-XXXXX",
"category": {
"title": "Mobile Legends : Indonesia",
"subtitle": null,
"type": "game"
},
"product": {
"name": "5 Diamond (5 + 1)",
"code": "MLID5",
"price": 1500
},
"user_input": {
"user_id": "938572270",
"server_id": "12729",
"nickname": null
},
"balance": 50000,
"amount": 1500,
"status": "SUCCESS",
"voucher": null,
"created_at": 1729926123
}
Header Signature
Setiap callback dilengkapi header x-signature (HMAC-SHA256 dengan API key sebagai secret):
// Generate signature (Node.js)
const { createHmac } = require('crypto')
const signature = createHmac('sha256', apiKey)
.update(JSON.stringify(payload))
.digest('hex')
// Verifikasi signature (PHP)
$expected = hash_hmac('sha256', file_get_contents('php://input'), $apiKey);
$valid = hash_equals($expected, $request->header('x-signature'));
Status
| Status | Keterangan |
|---|---|
SUCCESS |
Transaksi berhasil diproses |
FAILED |
Transaksi gagal |