REST API

Digipanel API Documentation

Integrasikan layanan download aset premium langsung ke platform kamu. Cocok untuk reseller, SaaS, dan developer yang ingin otomasi.

Quick Info
Base URL

https://server.digipanel.id/api/v1

Biaya per Download

Rp 200

Rate Limit

30 request/menit

Minimal Topup

Rp 50.000

Max API Keys

1 key per akun

Format Response

JSON

Auth Method

Bearer Token

Fitur API

Download otomatis

Webhook notification

HMAC signature verification

Auto-refund on failure

Google Drive delivery

Authentication

Semua request ke API harus menyertakan header Authorization dengan Bearer token. API key bisa di-generate melalui API Panel di dashboard.

Authorization: Bearer dgp_sk_your_api_key
POST
/download

Download item dari platform aset premium. Biaya: Rp 200 per download.

Request Body:

{
  "url": "https://elements.envato.com/item-ITEMID"
}

cURL Example:

curl -X POST https://server.digipanel.id/api/v1/download \
  -H "Authorization: Bearer dgp_sk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://elements.envato.com/item-ITEMID"}'

Response (200):

{
  "status": "success",
  "message": "Download sedang diproses",
  "data": {
    "download_id": "uuid-string",
    "title": "Item Name",
    "cost": 200,
    "balance_after": 49800
  }
}
GET
/balance

Cek saldo akun dan jumlah download tersedia.

{
  "status": "success",
  "data": {
    "balance": 50000,
    "cost_per_download": 200,
    "downloads_available": 250
  }
}
GET
/downloads/:id

Detail download termasuk link Google Drive dan lisensi setelah selesai.

{
  "status": "success",
  "data": {
    "download_id": "uuid-string",
    "title": "Item Name",
    "status": "berhasil",
    "gdrive_link": "https://drive.google.com/...",
    "license_link": "https://server.digipanel.id/api/v1/license/..."
  }
}
WEBHOOK
Webhook Notification

Setelah download selesai, kami kirim POST ke webhook URL kamu.

{
  "event": "download.completed",
  "download_id": "uuid-string",
  "title": "Item Name",
  "status": "berhasil",
  "gdrive_link": "https://drive.google.com/...",
  "license_link": "https://server.digipanel.id/api/v1/license/..."
}

Header X-Webhook-Signature berisi HMAC-SHA256 dari payload menggunakan webhook_secret kamu.

// Node.js verification
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(JSON.stringify(payload))
    .digest('hex');
  return signature === expected;
}
Rate Limiting

API dibatasi 30 request per menit per API key. Jika melebihi limit, response akan mengembalikan status 429 Too Many Requests.

Headers pada setiap response:
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 28
X-RateLimit-Reset: 1700000000
Error Codes
401

Unauthorized

API key tidak valid
402

Payment Required

Saldo tidak mencukupi
422

Unprocessable

URL tidak valid
429

Too Many Requests

Rate limit exceeded (30 req/menit)
500

Server Error

Saldo otomatis di-refund
Siap Integrasi?

Daftar akun, topup saldo, dan generate API key untuk mulai.

Gabung Sekarang