Z
ZulTopup

Dokumentasi Reseller API

Bangun toko topup-mu sendiri dengan API kami. Otomatis order ke provider tanpa perlu manual.

Autentikasi

Setiap request (selain register/login) butuh API key. Kirim via query ?apikey=YOUR_KEY atau header X-API-Key.

API key didapat dari daftar reseller lalu copy dari Dashboard.

POST https://chestcloudx.my.id/api/auth/register PUBLIC

Daftar reseller baru

Body / Query

{"username":"toko_a","name":"Toko A","email":"a@x.com","password":"rahasia"}

Response

{"status":true,"data":{"user_id":"toko_a","api_key":"xxxx..."}}
POST https://chestcloudx.my.id/api/auth/login PUBLIC

Login dapatkan API key

Body / Query

{"user_id":"toko_a","password":"rahasia"}

Response

{"status":true,"data":{"api_key":"xxxx...","balance":0}}
GET https://chestcloudx.my.id/api/user/me 🔒 apikey

Info akun & saldo

Body / Query

—

Response

{"status":true,"data":{"user_id":"toko_a","balance":50000,"role":"reseller"}}
POST https://chestcloudx.my.id/api/user/regenerate-key 🔒 apikey

Generate API key baru

Body / Query

—

Response

{"status":true,"data":{"api_key":"yyyy..."}}
GET https://chestcloudx.my.id/api/services 🔒 apikey

List semua layanan + harga reseller. Filter: ?tipe=Games

Body / Query

—

Response

{"status":true,"data":{"Games":[{"sid":"1","kategori":"Free Fire","layanan":"70 Diamond","harga":"10000","status":"Normal"}]}}
POST https://chestcloudx.my.id/api/order/create 🔒 apikey

Mode A — Saldo: order langsung dari saldo reseller (potong saldo).

Body / Query

{"layanan":"1","target":"123456789","nometer":"opsional"}

Response

{"status":true,"data":{"id":"55","invoice":"INV-...","pesan":"Pesanan berhasil dibuat dan sedang diproses."}}
POST https://chestcloudx.my.id/api/order/create 🔒 apikey

Mode B — Dropship / Tanpa Modal: customer kamu yang bayar QRIS, profit auto-credit ke saldo profit.

Body / Query

{"layanan":"1","target":"123456789","selling_price":12000,"customer_name":"Budi","customer_phone":"08123"}

Response

{"status":true,"data":{"id":"55","invoice":"INV-...","mode":"dropship","selling_price":12000,"reseller_cost":11200,"reseller_profit":800,"payment":{"qr_url":"https://...","amount":12000,"expired_at":"...","status_url":"...","invoice_url":"..."}}}
GET https://chestcloudx.my.id/api/order/status?id=55 🔒 apikey

Cek status pesanan

Body / Query

—

Response

{"status":true,"data":{"id":"55","status":"Success","catatan":"SN: ABC123"}}
POST https://chestcloudx.my.id/api/payment/deposit 🔒 apikey

Topup saldo via QRIS

Body / Query

{"amount":50000,"fee":0}

Response

{"status":"success","data":{"orderId":"DEP-...","amountToPay":50000,"qrCodeUrl":"https://...","expiryTime":"..."}}
GET https://chestcloudx.my.id/api/payment/status/{orderId} 🔒 apikey

Cek status deposit

Body / Query

—

Response

{"orderId":"DEP-...","status":"settlement","amount":50000}
GET https://chestcloudx.my.id/api/payment/history 🔒 apikey

Riwayat deposit

Body / Query

—

Response

{"status":"success","data":[{"orderId":"DEP-...","amount":50000,"status":"settlement"}]}

Mode Dropship / Tanpa Modal

Kamu nggak perlu topup saldo dulu. Kirim selling_price = harga jual ke customer kamu (≥ harga reseller). Sistem balas QRIS — customer bayar — kami forward ke provider — selisih (selling_price − cost) auto-credit ke saldo profit kamu.

curl -X POST "https://chestcloudx.my.id/api/order/create" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "layanan":"1",
    "target":"123456789",
    "selling_price":12000,
    "customer_name":"Budi",
    "customer_phone":"081234567890"
  }'

Tarik profit di Dashboard → menu "Tarik Profit". Admin yang transfer manual ke rekening / e-wallet kamu.

Mode Saldo (lama — kalau kamu mau pre-fund)

curl -X POST "https://chestcloudx.my.id/api/order/create?apikey=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"layanan":"1","target":"123456789"}'

Contoh: Cek Status (PHP)

$ch = curl_init("https://chestcloudx.my.id/api/order/status?apikey=YOUR_API_KEY&id=55");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = json_decode(curl_exec($ch), true);
echo $result['data']['status']; // Success / Pending / Error

Catatan Penting

  • Mode Saldo: order langsung memotong saldo. Kalau provider gagal, otomatis di-refund ke saldo.
  • Mode Dropship: customer kamu yang bayar QRIS. Profit (selling_price − price_reseller) auto-credit ke saldo profit setelah provider sukses. Kalau customer tidak bayar dalam batas waktu, transaksi dibatalkan tanpa biaya.
  • selling_price harus ≥ price_reseller dari endpoint /services. Tolong cek harga reseller dulu sebelum quote ke customer kamu.
  • Status order: Pending, Success, Error/Gagal. Untuk dropship, ada juga payment_status: pending, settlement, expired.
  • Anti double-order: pesanan dengan layanan + target sama dalam status pending akan ditolak.
  • Rate limit: 60 req/menit per API key, 5–10/menit untuk endpoint auth.
  • Penarikan profit dilakukan via Dashboard Reseller → Tarik Profit. Admin akan transfer manual ke rekening / e-wallet kamu.