{"openapi":"3.0.3","info":{"title":"Limitz Store API Reseller","version":"2.0","description":"API untuk website, bot WhatsApp/Telegram, n8n, dan aplikasi lain.\n\n- Autentikasi: header `X-API-Key` (API key dari Pengaturan Akun).\n- Semua respons JSON: `{status, message, data}` atau `{status:false, message, error:{code}}`.\n- Order dibayar dari Saldo Akun, diproses asinkron; status final dikirim ke Callback URL (header `X-Signature` = HMAC-SHA256 body dengan API key) dan bisa dicek di `/status`.\n- Kirim `ref_id` unik per order: ref_id sama = pesanan yang sama (aman untuk retry).\n- Batas: 120 permintaan/menit, 30 order/menit, 30 cek ID/menit per akun.","contact":{"name":"Limitz Store","url":"https://limitzstore.com"}},"servers":[{"url":"https://limitzstore.com/api/v2"}],"security":[{"ApiKey":[]},{"Bearer":[]}],"tags":[{"name":"Akun"},{"name":"Katalog"},{"name":"Transaksi"}],"paths":{"/profile":{"get":{"operationId":"getProfile","summary":"Info akun","description":"Username, level, saldo, callback URL, whitelist IP, dan IP pemanggil.","parameters":[],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Profil"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"getProfilePost","summary":"Info akun","description":"Username, level, saldo, callback URL, whitelist IP, dan IP pemanggil.","parameters":[],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Profil"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/balance":{"get":{"operationId":"getBalance","summary":"Saldo","description":"Saldo akun saat ini (Rupiah).","parameters":[],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"type":"object","properties":{"balance":{"type":"integer","example":150000}}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"getBalancePost","summary":"Saldo","description":"Saldo akun saat ini (Rupiah).","parameters":[],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"type":"object","properties":{"balance":{"type":"integer","example":150000}}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/games":{"get":{"operationId":"listGames","summary":"Daftar game","description":"Game aktif yang bisa dipesan beserta kolom tujuan (fields) yang wajib diisi saat order.","parameters":[{"name":"q","in":"query","required":false,"description":"Cari nama/slug game","schema":{"type":"string"},"example":"mobile"}],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"listGamesPost","summary":"Daftar game","description":"Game aktif yang bisa dipesan beserta kolom tujuan (fields) yang wajib diisi saat order.","parameters":[{"name":"q","in":"query","required":false,"description":"Cari nama/slug game","schema":{"type":"string"},"example":"mobile"}],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/products":{"get":{"operationId":"listProducts","summary":"Daftar produk & harga","description":"Harga sudah mengikuti level akunmu. Hanya produk yang bisa dipesan lewat API.","parameters":[{"name":"game","in":"query","required":false,"description":"Slug, nama, atau id game","schema":{"type":"string"},"example":"mobile-legends"},{"name":"category","in":"query","required":false,"description":"Nama kategori produk","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Cari nama produk","schema":{"type":"string"},"example":"diamond"},{"name":"product_id","in":"query","required":false,"description":"Satu produk","schema":{"type":"integer"}}],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Produk"}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"listProductsPost","summary":"Daftar produk & harga","description":"Harga sudah mengikuti level akunmu. Hanya produk yang bisa dipesan lewat API.","parameters":[{"name":"game","in":"query","required":false,"description":"Slug, nama, atau id game","schema":{"type":"string"},"example":"mobile-legends"},{"name":"category","in":"query","required":false,"description":"Nama kategori produk","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Cari nama produk","schema":{"type":"string"},"example":"diamond"},{"name":"product_id","in":"query","required":false,"description":"Satu produk","schema":{"type":"integer"}}],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Produk"}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/check-id":{"post":{"operationId":"checkId","summary":"Cek ID / nickname","tags":["Katalog"],"description":"Cek ID akun game sebelum order (hanya game dengan `check_id: true`).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id"],"properties":{"product_id":{"type":"integer"},"game":{"type":"string","example":"mobile-legends"},"user_id":{"type":"string","example":"12345678"},"zone_id":{"type":"string","example":"1234"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["user_id"],"properties":{"product_id":{"type":"integer"},"game":{"type":"string","example":"mobile-legends"},"user_id":{"type":"string","example":"12345678"},"zone_id":{"type":"string","example":"1234"}}}}}},"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/HasilCekId"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/order":{"post":{"operationId":"createOrder","summary":"Buat pesanan","tags":["Transaksi"],"description":"Saldo dipotong saat pesanan diterima (HTTP 201, status `Processing`). Gagal di provider = saldo dikembalikan otomatis.\nUntuk game dengan 3+ kolom tujuan kirim `target` (dipisah koma) atau `field_3`, `field_4`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["product_id"],"properties":{"product_id":{"type":"integer","example":1201},"user_id":{"type":"string","example":"12345678"},"zone_id":{"type":"string","example":"1234"},"target":{"type":"string","description":"Alternatif user_id/zone_id: \"id,server,...\""},"qty":{"type":"integer","default":1,"description":"Hanya produk dengan max_qty > 1"},"ref_id":{"type":"string","maxLength":40,"pattern":"^[A-Za-z0-9-]{1,40}$","example":"WA628123-0001","description":"ID unik dari sistemmu (idempotensi)"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["product_id"],"properties":{"product_id":{"type":"integer","example":1201},"user_id":{"type":"string","example":"12345678"},"zone_id":{"type":"string","example":"1234"},"target":{"type":"string","description":"Alternatif user_id/zone_id: \"id,server,...\""},"qty":{"type":"integer","default":1,"description":"Hanya produk dengan max_qty > 1"},"ref_id":{"type":"string","maxLength":40,"pattern":"^[A-Za-z0-9-]{1,40}$","example":"WA628123-0001","description":"ID unik dari sistemmu (idempotensi)"}}}}}},"responses":{"201":{"description":"Pesanan diterima","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Pesanan"}}}}}},"200":{"description":"ref_id sudah pernah dipakai: pesanan yang sama dikembalikan (idempotent: true)","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Pesanan"}}}}}},"402":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/status":{"get":{"operationId":"getStatus","summary":"Status pesanan","description":"Cari dengan order_id (nomor kami) atau ref_id (nomormu).","parameters":[{"name":"order_id","in":"query","required":false,"description":"Nomor pesanan kami","schema":{"type":"string"},"example":"MG123456271026"},{"name":"ref_id","in":"query","required":false,"description":"ref_id yang kamu kirim saat order","schema":{"type":"string"},"example":"WA628123-0001"}],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Pesanan"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"getStatusPost","summary":"Status pesanan","description":"Cari dengan order_id (nomor kami) atau ref_id (nomormu).","parameters":[{"name":"order_id","in":"query","required":false,"description":"Nomor pesanan kami","schema":{"type":"string"},"example":"MG123456271026"},{"name":"ref_id","in":"query","required":false,"description":"ref_id yang kamu kirim saat order","schema":{"type":"string"},"example":"WA628123-0001"}],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/Pesanan"}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/history":{"get":{"operationId":"listHistory","summary":"Riwayat pesanan","description":"Pesanan terbaru akunmu (web maupun API).","parameters":[{"name":"limit","in":"query","required":false,"description":"1-50 (bawaan 20)","schema":{"type":"integer"},"example":20},{"name":"status","in":"query","required":false,"description":"Saring: Processing, Success, Failed, Canceled, Refunded, ...","schema":{"type":"string"}}],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Pesanan"}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"listHistoryPost","summary":"Riwayat pesanan","description":"Pesanan terbaru akunmu (web maupun API).","parameters":[{"name":"limit","in":"query","required":false,"description":"1-50 (bawaan 20)","schema":{"type":"integer"},"example":20},{"name":"status","in":"query","required":false,"description":"Saring: Processing, Success, Failed, Canceled, Refunded, ...","schema":{"type":"string"}}],"responses":{"200":{"description":"Berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Pesanan"}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key"},"Bearer":{"type":"http","scheme":"bearer","description":"Authorization: Bearer <API key>"}},"responses":{"Error":{"description":"Gagal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"API key tidak valid"},"error":{"type":"object","properties":{"code":{"type":"string","enum":["MISSING_API_KEY","INVALID_API_KEY","ACCOUNT_DISABLED","IP_NOT_WHITELISTED","RATE_LIMITED","METHOD_NOT_ALLOWED","INVALID_REF_ID","PRODUCT_REQUIRED","PRODUCT_UNAVAILABLE","INVALID_TARGET","OUT_OF_STOCK","INSUFFICIENT_BALANCE","PRICE_UPDATING","ORDER_REJECTED","ORDER_NOT_FOUND","GAME_NOT_FOUND","MISSING_USER_ID","ENDPOINT_NOT_FOUND"]}}},"data":{"nullable":true,"example":null}}},"Profil":{"type":"object","properties":{"username":{"type":"string"},"level":{"type":"string","example":"Gold"},"level_name":{"type":"string"},"balance":{"type":"integer"},"whatsapp":{"type":"string"},"callback_url":{"type":"string"},"ip_whitelist":{"type":"array","items":{"type":"string"}},"your_ip":{"type":"string"}}},"Kolom":{"type":"object","properties":{"key":{"type":"string","example":"user_id","description":"Nama field saat order: user_id, zone_id, field_3, ..."},"title":{"type":"string","example":"User ID"},"type":{"type":"string","example":"number"},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}}}}}},"Game":{"type":"object","properties":{"game":{"type":"string","example":"Mobile Legends"},"slug":{"type":"string","example":"mobile-legends"},"category":{"type":"string"},"image":{"type":"string"},"products":{"type":"integer"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/Kolom"}},"check_id":{"type":"boolean"}}},"Produk":{"type":"object","properties":{"product_id":{"type":"integer","example":1201},"game":{"type":"string"},"game_slug":{"type":"string"},"category":{"type":"string"},"product":{"type":"string","example":"86 Diamonds"},"price":{"type":"integer","example":21500},"original_price":{"type":"integer","nullable":true},"stock":{"type":"integer","nullable":true,"description":"null = tidak dibatasi"},"max_qty":{"type":"integer","example":1},"need_target":{"type":"boolean"}}},"HasilCekId":{"type":"object","properties":{"valid":{"type":"boolean","nullable":true},"status":{"type":"string","enum":["valid","invalid","unverified","skip","unsupported"]},"nickname":{"type":"string"},"region":{"type":"string","example":"ID"},"message":{"type":"string"}}},"Pesanan":{"type":"object","properties":{"order_id":{"type":"string","example":"MG123456271026"},"ref_id":{"type":"string"},"status":{"type":"string","enum":["Pending","Processing","Success","Partial","Failed","Canceled","Refunded","Expired"]},"status_text":{"type":"string"},"game":{"type":"string"},"product":{"type":"string"},"product_id":{"type":"integer"},"qty":{"type":"integer"},"user_id":{"type":"string"},"zone_id":{"type":"string"},"nickname":{"type":"string"},"price":{"type":"integer"},"sn":{"type":"string","description":"SN / kode voucher setelah final"},"note":{"type":"string"},"created_at":{"type":"string"},"balance":{"type":"integer","description":"Saldo setelah order (hanya respons /order)"},"idempotent":{"type":"boolean"}}},"Webhook":{"type":"object","description":"Dikirim POST ke Callback URL tiap status pesanan berubah. Header X-Signature = hex(HMAC-SHA256(body mentah, API key)). Balas HTTP 2xx.","properties":{"event":{"type":"string","example":"order.update"},"order_id":{"type":"string"},"ref_id":{"type":"string"},"status":{"type":"string"},"status_text":{"type":"string"},"sn":{"type":"string"},"product":{"type":"string"},"game":{"type":"string"},"user_id":{"type":"string"},"zone_id":{"type":"string"},"price":{"type":"integer"},"timestamp":{"type":"integer"}}}}}}