API Documentation
Integrasi pembayaran multi-channel dengan PayGate Pro. Terima pembayaran QRIS, Virtual Account, GoPay, ShopeePay dari semua bank dan e-wallet Indonesia. Customer memilih metode langsung di halaman checkout branded Anda.
Cepat
Integrasi dalam 5 menit
Aman
HMAC-SHA256 webhook
QRIS
Semua bank & e-wallet
Authentication
Semua request API memerlukan header Authorization dengan Bearer token.
Authorization: Bearer YOUR_API_KEY
Penting: API Key bisa ditemukan di Dashboard Merchant setelah akun diaktifkan oleh admin. Jaga kerahasiaan API Key Anda.
Base URL
https://pay.clipku.com/api/index.php
Error Handling
API menggunakan HTTP status code standar. Response error selalu dalam format JSON.
| Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request berhasil |
| 201 | Created | Resource berhasil dibuat |
| 400 | Bad Request | Request tidak valid (parameter salah/kurang) |
| 401 | Unauthorized | API key tidak valid atau tidak ada |
| 403 | Forbidden | Merchant tidak aktif |
| 404 | Not Found | Resource tidak ditemukan |
| 429 | Too Many Requests | Rate limit terlampaui |
| 500 | Server Error | Kesalahan internal server |
{
"success": false,
"error": "Pesan error detail"
}
Create Transaction
Buat transaksi pembayaran baru. Customer akan diarahkan ke halaman checkout branded Anda untuk memilih metode pembayaran (QRIS, VA Bank, GoPay, ShopeePay).
POST https://pay.clipku.com/api/index.php?action=create_transaction
Request Body (JSON)
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | integer | Yes | Jumlah pembayaran (Rupiah) |
| order_id | string | No | Order ID unik (auto-generate jika kosong) |
| payment_channel | string | No | Channel: qris (default) atau midtrans |
| payment_method | string | No | Metode: QRIS-A, BCAVA, BNIVA, GOPAY, dll |
| link_name | string | No | Nama/deskripsi pembayaran |
| customer_name | string | No | Nama customer |
| customer_email | string | No | Email customer |
| customer_wa | string | No | Nomor WhatsApp (08xxxx) |
| webhook_url | string | No | URL callback notifikasi |
| redirect_url | string | No | URL redirect setelah bayar |
Payment Channels:
Atau kosongkan payment_channel → customer pilih sendiri di halaman checkout.
Payment Method Codes
| Code | Metode | Tampilan di Checkout |
|---|---|---|
| QRIS-A | QRIS | QR Code scan semua bank & e-wallet |
| BCAVA | VA BCA | Nomor VA + Copy |
| BNIVA | VA BNI | Nomor VA + Copy |
| BRIVA | VA BRI | Nomor VA + Copy |
| PERMATAVA | VA Permata | Nomor VA + Copy |
| CIMBVA | VA CIMB Niaga | Nomor VA + Copy |
| MANDIRI | Mandiri Bill Payment | Bill Key + Biller Code |
| MTQRIS | QRIS (Multi-Bank) | QR Code |
| GOPAY | GoPay | QR + Deeplink |
| SHOPEEPAY | ShopeePay | Deeplink ke app |
Alur Pembayaran:
- Create transaction via API (tanpa
payment_channel= customer pilih sendiri) - Redirect/arahkan customer ke
payment_urlyang dikembalikan - Customer melihat daftar metode pembayaran dan memilih salah satu
- Sistem memanggil provider (system) dan menampilkan detail (VA/QR/deeplink)
- Customer bayar → webhook masuk → status otomatis berubah ke PAID
Request Example
curl -X POST "https://pay.clipku.com/api/index.php?action=create_transaction" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 50000,
"order_id": "INV-001",
"payment_channel": "midtrans",
"payment_method": "BCAVA",
"customer_name": "John Doe"
}'
Response (201)
{
"success": true,
"data": {
"id": "a1b2c3d4-...",
"order_id": "INV-001",
"amount": 50000,
"fee": 350,
"net_amount": 49650,
"status": "PENDING",
"payment_channel": "midtrans",
"payment_method": "BCAVA",
"payment_url": "https://pay.../pay.php?order_id=INV-001",
"qr_url": null,
"created_at": "2026-07-08 10:00:00"
}
}
Get Transaction
Cek status dan detail transaksi berdasarkan order_id.
GET https://pay.clipku.com/api/index.php?action=get_transaction&order_id=INV-001
{
"success": true,
"data": {
"id": "a1b2c3d4-...",
"order_id": "INV-001",
"amount": 50000,
"fee": 350,
"net_amount": 49650,
"status": "PAID",
"payment_url": "https://...",
"qr_url": "https://...",
"paid_at": "2026-07-08 10:05:00",
"created_at": "2026-07-08 10:00:00"
}
}
Get Wallet
Lihat saldo wallet merchant (available, pending, hold).
GET https://pay.clipku.com/api/index.php?action=wallet
{
"success": true,
"data": {
"available_balance": 500000,
"pending_balance": 50000,
"hold_balance": 0,
"withdrawn_balance": 200000,
"total_received": 750000,
"total_fee": 5250
}
}
Get Withdrawals
Lihat riwayat penarikan dana (withdrawal).
GET https://pay.clipku.com/api/index.php?action=withdrawals
{
"success": true,
"data": [
{
"id": "wd-uuid-...",
"amount": 100000,
"bank_name": "BCA",
"account_number": "123****890",
"status": "SUCCESS",
"created_at": "2026-07-07 09:00:00"
}
]
}
Webhook Events
Saat status pembayaran berubah, sistem akan mengirim HTTP POST ke webhook URL yang dikonfigurasi. Pastikan endpoint Anda merespon dengan HTTP 200.
{
"order_id": "INV-001",
"transaction_status": "settlement",
"status_code": "200",
"gross_amount": "50000.00",
"transaction_time": "2026-07-08 10:05:00"
}
Headers yang dikirim:
Content-Type: application/jsonX-Signature: HMAC-SHA256 hash
Signature Validation
Setiap webhook memiliki header X-Signature. Validasi signature untuk memastikan webhook asli dari kami.
// Ambil raw body dan signature
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_SIGNATURE'] ?? '';
// Hitung signature dengan API key Anda
$expected = hash_hmac('sha256', $payload, $yourApiKey);
// Bandingkan (timing-safe)
if (!hash_equals($expected, $signature)) {
http_response_code(403);
die('Invalid signature');
}
// Proses webhook...
$data = json_decode($payload, true);
$orderId = $data['order_id'];
$status = $data['transaction_status'];
const crypto = require('crypto');
app.post('/webhook', (req, res) => {
const payload = JSON.stringify(req.body);
const signature = req.headers['x-signature'];
const expected = crypto
.createHmac('sha256', YOUR_API_KEY)
.update(payload)
.digest('hex');
if (signature !== expected) {
return res.status(403).send('Invalid');
}
// Process webhook...
res.status(200).send('OK');
});
Transaction Status
Status yang mungkin diterima di webhook atau saat cek transaksi:
PAID
Pembayaran berhasil
PENDING
Menunggu pembayaran
FAILED
Pembayaran gagal
EXPIRED
Waktu habis
Status Mapping dari Webhook
| Webhook Value | Internal Status |
|---|---|
| paid, success, settlement, completed | PAID |
| pending, unpaid, waiting | PENDING |
| failed, cancel, canceled, cancelled, error | FAILED |
| expired, expire | EXPIRED |
PayGate Pro API v1.0 — Payment Gateway Multi Merchant
© 2026 All rights reserved.