API Reseller Perkasa Hosting — Semua Produk
Jual semua produk Perkasa Hosting langsung dari website atau bot kamu: Panel Pterodactyl, Hosting Node.js & Python, Voice Server, Source Engine, Minecraft, Sewa Bot, NOKOS, Source Code, dan produk digital lainnya, lewat satu API, satu saldo.
Daftar Isi Dokumentasi
Introduction
API Reseller Perkasa Hosting Indonesia memungkinkan kamu menjual kembali seluruh produk kami (Panel Pterodactyl, Node.js, Python, Voice Server, Source Engine, Minecraft, Sewa Bot, NOKOS, Source Code, dan produk digital) lewat platform, bot, atau website sendiri. Setiap order yang berhasil langsung diproses otomatis dan memotong saldo akun kamu sesuai harga produk.
- REST API dengan response JSON, mudah diintegrasikan ke bahasa apa pun.
- Harga produk selalu diambil langsung dari server — bukan dari request kamu.
- Panel dibuat otomatis dalam hitungan detik setelah saldo mencukupi.
- Seluruh transaksi API tercatat rapi di riwayat transaksi akun.
https://perkasa-hosting.web.id/api/v1.Getting Started
Ikuti 4 langkah berikut untuk mulai berjualan Panel Pterodactyl lewat API dalam waktu singkat.
- Daftar atau login ke akun Perkasa Hosting Indonesia, lalu buka menu Profil → API Reseller.
- Klik Buat API Key — sistem otomatis membuat nama Project dan API Key sekaligus, tidak perlu diisi manual.
- Top up saldo akun minimal Rp50.000 lewat menu Topup Saldo.
- Kirim request pertama ke
https://perkasa-hosting.web.id/api/v1/products(daftar SEMUA produk) dengan headerX-Project&Authorizationuntuk memastikan koneksi berhasil, lalu pesan produk apa pun lewatPOST /orders(atauPOST /panel/createyang kini juga menerima semua produk). Untuk bot, lihat bagian Integrasi Bot.
Authentication
Setiap request wajib menyertakan nama Project pada header X-Project, dan API Key milik Project tersebut pada header Authorization memakai skema Bearer. Backend akan mencari Project berdasarkan X-Project terlebih dahulu, lalu memvalidasi API Key request terhadap credential Project itu. Request yang tidak menyertakan salah satu header ini akan ditolak dengan status 401/422, dan API Key yang tertukar antar Project akan ditolak dengan status 401.
X-Project: NAMA_PROJECT_ANDA
Authorization: Bearer PH_LIVE_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
- Gunakan HTTPS di setiap request — koneksi non-HTTPS akan ditolak.
- API Key hanya berlaku untuk Project yang sama — mengirim API Key milik Project lain pada header
X-Projectyang berbeda akan ditolak. - Jangan pernah menaruh API Key di kode frontend/client-side yang bisa dilihat publik.
- Simpan API Key di environment variable atau secret manager pada server kamu.
Project & API Key
API Key dikelola langsung dari halaman Profil, dikelompokkan per Project. Satu akun bisa membuat lebih dari satu Project — setiap Project punya nama unik dan API Key sendiri, tidak bisa saling dipakai bergantian.
VANIA → VANIA2) sampai benar-benar unik. Setiap API Key selalu terikat ke satu Project.Cara Mendapatkan API Key
- Login terlebih dahulu ke akun Perkasa Hosting Indonesia.
- Buka halaman Profil.
- Cari bagian API Reseller.
- Klik tombol Buat API Key — Project baru beserta API Key-nya langsung dibuat, tanpa perlu mengisi nama apa pun.
- Klik tombol Tampilkan pada Project tersebut untuk melihat API Key penuh.
- Klik tombol Copy API Key untuk menyalinnya.
- Gunakan nama Project pada header
X-Projectdan API Key pada headerAuthorizationuntuk melakukan request ke API.
Project : VANIA
API Key : PH_LIVE_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
X-Project: VANIA
Authorization: Bearer PH_LIVE_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Buat API Key
Satu klik langsung membuat Project baru + API Key, nama Project otomatis dan dijamin unik.
Copy
Salin API Key dengan satu klik langsung dari dashboard.
Regenerate
Ganti API Key lama dengan yang baru bila dicurigai bocor. Nama Project tetap sama.
Hapus
Hapus Project beserta API Key-nya kapan saja, permanen dan tidak bisa dipakai lagi.
Status
Pantau apakah Project sedang aktif atau nonaktif secara real-time.
Last Used & Created At
Riwayat kapan Project dibuat dan terakhir kali dipakai untuk request.
Products
Mengambil seluruh produk dari semua kategori (Panel, Node.js, Python, Voice Server, Source Engine, Minecraft, Sewa Bot, Source Code, produk digital) beserta harga resminya dalam satu response tanpa pagination. Field category_slug/type menunjukkan kategorinya; untuk panel, category tetap umum/private. Hanya panel: /products?scope=panel. NOKOS bersifat dinamis: lihat NOKOS & Minecraft.
Response Fields
| Field | Tipe | Keterangan |
|---|---|---|
| product_id | string | Kode unik produk, dipakai saat create panel. |
| category | string | umum atau private. |
| name | string | Nama paket, mis. Starter, Standard, Unlimited. |
| ram | string | Alokasi RAM paket. |
| cpu | string | Alokasi CPU paket. |
| disk | string | Alokasi disk paket. |
| price | number | Harga resmi dalam Rupiah, diambil langsung dari server. |
| billing_period | string | Periode tagihan, mis. monthly. |
| status | string | active atau inactive. |
{
"status": "success",
"data": [
{
"product_id": "PU_STARTER",
"category": "umum",
"name": "Starter",
"ram": "1GB",
"cpu": "25%",
"disk": "Unlimited",
"price": 2500,
"billing_period": "monthly",
"status": "active"
}
]
}
Panel Umum
Daftar harga resmi kategori umum — cocok untuk kebutuhan hosting bot, website, dan aplikasi umum.
| Produk | product_id | RAM | CPU | Disk | Harga |
|---|---|---|---|---|---|
| Starter | PU_STARTER | 1.0 GB | 25% | Unlimited | Rp2.500/bln |
| Basic | PU_BASIC | 2.0 GB | 50% | Unlimited | Rp3.500/bln |
| Standard | PU_STANDARD | 4.0 GB | 100% | Unlimited | Rp5.500/bln |
| Advanced | PU_ADVANCED | 6.0 GB | 155% | Unlimited | Rp7.500/bln |
| Pro | PU_PRO | 7.0 GB | 185% | Unlimited | Rp8.500/bln |
| Ultra | PU_ULTRA | 8.0 GB | 200% | Unlimited | Rp9.500/bln |
| Unlimited (Best Value) Best Value | PU_UNLIMITED | Unlimited | Unlimited | Unlimited | Rp12.500/bln |
| Admin Panel | PU_ADMIN | Unlimited | Unlimited | Unlimited | Rp30.000/bln |
| VPS 2GB 1CORE | VPS_2G1C | 2.0 GB | Unlimited | Unlimited | Rp20.000/bln |
| VPS 2GB 2CORE | VPS_2G2C | 2.0 GB | Unlimited | Unlimited | Rp25.000/bln |
| VPS 4GB 2CORE | VPS_4G2C | 4.0 GB | Unlimited | Unlimited | Rp40.000/bln |
| VPS 8GB 4CORE Best Value | VPS_8G4C | 8.0 GB | Unlimited | Unlimited | Rp50.000/bln |
| VPS 16GB 2CORE | VPS_16G2C | 16.0 GB | Unlimited | Unlimited | Rp60.000/bln |
Panel Private
Daftar harga resmi kategori private — akses lebih eksklusif dengan kontrol lebih luas per panel.
| Produk | product_id | RAM | CPU | Disk | Harga |
|---|---|---|---|---|---|
| Starter | PP_STARTER | 1.0 GB | 25% | Unlimited | Rp4.500/bln |
| Basic | PP_BASIC | 2.0 GB | 50% | Unlimited | Rp6.500/bln |
| Standard | PP_STANDARD | 4.0 GB | 100% | Unlimited | Rp10.500/bln |
| Advanced | PP_ADVANCED | 6.0 GB | 155% | Unlimited | Rp14.500/bln |
| Pro | PP_PRO | 7.0 GB | 185% | Unlimited | Rp16.500/bln |
| Ultra | PP_ULTRA | 8.0 GB | 200% | Unlimited | Rp18.500/bln |
| Unlimited (Best Value) Best Value | PP_UNLIMITED | Unlimited | Unlimited | Unlimited | Rp20.500/bln |
| Owner Panel | PP_OWNER | Unlimited | Unlimited | Unlimited | Rp65.500/bln |
Create Panel
Membuat panel Pterodactyl baru untuk pelanggan kamu. Saldo API otomatis terpotong sesuai harga produk begitu panel berhasil dibuat.
Request Body
{
"product_id": "PU_STARTER",
"panel_name": "ServerKu"
}
product_id dan panel_name (3–50 karakter) yang wajib. Opsional: nest_id + egg_id dari GET /api/v1/nests untuk memilih jenis server; kalau tidak dikirim, jenis server dipilih otomatis berdasarkan kategori produk. Username panel dibuat otomatis dari panel_name (huruf kecil & angka saja), bukan dikirim dari client, dan harus belum dipakai — kalau sudah dipakai API membalas 409 panel_name_taken tanpa memotong saldo. Setiap order mendapat akun login panel sendiri.Alur Otomatis di Server
- Baca header
X-Project, cari Project di database, pastikan status Project & akun pemilik aktif. - Validasi API Key pada header
Authorizationterhadap credential Project. - Validasi saldo akun mencukupi minimum akses API (Rp50.000).
- Ambil harga
product_idlangsung dari database (bukan dari request). - Cek ketersediaan produk (aktif / tidak dihapus) dan status server Pterodactyl.
- Memotong saldo, mencatat order & transaksi, lalu membuat panel di server Pterodactyl — seluruhnya dalam satu transaksi database.
- Kalau pembuatan panel gagal, seluruh proses di atas otomatis dibatalkan (rollback) dan saldo tidak terpotong.
- Mengembalikan informasi panel yang baru dibuat, termasuk username & password login panel yang berlaku untuk order ini.
Response
{
"status": "success",
"message": "Panel berhasil dibuat",
"data": {
"order_id": "PH-20260810-8841",
"product_id": "PU_STARTER",
"panel_name": "ServerKu",
"panel_url": "https://panel.perkasa-hosting.web.id/server/a1b2c3d4",
"username": "serverku",
"password": "serverku_perkasahosting",
"price_charged": 2500,
"balance_remaining": 47500,
"status": "active",
"created_at": "2026-08-10T09:41:00+07:00"
}
}
Order Status
Mengecek status order dan panel setelah dibuat lewat /panel/create. Hanya order milik Project kamu yang bisa dicek. Nilai status: processing, active, pending, suspended, failed, expired, cancelled. Saat active, response ikut memuat panel_name, username, dan password; selama processing field credential tidak dikirim sama sekali.
Response · panel sudah aktif
{
"status": "success",
"data": {
"order_id": "PH-20260810-8841",
"product_id": "PU_STARTER",
"status": "active",
"panel_url": "https://panel.perkasa-hosting.web.id/server/a1b2c3d4",
"created_at": "2026-08-10T09:41:00+07:00",
"panel_name": "ServerKu",
"username": "serverku",
"password": "serverku_perkasahosting"
}
}
Response · masih diproses
{
"status": "success",
"data": {
"order_id": "PH-20260810-8841",
"product_id": "PU_STARTER",
"status": "processing",
"panel_url": null,
"created_at": "2026-08-10T09:41:00+07:00"
}
}
Panel Credentials
Mengambil ulang data login panel untuk bot/reseller. Password sudah ikut di response /panel/create, jadi endpoint ini dipakai kalau kamu perlu mengambilnya lagi (bot restart, response create hilang, atau panel masih diproses).
- Wajib header
X-Project+Authorization: Bearer API_KEY; tanpa itu ditolak401/422. - Hanya order milik Project/akun kamu. Order reseller lain dijawab
404 order_not_found. - Hanya saat
status = active. Kalau belum aktif:409 credentials_not_readybeserta status order saat ini — coba lagi beberapa detik kemudian. - Order lama yang password-nya tidak tersimpan dijawab
404 credentials_unavailable.
Response · 200 OK
{
"status": "success",
"data": {
"order_id": "PH-20260810-8841",
"product_id": "PU_STARTER",
"panel_name": "ServerKu",
"panel_url": "https://panel.perkasa-hosting.web.id/server/a1b2c3d4",
"username": "serverku",
"password": "serverku_perkasahosting",
"status": "active"
}
}
Response · panel belum aktif
{
"status": "error",
"success": false,
"message": "Panel belum aktif. Credential baru tersedia setelah status order active.",
"error_code": "credentials_not_ready",
"data": { "order_id": "PH-20260810-8841", "status": "processing" }
}
Cache-Control: no-store).Balance
Saldo API adalah saldo utama akun kamu — dipakai untuk seluruh transaksi pembuatan panel lewat API. Berikut aturan yang wajib dipahami sebelum berjualan.
- Akses transaksi API baru bisa dipakai jika saldo minimal Rp50.000.
- Jika saldo di bawah Rp50.000, akun tidak bisa membuat transaksi panel baru sampai top up kembali.
- Setiap transaksi yang berhasil otomatis memotong saldo sesuai harga produk saat itu juga.
- Selama saldo masih memenuhi syarat minimum akses, transaksi tetap bisa berjalan walau saldo lebih besar dari Rp50.000 sedikit saja — asal cukup untuk harga produk yang dibeli.
Mengambil sisa saldo API akun kamu saat ini.
{
"status": "success",
"data": {
"balance": 47500,
"min_required": 50000,
"api_access": true
}
}
Contoh Perhitungan Saldo
402 sampai kamu top up kembali.Transactions
Mengambil riwayat seluruh transaksi API akun kamu, terurut dari yang terbaru. Semua transaksi lewat API — berhasil maupun gagal — otomatis tercatat di sini.
{
"status": "success",
"data": [
{
"order_id": "PH-20260810-8841",
"product_id": "PU_STARTER",
"amount": 2500,
"type": "panel_create",
"status": "success",
"created_at": "2026-08-10T09:41:00+07:00"
}
]
}
Integrasi Bot: Semua Produk, Pesan Langsung di Chat
Alur lengkap untuk bot WhatsApp/Telegram (atau website) agar menampilkan semua produk dan memesan langsung dari chat. Semua langkah memakai header yang sama (X-Project, Authorization: Bearer).
- Ambil katalog:
GET /catalog?group=category&per_page=all→ daftar kategori beserta produknya (tanpa terpotong; cekmeta.has_more). Tampilkan tiap kategori sebagai menu. Bot lama cukupGET /products(sudah memuat semua kategori). - Pilih produk, lalu baca
required_fieldsproduk itu: tanyakan tiap fieldrequired:trueke pelanggan (mis.panel_name; Minecraft:edition,server_type_id,versiondari/minecraft/options; Sewa Bot: nomor, token, panel URL). - Pesan:
POST /ordersbody{"product_id":"...","config":{...}}(boleh juga field konfigurasi ditaruh langsung di body, atau pakaiPOST /panel/createyang kini menerima semua produk). Balasan sukses memuatorder_id,status, dancredentialsbila sudah siap. - Status & credential: bila
status=processing, ulangiGET /orders/{order_id}tiap 5-10 detik sampaiactive/completed, laluGET /orders/{order_id}/credentials. Atau pakai webhook. (/panel/status/{id}dan/panel/credentials/{id}juga menerima semua order.) - NOKOS:
/nokos/services→/nokos/countries→/nokos/offers→POST /ordersdenganproduct_idoffer → pollingGET /orders/{id}sampaiotp_codeterisi.
// Node.js 18+ (Baileys / Telegraf / dll). Client siap pakai: perkasa-api.js (lihat paket perkasa-bot-integration)
const PH = 'https://perkasa-hosting.web.id/api/v1';
const H = { 'X-Project': process.env.PH_PROJECT, 'Authorization': 'Bearer ' + process.env.PH_KEY, 'Content-Type': 'application/json' };
// 1) katalog lengkap per kategori
const cat = await (await fetch(PH + '/catalog?group=category&per_page=all', { headers: H })).json();
for (const c of cat.data) console.log(c.label, c.products.length);
// 2) pesan (contoh produk nyata: MC-1)
const r = await fetch(PH + '/orders', { method: 'POST', headers: { ...H, 'Idempotency-Key': crypto.randomUUID() },
body: JSON.stringify({ product_id: 'MC-1', config: { panel_name: 'servermu', edition: 'java', server_type_id: 1, version: '1.21.1' } }) });
const o = await r.json(); // o.data.order_id, o.data.status, o.data.credentials
// 3) kalau processing -> polling
const s = await (await fetch(PH + '/orders/' + o.data.order_id, { headers: H })).json();<?php
// PHP: semua produk dalam satu panggilan
$ch = curl_init('https://perkasa-hosting.web.id/api/v1/catalog?group=category&per_page=all');
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['X-Project: NAMA_PROJECT', 'Authorization: Bearer API_KEY']]);
$cat = json_decode(curl_exec($ch), true);
foreach ($cat['data'] as $c) { echo $c['label'] . ': ' . count($c['products']) . "\n"; }Penyebab umum bot "tidak bisa pesan": memakai product_id karangan (selalu ambil dari katalog), tidak mengirim field di required_fields (jawaban 422 memuat errors per field), saldo di bawah Rp50.000 (402), atau panel_name/nama sudah dipakai (409 panel_name_taken). Selalu tampilkan message dan errors dari response ke pelanggan/log.
Categories & Catalog (Semua Produk)
Satu API untuk semua produk Perkasa Hosting Indonesia: Panel Pterodactyl (umum/private/admin), Hosting Node.js & Python, Voice Server, Source Engine, Minecraft, Sewa Bot, NOKOS, Source Code, dan produk digital lain yang ditambahkan admin. Semua memakai bentuk produk, order, status, dan webhook yang sama.
GET /categories daftar kategori · GET /products?category=voice-server produk per kategori · GET /catalog semua produk · GET /products/{product_id} detail.
Filter: category (slug atau all), status (active default | inactive | out_of_stock | all), q, in_stock=1, min_price, max_price, page, per_page (default 200, maks 500, atau all).
curl 'https://perkasa-hosting.web.id/api/v1/products?category=voice-server' \
-H 'X-Project: NAMA_PROJECT' \
-H 'Authorization: Bearer API_KEY'{
"status": "success",
"data": [
{
"product_id": "VOICE-27",
"category": "voice-server",
"category_label": "Voice Server",
"type": "runtime",
"name": "Voice Starter",
"price": 15000,
"currency": "IDR",
"duration_days": 30,
"duration_label": "1 bulan (30 hari)",
"stock": null,
"stock_status": "unlimited",
"status": "active",
"variant": "Voice Server",
"specs": {
"ram_mb": 1024,
"vcpu": 1,
"disk_mb": 5120
},
"metadata": {},
"required_fields": [
{
"name": "panel_name",
"type": "string",
"required": true,
"description": "..."
}
],
"supports": {
"create": true,
"status": true,
"credentials": true,
"renew": true,
"suspend": true,
"unsuspend": true,
"delete": true,
"cancel": false
}
}
],
"meta": {
"total": 1,
"page": 1,
"per_page": 200,
"total_pages": 1,
"has_more": false,
"next_page": null
}
}Kompatibilitas: GET /products tanpa parameter kini mengembalikan semua kategori dengan field format lama (product_id, category, name, ram, cpu, disk, price, status) ditambah category_slug & type. /products?scope=panel = hanya panel (perilaku lama). /catalog?group=category = dikelompokkan per kategori.
Kategori & produk yang tersedia saat ini (live dari database)
| Kategori | Slug | Produk aktif |
|---|---|---|
| Panel Umum (Pterodactyl) | panel-umum | 12 |
| Panel Private (Pterodactyl) | panel-private | 7 |
| Admin Panel / Owner Panel | panel-admin | 2 |
| Hosting Node.js | hosting-nodejs | 7 |
| Hosting Python | hosting-python | 7 |
| Voice Server | voice-server | 6 |
| Source Engine | source-engine | 6 |
| Minecraft | minecraft | 8 |
| Sewa Bot (WhatsApp/Telegram) | sewa-bot | 12 |
| NOKOS (Nomor Virtual/OTP) | nokos | dinamis (lihat NOKOS) |
| Source Code | source-code | 0 |
| Source Code Python | source-code-python | 0 |
| Source Code Node.js | source-code-nodejs | 0 |
| Source Code PHP | source-code-php | 0 |
| Produk Digital Lainnya | digital | 0 |
Panel Umum (Pterodactyl) (panel-umum)
| product_id | Nama | Harga | Durasi | Stok |
|---|---|---|---|---|
PU_STARTER | Starter | Rp2.500 | 1 bulan (30 hari) | ∞ |
PU_BASIC | Basic | Rp3.500 | 1 bulan (30 hari) | ∞ |
PU_STANDARD | Standard | Rp5.500 | 1 bulan (30 hari) | ∞ |
PU_ADVANCED | Advanced | Rp7.500 | 1 bulan (30 hari) | ∞ |
PU_PRO | Pro | Rp8.500 | 1 bulan (30 hari) | ∞ |
PU_ULTRA | Ultra | Rp9.500 | 1 bulan (30 hari) | ∞ |
PU_UNLIMITED | Unlimited (Best Value) | Rp12.500 | 1 bulan (30 hari) | ∞ |
VPS_2G1C | VPS 2GB 1CORE | Rp20.000 | 1 bulan (30 hari) | ∞ |
VPS_2G2C | VPS 2GB 2CORE | Rp25.000 | 1 bulan (30 hari) | ∞ |
VPS_4G2C | VPS 4GB 2CORE | Rp40.000 | 1 bulan (30 hari) | ∞ |
VPS_8G4C | VPS 8GB 4CORE | Rp50.000 | 1 bulan (30 hari) | ∞ |
VPS_16G2C | VPS 16GB 2CORE | Rp60.000 | 1 bulan (30 hari) | ∞ |
Panel Private (Pterodactyl) (panel-private)
| product_id | Nama | Harga | Durasi | Stok |
|---|---|---|---|---|
PP_STARTER | Starter | Rp4.500 | 1 bulan (30 hari) | ∞ |
PP_BASIC | Basic | Rp6.500 | 1 bulan (30 hari) | ∞ |
PP_STANDARD | Standard | Rp10.500 | 1 bulan (30 hari) | ∞ |
PP_ADVANCED | Advanced | Rp14.500 | 1 bulan (30 hari) | ∞ |
PP_PRO | Pro | Rp16.500 | 1 bulan (30 hari) | ∞ |
PP_ULTRA | Ultra | Rp18.500 | 1 bulan (30 hari) | ∞ |
PP_UNLIMITED | Unlimited (Best Value) | Rp20.500 | 1 bulan (30 hari) | ∞ |
Admin Panel / Owner Panel (panel-admin)
| product_id | Nama | Harga | Durasi | Stok |
|---|---|---|---|---|
PU_ADMIN | Admin Panel | Rp30.000 | 1 bulan (30 hari) | ∞ |
PP_OWNER | Owner Panel | Rp65.500 | 1 bulan (30 hari) | ∞ |
Hosting Node.js (hosting-nodejs)
| product_id | Nama | Harga | Durasi | Stok |
|---|---|---|---|---|
NODEJS-1 | Node.js Starter | Rp8.000 | 1 bulan (30 hari) | ∞ |
NODEJS-2 | Node.js Basic | Rp15.000 | 1 bulan (30 hari) | ∞ |
NODEJS-3 | Node.js Standard | Rp22.000 | 1 bulan (30 hari) | ∞ |
NODEJS-4 | Node.js Pro | Rp29.000 | 1 bulan (30 hari) | ∞ |
NODEJS-5 | Node.js Advanced | Rp42.000 | 1 bulan (30 hari) | ∞ |
NODEJS-6 | Node.js Ultra | Rp55.000 | 1 bulan (30 hari) | ∞ |
NODEJS-7 | Node.js Unlimited | Rp69.000 | 1 bulan (30 hari) | ∞ |
Hosting Python (hosting-python)
| product_id | Nama | Harga | Durasi | Stok |
|---|---|---|---|---|
PYTHON-8 | Python Starter | Rp8.000 | 1 bulan (30 hari) | ∞ |
PYTHON-9 | Python Basic | Rp15.000 | 1 bulan (30 hari) | ∞ |
PYTHON-10 | Python Standard | Rp22.000 | 1 bulan (30 hari) | ∞ |
PYTHON-11 | Python Pro | Rp29.000 | 1 bulan (30 hari) | ∞ |
PYTHON-12 | Python Advanced | Rp42.000 | 1 bulan (30 hari) | ∞ |
PYTHON-13 | Python Ultra | Rp55.000 | 1 bulan (30 hari) | ∞ |
PYTHON-14 | Python Unlimited | Rp69.000 | 1 bulan (30 hari) | ∞ |
Voice Server (voice-server)
| product_id | Nama | Harga | Durasi | Stok |
|---|---|---|---|---|
VOICE-27 | Voice Server 1 GB | Rp12.000 | 1 bulan (30 hari) | ∞ |
VOICE-28 | Voice Server 2 GB | Rp20.000 | 1 bulan (30 hari) | ∞ |
VOICE-29 | Voice Server 3 GB | Rp30.000 | 1 bulan (30 hari) | ∞ |
VOICE-30 | Voice Server 4 GB | Rp40.000 | 1 bulan (30 hari) | ∞ |
VOICE-31 | Voice Server 6 GB | Rp55.000 | 1 bulan (30 hari) | ∞ |
VOICE-32 | Voice Server 8 GB | Rp70.000 | 1 bulan (30 hari) | ∞ |
Source Engine (source-engine)
| product_id | Nama | Harga | Durasi | Stok |
|---|---|---|---|---|
SRCENG-15 | Source Engine 1 GB | Rp15.000 | 1 bulan (30 hari) | ∞ |
SRCENG-18 | Source Engine 2 GB | Rp25.000 | 1 bulan (30 hari) | ∞ |
SRCENG-20 | Source Engine 3 GB | Rp35.000 | 1 bulan (30 hari) | ∞ |
SRCENG-22 | Source Engine 4 GB | Rp45.000 | 1 bulan (30 hari) | ∞ |
SRCENG-24 | Source Engine 6 GB | Rp60.000 | 1 bulan (30 hari) | ∞ |
SRCENG-26 | Source Engine 8 GB | Rp75.000 | 1 bulan (30 hari) | ∞ |
Minecraft (minecraft)
| product_id | Nama | Harga | Durasi | Stok |
|---|---|---|---|---|
MC-1 | Minecraft 1GB | Rp13.000 | 1 bulan (30 hari) | ∞ |
MC-2 | Minecraft 2GB | Rp26.000 | 1 bulan (30 hari) | ∞ |
MC-3 | Minecraft 3GB | Rp39.000 | 1 bulan (30 hari) | ∞ |
MC-4 | Minecraft 4GB | Rp52.000 | 1 bulan (30 hari) | ∞ |
MC-5 | Minecraft 5GB | Rp65.000 | 1 bulan (30 hari) | ∞ |
MC-6 | Minecraft 6GB | Rp78.000 | 1 bulan (30 hari) | ∞ |
MC-7 | Minecraft 7GB | Rp91.000 | 1 bulan (30 hari) | ∞ |
MC-8 | Minecraft 8GB | Rp104.000 | 1 bulan (30 hari) | ∞ |
Sewa Bot (WhatsApp/Telegram) (sewa-bot)
| product_id | Nama | Harga | Durasi | Stok |
|---|---|---|---|---|
BOT-TG-3 | Sewa Bot Telegram 3 Hari | Rp1.000 | 3 hari | ∞ |
BOT-WA-3 | Sewa Bot Whatsapp 3 Hari | Rp1.000 | 3 hari | ∞ |
BOT-TG-7 | Sewa Bot Telegram 7 Hari | Rp12.000 | 7 hari | ∞ |
BOT-WA-7 | Sewa Bot Whatsapp 7 Hari | Rp12.000 | 7 hari | ∞ |
BOT-TG-15 | Sewa Bot Telegram 15 Hari | Rp20.000 | 15 hari | ∞ |
BOT-WA-15 | Sewa Bot Whatsapp 15 Hari | Rp20.000 | 15 hari | ∞ |
BOT-TG-30 | Sewa Bot Telegram 30 Hari | Rp35.000 | 1 bulan (30 hari) | ∞ |
BOT-WA-30 | Sewa Bot Whatsapp 30 Hari | Rp35.000 | 1 bulan (30 hari) | ∞ |
BOT-TG-60 | Sewa Bot Telegram 60 Hari | Rp60.000 | 2 bulan (60 hari) | ∞ |
BOT-WA-60 | Sewa Bot Whatsapp 60 Hari | Rp60.000 | 2 bulan (60 hari) | ∞ |
BOT-TG-90 | Sewa Bot Telegram 90 Hari | Rp80.000 | 3 bulan (90 hari) | ∞ |
BOT-WA-90 | Sewa Bot Whatsapp 90 Hari | Rp80.000 | 3 bulan (90 hari) | ∞ |
Create Order (Semua Produk)
POST /orders membuat order untuk produk apa pun. Saldo dipotong otomatis; kalau provisioning gagal, saldo dikembalikan. Header Idempotency-Key disarankan (string unik 8-100 karakter, mis. UUID) supaya request yang diulang (timeout/retry) tidak membuat order ganda. Kalau tidak dikirim, server membuat perlindungan otomatis (request identik dalam 10 detik dianggap sama).
| Field | Tipe | Keterangan |
|---|---|---|
product_id | string | Wajib. Dari /products. |
quantity | integer | Opsional, 1-20 (hanya produk stok digital yang boleh > 1). |
config | object | Isi sesuai required_fields produk (mis. panel_name; Minecraft: edition, server_type_id, version; Sewa Bot: lihat bawah). |
curl -X POST 'https://perkasa-hosting.web.id/api/v1/orders' \
-H 'X-Project: NAMA_PROJECT' \
-H 'Authorization: Bearer API_KEY' \
-H 'Idempotency-Key: 3f6c1b9e-0a7d-4c52-9e47-1f2a8b7d9c10' \
-H 'Content-Type: application/json' \
-d '{"product_id":"VOICE-27","config":{"panel_name":"voiceku"}}'{
"status": "success",
"message": "Order berhasil dibuat.",
"data": {
"order_id": "PHA261009-1A2B3C4D",
"category": "voice-server",
"type": "runtime",
"product_id": "VOICE-27",
"product_name": "Voice Starter",
"quantity": 1,
"status": "active",
"amount": 15000,
"total_paid": 15000,
"currency": "IDR",
"expires_at": "2026-11-08T10:00:00+07:00",
"days_remaining": 30,
"renew_count": 0,
"supports": {
"credentials": true,
"renew": true,
"suspend": true,
"delete": true
},
"price_charged": 15000,
"balance_remaining": 85000,
"credentials": {
"panel_url": "https://...",
"username": "voiceku",
"password": "********"
}
},
"request_id": "req_9f8e7d6c5b4a3210"
}Status 201 = order dibuat. Bila provisioning masih berjalan (mis. deploy bot) status processing; pantau lewat GET /orders/{order_id} atau webhook.
Sewa Bot (BOT-WA-{hari} / BOT-TG-{hari}): config berisi bot_name, owner_name, owner_number, ptero_url, ptero_plta, ptero_pltc + WhatsApp: pairing_number / Telegram: tg_token, tg_owner_id, tg_owner_username, tg_channel; opsional groq_enabled, groq_key. Konfigurasi divalidasi live ke panel/Telegram; kesalahan dikembalikan per field di errors. Daftar lengkap ada di required_fields tiap produk.
Order panel lama (POST /panel/create) tetap berfungsi persis seperti sebelumnya dan otomatis tercatat di /orders.
Order Status & Detail
GET /orders/{order_id} status & detail (sinkron real-time ke sistem asal) · GET /orders?category=&status=&page= daftar order.
Detail memuat status, expires_at, days_remaining, supports, dan details khusus produk (panel: URL/username/garansi; server: spesifikasi & address Minecraft; bot: rental_expired, deploy_stage; NOKOS: phone_number, otp_code, can_cancel).
GET /orders/{order_id}/credentials mengambil credential (panel/server: URL, username, password · stok digital: key/akun · source code & file: tautan unduh · NOKOS: nomor & OTP). Source code/file diunduh via GET /orders/{order_id}/download (header autentikasi yang sama).
| status | Arti |
|---|---|
pending | Order dicatat, belum diproses. |
processing | Sedang dibuat/dideploy/menunggu admin. |
active | Layanan aktif (server, panel, bot, nomor menunggu OTP). |
completed | Selesai (produk terkirim / OTP diterima). |
suspended | Di-suspend. |
expired | Masa aktif habis. |
failed | Gagal; saldo dikembalikan otomatis (refunded: true). |
cancelled | Dibatalkan. |
deleted | Layanan dihapus. |
refunded | Dana dikembalikan. |
Renew, Cancel, Suspend, Unsuspend, Delete
Semua POST di bawah sebaiknya menyertakan Idempotency-Key (otomatis 10 detik bila tidak dikirim). Cek supports pada order/produk: operasi yang tidak didukung dijawab 405 operation_not_supported.
| Endpoint | Keterangan |
|---|---|
POST /orders/{id}/renew | Body opsional {"duration_days": 30} (default = 1 siklus produk; kelipatan siklus, maks 12 siklus; panel: 1-365 hari; bot: salah satu durasi paket). Saldo dipotong, masa aktif bertambah, webhook order.renewed. |
POST /orders/{id}/cancel | NOKOS (dalam 4 menit & belum ada OTP, saldo kembali) dan produk digital manual yang belum diproses (refund penuh). |
POST /orders/{id}/suspend · /unsuspend | Panel, Node.js/Python/Voice/Source Engine, Minecraft, Sewa Bot. |
DELETE /orders/{id} (atau POST .../delete) | Hapus server Node.js/Python/Voice/Source Engine/Minecraft di Pterodactyl. |
POST /orders/{id}/resend | NOKOS: minta kirim ulang SMS (jeda 30 detik). |
POST /orders/{id}/complete | NOKOS: tandai selesai setelah OTP diterima. |
curl -X POST 'https://perkasa-hosting.web.id/api/v1/orders/PHA261009-1A2B3C4D/renew' \
-H 'X-Project: NAMA_PROJECT' \
-H 'Authorization: Bearer API_KEY' \
-H 'Idempotency-Key: 8b1d5e22-6a31-4f0e-b7c4-52c9a1f0d3aa' \
-H 'Content-Type: application/json' -d '{"duration_days":30}'NOKOS & Minecraft Options
NOKOS (harga & stok real-time dari provider):
GET https://perkasa-hosting.web.id/api/v1/nokos/services
GET https://perkasa-hosting.web.id/api/v1/nokos/countries?service_key=SERVICE
GET https://perkasa-hosting.web.id/api/v1/nokos/offers?service_key=SERVICE&country_key=COUNTRY # = produk NOKOS lengkap (price, stock)
GET https://perkasa-hosting.web.id/api/v1/products?category=nokos&service_key=SERVICE&country_key=COUNTRY
POST https://perkasa-hosting.web.id/api/v1/orders {"product_id":"NK:..."} # dari field product_id offer
GET https://perkasa-hosting.web.id/api/v1/orders/{order_id} # phone_number, otp_code, can_cancel
POST https://perkasa-hosting.web.id/api/v1/orders/{order_id}/resend | /cancel | /completeSaat OTP masuk, webhook order.otp_received berisi phone_number dan otp_code.
Minecraft: GET /minecraft/options mengembalikan Edition → Server Type (server_type_id) → daftar versi. Versi boleh dipilih dari daftar atau diketik bila Server Type mengizinkan (allow_custom_version); kompatibilitas divalidasi di server.
User & Balance
GET /user profil Project (username, saldo, status akses API, webhook, batas rate) · GET /balance saldo · GET /transactions?scope=all riwayat transaksi semua kategori · GET /logs 100 log request tulis terakhir (dengan request_id).
Webhook / Callback Status Order
Daftarkan URL HTTPS kamu supaya perubahan status order dikirim otomatis (tanpa polling).
curl -X PUT 'https://perkasa-hosting.web.id/api/v1/webhook' -H 'X-Project: NAMA_PROJECT' \
-H 'Authorization: Bearer API_KEY' \
-H 'Content-Type: application/json' \
-d '{"url":"https://situsmu.com/hooks/perkasa"}' # respons memuat "secret" (whsec_...) SEKALI saja
POST https://perkasa-hosting.web.id/api/v1/webhook/test # kirim event uji
GET https://perkasa-hosting.web.id/api/v1/webhook/deliveries # riwayat pengiriman
PUT https://perkasa-hosting.web.id/api/v1/webhook {"regenerate_secret":true}Event: order.created, processing, active, completed, suspended, unsuspended, renewed, expired, failed, cancelled, deleted, refunded, order.otp_received, dan webhook.test.
{
"id": "evt_8c1d...",
"event": "order.active",
"api_version": "2.0.0",
"created_at": "2026-10-09T10:00:05+07:00",
"data": {
"order_id": "PHA261009-1A2B3C4D",
"category": "sewa-bot",
"product_id": "BOT-TG-3",
"status": "active",
"total_paid": 25000,
"expires_at": "2026-11-08T10:00:00+07:00"
}
}Verifikasi tanda tangan: header X-Perkasa-Signature: sha256=<hex> = HMAC-SHA256 dengan secret terhadap X-Perkasa-Timestamp + "." + raw_body. Tolak bila timestamp lebih dari 5 menit. Header lain: X-Perkasa-Event, X-Perkasa-Delivery.
<?php
$raw = file_get_contents('php://input');
$ts = $_SERVER['HTTP_X_PERKASA_TIMESTAMP'] ?? '';
$sig = $_SERVER['HTTP_X_PERKASA_SIGNATURE'] ?? '';
$ok = abs(time() - (int)$ts) < 300
&& hash_equals('sha256=' . hash_hmac('sha256', $ts . '.' . $raw, $WEBHOOK_SECRET), $sig);
if (!$ok) { http_response_code(401); exit; }
$event = json_decode($raw, true);
http_response_code(200); // balas 2xx secepatnyaBalas HTTP 2xx = sukses. Jika gagal, sistem mengulang otomatis (1 mnt, 5 mnt, 15 mnt, 1 jam, 6 jam) lalu berhenti. Event bisa terkirim lebih dari sekali: gunakan id event / order_id + status untuk deduplikasi. URL harus HTTPS (port 443/8443) dan bukan alamat internal. Password panel tidak pernah dikirim lewat webhook.
Idempotency, Rate Limit & Format Response
Idempotency: kirim Idempotency-Key unik per order (opsional; tanpa header, server memakai kunci otomatis 10 detik, response berheader X-Idempotency-Mode: auto). Request ulang dengan key & body sama mengembalikan response yang sama (header Idempotent-Replayed: true) tanpa order baru. Key sama dengan body berbeda → 422 idempotency_key_reused; masih diproses → 409 request_in_progress. Order yang gagal tidak bisa dipakai ulang dengan key yang sama — buat key baru. Untuk POST /panel/create lama, header ini opsional.
Format response konsisten: sukses {"status":"success","data":...,"request_id":"req_..."}; error {"status":"error","success":false,"message":"...","error_code":"...","errors":{field:pesan},"request_id":"..."}. Sebutkan request_id (juga header X-Request-Id) saat menghubungi Admin.
Rate limit: 60 request/menit & 1.000/hari per Project, plus 20 operasi tulis (order/renew/dst)/menit. Header X-RateLimit-Limit/Remaining. 30 kali API Key salah dari satu IP dalam 10 menit memblokir IP itu sementara. Semua transaksi tercatat di log (GET /logs).
Error Codes
Setiap error mengembalikan HTTP status code beserta pesan yang jelas di body response, supaya mudah ditangani di sisi kamu.
| Kode | Nama | Keterangan |
|---|---|---|
| 401 | Invalid API Key | API Key tidak ditemukan, salah format, atau tidak cocok dengan Project pada header X-Project. |
| 403 | Project/Account Inactive | Project sedang tidak aktif, atau akun pemilik Project sedang tidak aktif. |
| 404 | Project Not Found | Nama Project pada header X-Project tidak ditemukan. |
| 402 | Insufficient Balance | Saldo akun tidak mencukupi untuk menyelesaikan transaksi yang diminta. |
| 404 | Order Not Found | order_id tidak ditemukan, atau order tersebut bukan milik Project/akun kamu (order reseller lain sengaja dijawab 404 yang sama). |
| 404 | Product Not Found | product_id yang dikirim tidak ditemukan atau produk sudah tidak aktif. |
| 422 | Invalid Parameters | Header X-Project kosong, atau satu/lebih parameter pada request (product_id, panel_name) tidak valid/tidak lengkap. |
| 409 | Conflict / Not Ready | panel_name sudah dipakai (panel_name_taken), atau credential diminta saat panel belum aktif (credentials_not_ready). |
| 429 | Too Many Requests | Rate limit terlampaui, tunggu beberapa saat sebelum mencoba lagi. |
| 405 | Operation Not Supported | Operasi (renew/cancel/suspend/delete/...) tidak didukung untuk jenis produk ini (error_code operation_not_supported). |
| 409 | Out of Stock / Invalid State | Stok habis (out_of_stock), status order tidak mengizinkan operasi (invalid_state), atau request sama masih diproses (request_in_progress). |
| 422 | Validation Failed | Field request tidak valid; rincian per field ada di "errors". Idempotency-Key wajib/tidak valid/dipakai ulang dengan body berbeda. |
| 502 | Provider Error | Sistem penyedia (Pterodactyl, NOKOS, dll) gagal merespons; saldo tidak terpotong atau dikembalikan otomatis. |
| 503 | Provider Unavailable | Layanan penyedia sedang offline/nonaktif. Coba lagi nanti. |
| 500 | Internal Server Error | Terjadi kesalahan pada server. Coba lagi, atau hubungi Admin bila berulang. |
Example Integration
Contoh kode membuat panel lewat /panel/create dan mengambil panel_url, username, password untuk dikirim bot kamu ke pelanggan.
<?php
$projectName = 'VANIA';
$apiKey = 'PH_LIVE_xxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$endpoint = 'https://perkasa-hosting.web.id/api/v1/panel/create';
$payload = [
'product_id' => 'PU_STARTER',
'panel_name' => 'ServerKu',
];
$ch = curl_init($endpoint);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Project: ' . $projectName,
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
if (($result['status'] ?? '') !== 'success') {
exit('Gagal: ' . ($result['message'] ?? 'tidak diketahui'));
}
$orderId = $result['data']['order_id'];
$panelUrl = $result['data']['panel_url'];
$username = $result['data']['username'];
$password = $result['data']['password'];
// Kirim $panelUrl, $username, $password ke pelanggan lewat bot kamu.
// Opsional: ambil ulang credential kapan saja (mis. bot restart).
$ch = curl_init('https://perkasa-hosting.web.id/api/v1/panel/credentials/' . urlencode($orderId));
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Project: ' . $projectName,
'Authorization: Bearer ' . $apiKey,
],
]);
$cred = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($cred['status'] ?? '') === 'success') {
echo $cred['data']['panel_url'] . ' | ' . $cred['data']['username'] . ' | ' . $cred['data']['password'];
}
const projectName = 'VANIA';
const apiKey = 'PH_LIVE_xxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const endpoint = 'https://perkasa-hosting.web.id/api/v1/panel/create';
async function createPanel() {
const res = await fetch(endpoint, {
method: 'POST',
headers: {
'X-Project': projectName,
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
product_id: 'PU_STARTER',
panel_name: 'ServerKu',
}),
});
const result = await res.json();
if (result.status !== 'success') {
throw new Error(result.message);
}
const { order_id, panel_url, username, password } = result.data;
// Kirim panel_url, username, password ke pelanggan lewat bot kamu.
return { order_id, panel_url, username, password };
}
// Opsional: ambil ulang credential kapan saja (mis. bot restart).
async function getCredentials(orderId) {
const res = await fetch(`https://perkasa-hosting.web.id/api/v1/panel/credentials/${encodeURIComponent(orderId)}`, {
headers: { 'X-Project': projectName, 'Authorization': `Bearer ${apiKey}` },
});
const result = await res.json();
if (result.status !== 'success') {
throw new Error(result.message); // 409 = panel belum aktif, coba lagi sebentar
}
return result.data; // { panel_url, username, password, ... }
}
createPanel().then(console.log).catch(console.error);
curl -X POST "https://perkasa-hosting.web.id/api/v1/panel/create" \
-H "X-Project: VANIA" \
-H "Authorization: Bearer PH_LIVE_xxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"product_id": "PU_STARTER",
"panel_name": "ServerKu"
}'
# Ambil credential (panel_url, username, password) untuk order tertentu:
curl "https://perkasa-hosting.web.id/api/v1/panel/credentials/PH-20260810-8841" \
-H "X-Project: VANIA" \
-H "Authorization: Bearer PH_LIVE_xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Rate Limit
Rate limit berlaku per Project untuk menjaga stabilitas layanan bagi seluruh reseller. Batas default dapat diatur ulang oleh admin sesuai kebutuhan akun tertentu.
Retry-After berisi jumlah detik sebelum kamu bisa mencoba lagi.Changelog
FAQ API Reseller
Pertanyaan yang paling sering ditanyakan reseller sebelum mulai integrasi API Panel Pterodactyl.
Apa itu API Reseller Perkasa Hosting Indonesia?
API Reseller adalah REST API yang memungkinkan kamu menjual kembali semua produk Perkasa Hosting (Panel Pterodactyl, Node.js, Python, Voice Server, Source Engine, Minecraft, Sewa Bot, NOKOS, Source Code, produk digital) lewat website, bot, atau aplikasi sendiri. Setiap order yang berhasil diproses otomatis dan memotong saldo akun sesuai harga produk.
Bagaimana cara mendapatkan API Key?
Login ke akun Perkasa Hosting Indonesia, buka halaman Profil, lalu cari bagian API Reseller dan klik "Buat API Key". Nama Project dan API Key dibuat otomatis sekaligus, dan API Key bisa ditampilkan ulang kapan saja lewat tombol Tampilkan.
Apakah 1 akun bisa punya lebih dari 1 API Key?
Bisa. Setiap kali kamu klik "Buat API Key" di halaman Profil, sistem membuat Project baru dengan nama otomatis yang unik (mis. VANIA, VANIA2, VANIA3) beserta API Key masing-masing. API Key satu Project tidak bisa dipakai untuk Project lain.
Berapa saldo minimal untuk menggunakan API?
Saldo minimal untuk bertransaksi lewat API adalah Rp50.000. Saldo bisa ditambah kapan saja lewat menu Topup Saldo.
Apakah API Reseller berbayar?
Tidak ada biaya langganan untuk mengakses API. Kamu hanya membayar sesuai harga produk Panel Umum atau Panel Private yang dibuat lewat API, dipotong otomatis dari saldo akun.
Apakah ada rate limit pada API?
Ya, default rate limit adalah 60 request per menit dan 1.000 request per hari untuk setiap Project, guna menjaga stabilitas layanan bagi seluruh reseller.
Bagaimana bot saya mendapatkan password panel?
Password panel langsung ikut di response POST /panel/create. Kalau perlu mengambilnya lagi (mis. bot restart), pakai GET /panel/credentials/{order_id} dengan API Key yang sama — hanya order milik kamu yang bisa diambil.
Bahasa pemrograman apa saja yang didukung?
API Reseller berbasis REST dengan response JSON sehingga bisa diintegrasikan dari bahasa pemrograman apa pun, termasuk PHP, JavaScript/Node.js, dan cURL.
Masih ada pertanyaan lain? Lihat FAQ Perkasa Hosting Indonesia atau hubungi Admin lewat WhatsApp.
Siap mulai jualan lewat API?
Generate API Key kamu dan mulai integrasi hari ini juga.
Generate API Key Tanya Admin