Beranda / Developer
DeveloperSatu sore untuk integrasi
Dua endpoint yang Anda butuhkan, satu webhook, dan tanda tangan untuk memverifikasinya. Dokumentasi lengkap dikirim saat akun Bisnis aktif.
Endpoint
POST/v1/invoicesBuat tagihan. Mengembalikan id, qris (string QR), checkout_url, expires_at.GET/v1/invoices/{id}Status tagihan: pending, paid, expired, cancelled.POST/v1/invoices/{id}/cancelBatalkan tagihan yang masih pending.GET/v1/balanceSaldo tersedia, saldo tertahan, dan total pencairan.POST/v1/withdrawalsAjukan pencairan ke rekening bank yang terdaftar.HOOKinvoice.paidDikirim ke URL Anda saat lunas, header X-DorvePay-Signature (HMAC-SHA256). Dikirim ulang sampai 5 kali.Contoh PHP
// Buat tagihan
$ch = curl_init('https://api.dorve-pay.com/v1/invoices');
curl_setopt_array($ch, [
CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer '.$apiKey, 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'amount' => 250000,
'ext_ref' => 'ORDER-1042',
'customer' => ['name' => 'Budi'],
]),
]);
$inv = json_decode(curl_exec($ch), true);
header('Location: '.$inv['checkout_url']);
// Verifikasi webhook saat lunas
$raw = file_get_contents('php://input');
$sig = hash_hmac('sha256', $raw, $webhookSecret);
if (!hash_equals($sig, $_SERVER['HTTP_X_DORVEPAY_SIGNATURE'])) { http_response_code(401); exit; }
$event = json_decode($raw, true); // $event['type'] === 'invoice.paid'
Yang perlu Anda ketahui
Autentikasi
Bearer token per merchant. Kunci sandbox dan produksi terpisah; keduanya bisa diputar dari dashboard.
Idempoten
Kirim ext_ref yang sama dan Anda mendapat tagihan yang sama, bukan duplikat.
Sandbox
Uji seluruh alur termasuk webhook dengan pembayaran simulasi sebelum menyentuh uang sungguhan.