Dokumentasi

API Kaep Store

Cek saldo, beli produk otomatis (auto buy), dan ambil token akun (refresh token) dari script atau bot kamu sendiri. Saldo, stok, dan harga sama persis dengan website & bot Discord.

Mulai cepat

  1. 1

    Bikin API key

    Login, buka Akun → API & Auto Buy, klik Buat API key, lalu Salin. Lupa key? Salin lagi kapan aja dari halaman itu.

  2. 2

    Taruh key di header

    Setiap request wajib bawa header X-API-Key berisi key kamu.

  3. 3

    Coba cek saldo

    Kalau jawabannya "ok": true, berarti udah nyambung.

curl https://kaepstore.site/api/v1/balance -H "X-API-Key: API_KEY_KAMU"

Dasar

Alamat APIhttps://kaepstore.site/api/v1
LoginHeader X-API-Key: kaep_… (bisa juga Authorization: Bearer kaep_…)
Kirim dataJSON, pakai header Content-Type: application/json
Metode bayar"wl" = saldo World Lock, "rp" = saldo Rupiah

Semua jawaban formatnya sama. Cek ok dulu: kalau true datanya ada di data, kalau false alasannya ada di error.

Contoh respons
{
  "ok": true,
  "data": { "...": "..." }
}
Contoh respons
{
  "ok": false,
  "error": {
    "code": "OUT_OF_STOCK",
    "message": "Stok tidak cukup! Tersisa: 3"
  }
}

Contoh JavaScript buat Node.js 18 ke atas (simpan sebagai file .mjs). Contoh Python butuh pip install requests. Contoh curl buat Linux, macOS, atau Git Bash di Windows.

GET/balanceCek saldo

Saldo World Lock & Rupiah kamu, sama dengan yang ada di website dan bot Discord.

curl https://kaepstore.site/api/v1/balance -H "X-API-Key: API_KEY_KAMU"
Contoh respons
{
  "ok": true,
  "data": {
    "discord_id": "1190606903911403650",
    "growid": "KaepGT",
    "balance": { "wl": 500, "rp": 33950 },
    "total_deposit": { "wl": 1200, "rp": 35000 }
  }
}
GET/productsDaftar produk

Semua produk beserta stok & harga. Mau 1 produk aja? Pakai /products/{kode}, misalnya /products/JAMAL.

  • price = harga per item, udah termasuk diskon. null = gak bisa dibeli pakai saldo itu.
  • bulk = harga grosir: harga per item kalau beli minimal min_qty dalam 1 pesanan. null = sama kayak harga biasa.
curl https://kaepstore.site/api/v1/products -H "X-API-Key: API_KEY_KAMU"
Contoh respons
{
  "ok": true,
  "data": [
    {
      "code": "CID",
      "name": "CID Growtopia Fresh",
      "type": "item",
      "stock": 34,
      "sold": 93,
      "price": { "wl": 3, "rp": 250 },
      "discount_percent": 0,
      "bulk": [
        { "min_qty": 300, "wl": null, "rp": 200 },
        { "min_qty": 1000, "wl": 2, "rp": 150 }
      ]
    }
  ]
}
GET/quoteHitung harga

Hitung total persis kayak waktu beli (udah termasuk harga grosir & diskon), tanpa beli beneran.

ParameterWajibKeterangan
codeYaKode produk
qtyYaJumlah
methodTidakwl (default) atau rp
curl "https://kaepstore.site/api/v1/quote?code=JAMAL&qty=300&method=wl" -H "X-API-Key: API_KEY_KAMU"
Contoh respons
{
  "ok": true,
  "data": {
    "code": "CID",
    "qty": 300,
    "method": "wl",
    "unit_price": 3,
    "total": 900,
    "bulk_tier": null,
    "stock": 34,
    "enough_stock": false
  }
}
POST/buyBeli produk

Beli pakai saldo kamu. Isi produk langsung ada di jawaban (items), juga masuk ke halaman Pesanan dan dikirim bot ke DM Discord, sama kayak beli di website.

Data (JSON)WajibKeterangan
codeYaKode produk, lihat /products
qtyYaJumlah, 1 sampai 10.000
methodYa"wl" = saldo World Lock, "rp" = saldo Rupiah
max_totalTidakBatas total. Kalau harga sekarang lebih mahal dari ini, gak jadi beli (error PRICE_CHANGED). Bagus buat auto buy.
Header Idempotency-Key (sangat disarankan): isi kode unik per pembelian, bebas, maks 64 karakter (misal beli-cid-001). Kalau koneksi putus sebelum dapat jawaban, kirim ulang request yang sama persis dengan key yang sama: kalau tadi udah kebeli, kamu dapet pesanan yang sama ("replayed": true), gak kebeli 2 kali.
curl -X POST https://kaepstore.site/api/v1/buy \
  -H "X-API-Key: API_KEY_KAMU" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: beli-cid-001" \
  -d '{"code": "JAMAL", "qty": 2, "method": "wl", "max_total": 10}'
Contoh respons
{
  "ok": true,
  "data": {
    "order_no": 1525,
    "code": "CID",
    "product": "CID Growtopia Fresh",
    "qty": 2,
    "method": "wl",
    "unit_price": 3,
    "total": 6,
    "source": "api",
    "created_at": "2026-10-27T21:22:05+07:00",
    "items": ["cid1:pass1", "cid2:pass2"],
    "discord_dm": true,
    "balance_after": 494
  }
}

Produk tipe item: 1 isi = 1 baris di items. Produk tipe script: seluruh isi script ada di items[0]. Kalau "ok": false, saldo kamu gak berkurang.

GET/ordersRiwayat & detail pesanan

/orders?limit=10 = pesanan terbaru (maks 50, tanpa isi produk). /orders/{nomor} = detail 1 pesanan lengkap dengan isinya, berguna buat ngambil ulang produk kalau tadi koneksi putus.

curl https://kaepstore.site/api/v1/orders/1525 -H "X-API-Key: API_KEY_KAMU"
POST/refreshRefresh token akun

Kirim daftar email, dapet token login terbaru tiap akun dari database akun, sama kayak tool Refresh Token di website. Cuma baca (read-only): gak login ke Growtopia dan gak ngubah apa pun.

Data (JSON)WajibKeterangan
emailsYaArray email (["[email protected]", "[email protected]"]), atau teks 1 email per baris. Baris format lama (email|…) juga bisa, emailnya diambil otomatis.
include_scriptTidaktrue = jawaban juga berisi script: script login Lucifer yang udah keisi semua hasil, tinggal tempel.

Tiap akun yang berhasil jadi 1 baris di success dengan format email|mac:rid:wk:token:platform. MAC juga pakai :, jadi ambil platform dari bagian paling belakang.

platformArtinya
0Windows
2macOS
1iOS
4Android
curl -X POST https://kaepstore.site/api/v1/refresh \
  -H "X-API-Key: API_KEY_KAMU" \
  -H "Content-Type: application/json" \
  -d '{"emails": ["[email protected]", "[email protected]"]}'
Contoh respons
{
  "ok": true,
  "data": {
    "total": 3,
    "counts": { "success": 2, "failed": 1 },
    "success": [
      "[email protected]|02:1A:2B:3C:4D:5E:8c1f0d2e9b7a4c3d5e6f708192a3b4c5:e3b0c44298fc1c149afbf4c8996fb924:TOKEN_AKUN_1:2",
      "[email protected]|02:6F:7A:8B:9C:0D:1b2c3d4e5f60718293a4b5c6d7e8f901:4a5b6c7d8e9f00112233445566778899:TOKEN_AKUN_2:0"
    ],
    "failed": ["[email protected]"],
    "platforms": { "macOS": 1, "Windows": 1 },
    "truncated": false
  }
}
  • failed = email yang gak ketemu, token kosong, datanya rusak, atau bukan email.
  • wk dibikin acak tiap request, jadi hasilnya beda-beda tiap kali dipanggil. Itu normal.
  • Script login bawaan (include_script) cuma login akun platform 0 & 2, akun platform lain di-skip.
  • truncated: true = email kebanyakan, yang diproses cuma 50,000 pertama. db_errors muncul kalau database akun lagi error, coba lagi bentar.

Contoh auto buy

Script ini ngecek stok tiap 30 detik. Begitu stok cukup, langsung beli (dengan max_total & Idempotency-Key biar aman), nampilin isi produknya, lalu berhenti. Tinggal ganti bagian paling atas.

// autobuy.mjs - jalanin: node autobuy.mjs
const API = 'https://kaepstore.site/api/v1';
const KEY = 'API_KEY_KAMU';
const CODE = 'JAMAL';   // kode produk
const QTY = 10;            // jumlah yang mau dibeli
const METHOD = 'wl';       // 'wl' = saldo World Lock, 'rp' = saldo Rupiah
const MAX_TOTAL = 50;      // batal kalau total lebih mahal dari ini
const CEK_TIAP = 30;       // cek stok tiap berapa detik

const sleep = (detik) => new Promise((r) => setTimeout(r, detik * 1000));

async function api(path, options = {}) {
  const res = await fetch(API + path, {
    ...options,
    headers: { 'X-API-Key': KEY, 'Content-Type': 'application/json', ...options.headers },
  });
  return res.json();
}

async function beli() {
  // 1 Idempotency-Key = 1 pembelian. Kalau koneksi putus, dikirim ulang pakai key yang SAMA (gak kebeli 2x).
  const idem = `autobuy-${CODE}-${Date.now()}`;
  for (let coba = 1; coba <= 3; coba++) {
    try {
      return await api('/buy', {
        method: 'POST',
        headers: { 'Idempotency-Key': idem },
        body: JSON.stringify({ code: CODE, qty: QTY, method: METHOD, max_total: MAX_TOTAL }),
      });
    } catch {
      console.log('Koneksi putus, kirim ulang...');
      await sleep(3);
    }
  }
  throw new Error('Gagal terus. Cek GET /orders dulu sebelum jalanin lagi.');
}

while (true) {
  let produk;
  try {
    produk = await api(`/products/${CODE}`);
  } catch {
    console.log('Koneksi error, coba lagi nanti...');
    await sleep(CEK_TIAP);
    continue;
  }
  if (!produk.ok) {
    console.log('Error:', produk.error.message);
    break;
  }

  if (produk.data.stock >= QTY) {
    const hasil = await beli();
    if (hasil.ok) {
      console.log(`Berhasil! Order #${hasil.data.order_no}, total ${hasil.data.total}`);
      console.log(hasil.data.items.join('\n'));
      break;
    }
    console.log('Belum bisa beli:', hasil.error.code, '-', hasil.error.message);
    if (['INSUFFICIENT_BALANCE', 'PRICE_CHANGED', 'UNAUTHORIZED'].includes(hasil.error.code)) break;
  } else {
    console.log(`Stok ${produk.data.stock}, nunggu restock...`);
  }
  await sleep(CEK_TIAP);
}

Kode error

Kalau "ok": false, baca error.code buat tahu harus ngapain.

error.codeHTTPArtinya & solusinya
UNAUTHORIZED401API key salah atau belum dikirim. Cek header X-API-Key, atau buat ulang key.
RATE_LIMITED429Kebanyakan request. Tunggu sesuai header Retry-After (detik).
INVALID_INPUT400Data request salah/kurang (code, qty, method, max_total, Idempotency-Key, emails), atau input refresh lebih dari 256 KB.
INVALID_QTY400qty harus 1 sampai 10.000.
INVALID_METHOD400method harus "wl" atau "rp".
PRODUCT_NOT_FOUND404Kode produk gak ada. Cek /products.
NOT_FOUND404Pesanan gak ada atau bukan punya kamu.
OUT_OF_STOCK422Stok kurang. Tunggu restock.
INSUFFICIENT_BALANCE422Saldo kurang. Isi saldo dulu.
PRICE_CHANGED422Total sekarang lebih mahal dari max_total kamu. Cek harga lagi (/quote).
PRICE_NOT_SET422Harga produk buat metode itu belum di-set owner. Coba metode lain.
NOT_REGISTERED422Akun belum isi GrowID. Isi dulu di website.
IN_PROGRESS409Idempotency-Key yang sama lagi diproses / statusnya gak pasti. Cek /orders dulu, baru coba lagi pakai key baru.
MAINTENANCE503Toko lagi maintenance. Coba lagi nanti.
API_DISABLED403API lagi dimatiin owner.
REFRESH_DISABLED403Refresh token lagi dimatiin owner (database akun belum di-set).
SERVER_ERROR500Ada error di server. Cek /orders dulu sebelum coba beli lagi.

Batasan & keamanan

  • Maksimal 60 request/menit per key, khusus beli maksimal 20/menit, khusus refresh token maksimal 15/menit. Buat auto buy, cek stok tiap 15–30 detik udah cukup.
  • Refresh token maksimal 256 KB per request. Lebih dari itu, pecah jadi beberapa request.
  • Maksimal 10.000 pcs per pesanan. Harga & diskon sama dengan website.
  • Pembelian lewat API dapat DM & role Discord sama kayak beli di website, dan muncul di halaman Pesanan dengan sumber API.
  • API key = akses ke saldo kamu. Jangan dibagi, jangan di-upload ke GitHub atau tempat publik. Kalau bocor, buat ulang key: key lama langsung gak berlaku.