Dokumentasi API Developer
Spesifikasi REST API, generator dynamic QRIS GoPay, webhook callback instan, dan kode integrasi.
Integrasi Pembayaran QRIS ClashPay
Hubungkan pembayaran QRIS otomatis GoPay ke platform e-commerce, web checkout, atau aplikasi kasir Anda. Sistem memproses nominal statis maupun dinamis dengan pencocokan instan via webhook HTTP POST terenkripsi HMAC-SHA256.
Membuat tagihan pembayaran baru dan menghasilkan string QRIS dynamic yang terhubung langsung ke akun GoBiz merchant.
Request Body (JSON)
| Parameter | Tipe | Wajib | Keterangan |
|---|---|---|---|
amount | Integer | Wajib | Nominal transaksi (minimal Rp 1.000) |
order_id | String | Wajib | ID referensi pesanan unik dari sistem mitra |
customer_name | String | Opsional | Nama pembeli atau pelanggan |
customer_email | String | Opsional | Email pembeli |
customer_phone | String | Opsional | Nomor WhatsApp/HP pelanggan |
callback_url | String | Opsional | URL Webhook tujuan notifikasi realtime |
Contoh Response (JSON)
{
"status": true,
"message": "Invoice QRIS berhasil dibuat",
"data": {
"invoice_no": "INV20260921001",
"order_id": "ORDER-98721",
"amount": 50000,
"status": "PENDING",
"qr_string": "00020101021226590014ID.LINKAJA.WWW0118936009110000000000...",
"qr_image_url": "https://api.clashpay.cloud/api/gopay/qr/INV20260921001",
"checkout_url": "https://api.clashpay.cloud/pay/INV20260921001",
"expired_at": "2026-09-21 16:30:00"
}
}
Memeriksa status pembayaran transaksi terkini secara manual berdasarkan invoice number.
Contoh Response (JSON)
{
"status": true,
"data": {
"invoice_no": "INV20260921001",
"order_id": "ORDER-98721",
"amount": 50000,
"status": "PAID",
"paid_at": "2026-09-21 15:15:24",
"settlement_time": "2026-09-21 15:15:24"
}
}
Ketika pelanggan selesai memindai dan membayar QRIS di aplikasi GoPay, BCA, DANA, OVO, ShopeePay, atau m-banking lainnya, engine ClashPay akan mendeteksi mutasi dan langsung mengirimkan HTTP POST ke callback_url sistem Anda.
X-Callback-Signature: hash_hmac('sha256', invoice_no + order_id + amount + status, api_secret)
Payload JSON Webhook yang Dikirim
{
"event": "payment.success",
"invoice_no": "INV20260921001",
"order_id": "ORDER-98721",
"amount": 50000,
"status": "PAID",
"paid_at": "2026-09-21 15:15:24",
"signature": "8f3b207a0c1081e28fa80249..."
}
Server mitra Anda wajib merespon dengan status HTTP 200 OK dengan body {"status": true}.
Contoh Kode Integrasi
curl -X POST https://api.clashpay.cloud/api/gopay/create \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "X-Api-Secret: YOUR_API_SECRET" \
-d '{
"amount": 25000,
"order_id": "ORD-12345",
"customer_name": "Budi Santoso",
"callback_url": "https://yoursite.com/callback"
}'
<?php
$payload = [
'amount' => 25000,
'order_id' => 'ORD-12345',
'customer_name' => 'Budi Santoso',
'callback_url' => 'https://yoursite.com/callback'
];
$ch = curl_init('https://api.clashpay.cloud/api/gopay/create');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'X-Api-Key: YOUR_API_KEY',
'X-Api-Secret: YOUR_API_SECRET'
]);
$response = curl_exec($ch);
$result = json_decode($response, true);
print_r($result);
?>
const axios = require('axios');
async function createQris() {
const res = await axios.post('https://api.clashpay.cloud/api/gopay/create', {
amount: 25000,
order_id: 'ORD-12345',
customer_name: 'Budi Santoso',
callback_url: 'https://yoursite.com/callback'
}, {
headers: {
'Content-Type': 'application/json',
'X-Api-Key': 'YOUR_API_KEY',
'X-Api-Secret': 'YOUR_API_SECRET'
}
});
console.log(res.data);
}
createQris();
import requests
headers = {
'Content-Type': 'application/json',
'X-Api-Key': 'YOUR_API_KEY',
'X-Api-Secret': 'YOUR_API_SECRET'
}
data = {
'amount': 25000,
'order_id': 'ORD-12345',
'customer_name': 'Budi Santoso',
'callback_url': 'https://yoursite.com/callback'
}
res = requests.post('https://api.clashpay.cloud/api/gopay/create', json=data, headers=headers)
print(res.json())
Live API Tester & Playground
Jalankan pengujian langsung request pembuatan dynamic QRIS dari browser menggunakan sesi akun Anda.// Respon API akan muncul di sini setelah request dikirim...