MENU navbar-image

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
    }
}
 

Request      

GET api/v1/profile

Headers

Authorization        

Example: Bearer {your_api_key}

Content-Type        

Example: application/json

Accept        

Example: application/json

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
        }
    ]
}
 

Request      

GET api/v1/products

Headers

Authorization        

Example: Bearer {your_api_key}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

category   string  optional    

Slug kategori. Contoh: mobile-legends-indonesia Example: consequatur

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"
}
 

Request      

GET api/v1/products/{code}

Headers

Authorization        

Example: Bearer {your_api_key}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

code   string     

Kode produk. Contoh: MLID5 Example: consequatur

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"
}
 

Request      

POST api/v1/order

Headers

Authorization        

Example: Bearer {your_api_key}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

product_code   string     

Kode produk etalase. Contoh: MLID5 Example: consequatur

target   string     

ID game target. Contoh: 938572270 Example: consequatur

server_id   string  optional    

optional Server ID (untuk game yang membutuhkan). Contoh: 12729 Example: consequatur

trx_id   string     

ID transaksi unik dari sistem kamu. Contoh: ORDER-001 Example: consequatur

callback_url   string  optional    

optional URL callback yang akan kami hit setelah transaksi selesai. Contoh: https://your-website.com/callback Example: http://kunze.biz/iste-laborum-eius-est-dolor.html

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"
    }
}
 

Request      

GET api/v1/order/{trx_id}

Headers

Authorization        

Example: Bearer {your_api_key}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

trx_id   string     

Trx ID yang dikirim saat order. Contoh: ORDER-001 Example: consequatur

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