Autentikasi & Quick Start
Semua request ke API v1 wajib menyertakan header Authorization: Bearer sk_live_....
Dapatkan API key Anda melalui menu Dashboard Developer.
/api/v1/products
Mengambil seluruh paket produk yang tersedia beserta harga dasar dan spesifikasinya.
{
"success": true,
"data": [{
"productId": "public-1GB", "type": "public", "name": "1GB",
"memory": "1024", "disk": "1024", "cpu": "40",
"price": 10000, "renewPrice": 10000,
"note": null, "available": true
}]
}
/api/v1/create-order
Membuat order baru. Sistem akan mengembalikan QRIS image, nominal pembayaran (termasuk margin Anda), dan order ID.
{
"success": true,
"data": {
"orderId": "INV-171829-PUBLIC-1GB",
"status": "pending",
"amount": 15000,
"paymentUrl": "https://zanspiwptero.shoppanel.my.id/checkout?order_id=INV-...",
"qrImage": "data:image/png;base64,iVBORw0KGgo..."
}
}
/api/v1/check-payment/:orderId
Memeriksa status pembayaran dari order tertentu.
{
"success": true,
"data": {
"orderId": "INV-MABC123-9F20A31BC812",
"status": "pending_payment",
"price": 15000,
"createdAt": "2026-10-26T10:00:00.000Z"
}
}
/api/v1/order-detail/:orderId
Mengambil detail server yang sudah jadi (login URL panel, username, password, dan nama server).
{
"success": true,
"data": {
"orderId": "INV-MABC123-9F20A31BC812",
"status": "completed_server_created",
"product": { "name": "1GB", "type": "public" },
"price": 15000,
"userAccount": { "username": "customer123", "email": "customer@gmail.com" },
"serverDetails": { "serverId": 123, "serverName": "customer123", "panelUrl": "https://panel.example.com" },
"warrantyLink": "https://t.me/+AbCdEfGhIjK...",
"paymentUrl": "https://zanspiwptero.shoppanel.my.id/checkout?order_id=INV-MABC123-9F20A31BC812",
"createdAt": "2026-10-26T10:00:00.000Z"
}
}
/api/v1/warranty-link
Mengambil URL link invite grup garansi resmi khusus customer yang order melalui bot reseller dari kita. Link ini dikelola langsung melalui Admin Setting.
{
"success": true,
"data": {
"warrantyLink": "https://t.me/+AbCdEfGhIjK..."
}
}
/api/v1/orders
Mengambil riwayat seluruh order yang dibuat menggunakan API Key Anda.
curl -X GET "https://zanspiwptero.shoppanel.my.id/api/v1/orders" \ -H "Authorization: Bearer sk_live_YOUR_API_KEY"
{
"success": true,
"data": [{
"orderId": "INV-MABC123-9F20A31BC812",
"status": "completed_server_created",
"product": { "name": "1GB", "type": "public" },
"price": 15000, "username": "customer123",
"serverDetails": { "serverId": 123 },
"createdAt": "2026-10-26T10:00:00.000Z"
}]
}
/api/v1/check-server/:serverId
Memeriksa pemetaan server. Parameter query panelUrl wajib agar server dengan ID sama pada panel lain tidak tertukar.
curl "https://zanspiwptero.shoppanel.my.id/api/v1/check-server/123?panelUrl=https%3A%2F%2Fpanel.example.com" \ -H "Authorization: Bearer sk_live_YOUR_API_KEY"
{
"success": true,
"data": {
"serverId": 123,
"mapped": {
"serverId": 123, "productType": "public", "productName": "1GB",
"price": 10000, "panelUrl": "https://panel.example.com",
"createdAt": "2026-10-01T10:00:00.000Z"
}
}
}
/api/v1/create-renewal
Membuat tagihan perpanjangan berdasarkan server yang sudah terdaftar. Paket dan harga selalu diambil dari pemetaan server, bukan dari input client.
curl -X POST "https://zanspiwptero.shoppanel.my.id/api/v1/create-renewal" \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"serverId":123,"panelUrl":"https://panel.example.com"}'
{
"success": true,
"data": {
"renewalId": "TRX-RENEW-123456", "status": "pending", "amount": 12000,
"qrImage": "data:image/png;base64,iVBORw0KGgo...",
"qrString": "000201010212...",
"expiresAt": "2026-10-26T10:15:00.000Z"
}
}
/api/v1/check-renewal-payment/:renewalId
Menyegarkan status dari AutoOrder dan menyelesaikan perpanjangan secara idempoten ketika pembayaran berhasil.
curl -X GET "https://zanspiwptero.shoppanel.my.id/api/v1/check-renewal-payment/TRX-RENEW-123456" \ -H "Authorization: Bearer sk_live_YOUR_API_KEY"
{
"success": true,
"data": {
"renewalId": "TRX-RENEW-123456", "status": "completed",
"price": 12000, "createdAt": "2026-10-26T10:00:00.000Z"
}
}
Format Response Error
Semua endpoint memakai bentuk error yang sama. HTTP status dapat berupa 400, 401, 404, 429, 500, atau 503 sesuai jenis kegagalannya.
{
"success": false,
"error": "order_not_found",
"message": "Order tidak ditemukan."
}