Informasi Dasar
Gunakan Base URL berikut untuk semua permintaan API:
https://pay.digitalpedia.web.id/api
Autentikasi: Masukkan API Key Anda pada header setiap request.
"headers": { "x-api-key": "dp_your_api_key_here" }
1. Cek Saldo
Gunakan endpoint ini untuk mengambil informasi saldo terbaru akun Anda.
POST
/api/balance
| Header | Deskripsi |
|---|---|
| x-api-key | API Key unik Anda WAJIB |
const axios = require('axios');
const API_KEY = 'dp_your_api_key_here';
const BASE_URL = 'https://pay.digitalpedia.web.id/api';
async function getBalance() {
try {
const res = await axios.post(`${BASE_URL}/balance`, {}, {
headers: { 'x-api-key': API_KEY }
});
console.log(res.data);
} catch(err) { console.error(err.response?.data); }
}
getBalance();
const API_KEY = 'dp_your_api_key_here';
const BASE_URL = 'https://pay.digitalpedia.web.id/api';
async function getBalance() {
try {
const res = await axios.post(`${BASE_URL}/balance`, {}, {
headers: { 'x-api-key': API_KEY }
});
console.log(res.data);
} catch(err) { console.error(err.response?.data); }
}
getBalance();
<?php
$apiKey = 'dp_your_api_key_here';
$url = 'https://pay.digitalpedia.web.id/api/balance';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: ' . $apiKey]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
?>
$apiKey = 'dp_your_api_key_here';
$url = 'https://pay.digitalpedia.web.id/api/balance';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: ' . $apiKey]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
?>
import requests
API_KEY = 'dp_your_api_key_here'
url = 'https://pay.digitalpedia.web.id/api/balance'
response = requests.post(url, headers={'x-api-key': API_KEY})
print(response.json())
API_KEY = 'dp_your_api_key_here'
url = 'https://pay.digitalpedia.web.id/api/balance'
response = requests.post(url, headers={'x-api-key': API_KEY})
print(response.json())
{
"success": true,
"balance": 75000,
"username": "wilzzofficial"
}
2. Buat Deposit (QRIS)
Membuat request deposit otomatis melalui jalur QRIS. Minimal Rp10.000.
POST
/api/deposit/create
| Header | Deskripsi | |
|---|---|---|
| x-api-key | API Key unik Anda WAJIB | |
| Body (JSON) | Tipe | Deskripsi |
| amount | Integer | Jumlah nominal deposit (min Rp10.000) WAJIB |
const axios = require('axios');
const API_KEY = 'dp_your_api_key_here';
const BASE_URL = 'https://pay.digitalpedia.web.id/api';
async function createDeposit(amount) {
try {
const res = await axios.post(`${BASE_URL}/deposit/create`,
{ amount },
{ headers: { 'x-api-key': API_KEY } }
);
console.log(res.data);
} catch(err) { console.error(err.response?.data); }
}
createDeposit(50000);
const API_KEY = 'dp_your_api_key_here';
const BASE_URL = 'https://pay.digitalpedia.web.id/api';
async function createDeposit(amount) {
try {
const res = await axios.post(`${BASE_URL}/deposit/create`,
{ amount },
{ headers: { 'x-api-key': API_KEY } }
);
console.log(res.data);
} catch(err) { console.error(err.response?.data); }
}
createDeposit(50000);
<?php
$apiKey = 'dp_your_api_key_here';
$amount = 50000;
$url = 'https://pay.digitalpedia.web.id/api/deposit/create';
$data = json_encode(['amount' => $amount]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: ' . $apiKey, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
?>
$apiKey = 'dp_your_api_key_here';
$amount = 50000;
$url = 'https://pay.digitalpedia.web.id/api/deposit/create';
$data = json_encode(['amount' => $amount]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: ' . $apiKey, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
?>
import requests
API_KEY = 'dp_your_api_key_here'
url = 'https://pay.digitalpedia.web.id/api/deposit/create'
response = requests.post(url,
json={'amount': 50000},
headers={'x-api-key': API_KEY}
)
print(response.json())
API_KEY = 'dp_your_api_key_here'
url = 'https://pay.digitalpedia.web.id/api/deposit/create'
response = requests.post(url,
json={'amount': 50000},
headers={'x-api-key': API_KEY}
)
print(response.json())
{
"success": true,
"deposit": {
"id": "DP-1002",
"amount": 50000,
"fee": 2500,
"total_payment": 52500,
"qr_image": "https://link-to-qris.png",
"status": "pending",
"expired_at": 1748512345678
}
}
3. Cek Status Deposit
Mengecek apakah transaksi sudah dibayar atau belum berdasarkan ID deposit.
POST
/api/deposit/status
| Header | Deskripsi | |
|---|---|---|
| x-api-key | API Key unik Anda WAJIB | |
| Body (JSON) | Tipe | Deskripsi |
| deposit_id | String | ID Transaksi dari create deposit WAJIB |
const axios = require('axios');
const API_KEY = 'dp_your_api_key_here';
const BASE_URL = 'https://pay.digitalpedia.web.id/api';
async function checkStatus(depositId) {
try {
const res = await axios.post(`${BASE_URL}/deposit/status`,
{ deposit_id: depositId },
{ headers: { 'x-api-key': API_KEY } }
);
console.log(res.data);
} catch(err) { console.error(err.response?.data); }
}
checkStatus('DP-1002');
const API_KEY = 'dp_your_api_key_here';
const BASE_URL = 'https://pay.digitalpedia.web.id/api';
async function checkStatus(depositId) {
try {
const res = await axios.post(`${BASE_URL}/deposit/status`,
{ deposit_id: depositId },
{ headers: { 'x-api-key': API_KEY } }
);
console.log(res.data);
} catch(err) { console.error(err.response?.data); }
}
checkStatus('DP-1002');
<?php
$apiKey = 'dp_your_api_key_here';
$depositId = 'DP-1002';
$url = 'https://pay.digitalpedia.web.id/api/deposit/status';
$data = json_encode(['deposit_id' => $depositId]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: ' . $apiKey, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
?>
$apiKey = 'dp_your_api_key_here';
$depositId = 'DP-1002';
$url = 'https://pay.digitalpedia.web.id/api/deposit/status';
$data = json_encode(['deposit_id' => $depositId]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: ' . $apiKey, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
?>
import requests
API_KEY = 'dp_your_api_key_here'
url = 'https://pay.digitalpedia.web.id/api/deposit/status'
response = requests.post(url,
json={'deposit_id': 'DP-1002'},
headers={'x-api-key': API_KEY}
)
print(response.json())
API_KEY = 'dp_your_api_key_here'
url = 'https://pay.digitalpedia.web.id/api/deposit/status'
response = requests.post(url,
json={'deposit_id': 'DP-1002'},
headers={'x-api-key': API_KEY}
)
print(response.json())
{
"success": true,
"status": "success",
"message": "Pembayaran diverifikasi"
}
4. Cancel Deposit
Membatalkan deposit yang masih dalam status pending. Deposit yang sudah dibayar atau expired tidak dapat dibatalkan.
POST
/api/deposit/cancel
| Header | Deskripsi | |
|---|---|---|
| x-api-key | API Key unik Anda WAJIB | |
| Body (JSON) | Tipe | Deskripsi |
| deposit_id | String | ID Transaksi yang akan dibatalkan WAJIB |
const axios = require('axios');
const API_KEY = 'dp_your_api_key_here';
const BASE_URL = 'https://pay.digitalpedia.web.id/api';
async function cancelDeposit(depositId) {
try {
const res = await axios.post(`${BASE_URL}/deposit/cancel`,
{ deposit_id: depositId },
{ headers: { 'x-api-key': API_KEY } }
);
console.log(res.data);
} catch(err) { console.error(err.response?.data); }
}
cancelDeposit('DP-1002');
const API_KEY = 'dp_your_api_key_here';
const BASE_URL = 'https://pay.digitalpedia.web.id/api';
async function cancelDeposit(depositId) {
try {
const res = await axios.post(`${BASE_URL}/deposit/cancel`,
{ deposit_id: depositId },
{ headers: { 'x-api-key': API_KEY } }
);
console.log(res.data);
} catch(err) { console.error(err.response?.data); }
}
cancelDeposit('DP-1002');
<?php
$apiKey = 'dp_your_api_key_here';
$depositId = 'DP-1002';
$url = 'https://pay.digitalpedia.web.id/api/deposit/cancel';
$data = json_encode(['deposit_id' => $depositId]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: ' . $apiKey, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
?>
$apiKey = 'dp_your_api_key_here';
$depositId = 'DP-1002';
$url = 'https://pay.digitalpedia.web.id/api/deposit/cancel';
$data = json_encode(['deposit_id' => $depositId]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: ' . $apiKey, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
?>
import requests
API_KEY = 'dp_your_api_key_here'
url = 'https://pay.digitalpedia.web.id/api/deposit/cancel'
response = requests.post(url,
json={'deposit_id': 'DP-1002'},
headers={'x-api-key': API_KEY}
)
print(response.json())
API_KEY = 'dp_your_api_key_here'
url = 'https://pay.digitalpedia.web.id/api/deposit/cancel'
response = requests.post(url,
json={'deposit_id': 'DP-1002'},
headers={'x-api-key': API_KEY}
)
print(response.json())
{
"success": true,
"message": "Deposit dibatalkan"
}
// Contoh response error (deposit sudah dibayar)
{ "success": false, "error": "Deposit tidak bisa dibatalkan" }
{ "success": false, "error": "Deposit tidak bisa dibatalkan" }
Butuh Integrasi Khusus?
Tim kami siap membantu Anda 24/7 untuk masalah teknis maupun integrasi API ke panel Anda sendiri.
Hubungi Engineer →