Dokumentasi API API Documentation
Panduan lengkap integrasi Entropi Payment Gateway Complete integration guide for Entropi Payment Gateway
Entropi Payment Gateway menyediakan REST API untuk menerima pembayaran dari Virtual Account, E-Wallet, QRIS, dan Retail. Entropi Payment Gateway provides REST API to accept payments from Virtual Account, E-Wallet, QRIS, and Retail.
Base URL
https://staging.entropi.id/api/v1
Autentikasi Authentication
Semua API endpoint memerlukan autentikasi HMAC All API endpoints require HMAC authentication
Required Headers
| Header | Deskripsi Description |
|---|---|
| X-Api-Key | API Key dari dashboard API Key from dashboard |
| X-Signature | HMAC SHA256 signature |
| X-Timestamp | Unix timestamp (seconds) |
| Content-Type | application/json |
Membuat Signature Generating Signature
String to sign: METHOD|PATH|TIMESTAMP|BODY
$method = 'POST';
$path = '/transactions';
$timestamp = time();
$body = json_encode(['amount' => 50000]);
$stringToSign = "{$method}|{$path}|{$timestamp}|{$body}";
$signature = hash_hmac('sha256', $stringToSign, $apiSecret);
const crypto = require('crypto');
const timestamp = Math.floor(Date.now() / 1000);
const body = JSON.stringify({amount: 50000});
const stringToSign = `POST|/transactions|${timestamp}|${body}`;
const signature = crypto.createHmac('sha256', apiSecret)
.update(stringToSign).digest('hex');
TIMESTAMP=$(date +%s)
BODY='{"amount":50000}'
STRING="POST|/transactions|${TIMESTAMP}|${BODY}"
SIGNATURE=$(echo -n "$STRING" | openssl dgst -sha256 -hmac "$SECRET")
Penanganan Error Error Handling
| Code | HTTP | Deskripsi Description |
|---|---|---|
| INVALID_API_KEY | 401 | API key tidak valid Invalid API key |
| INVALID_SIGNATURE | 401 | Signature tidak valid Invalid signature |
| VALIDATION_ERROR | 422 | Validasi input gagal Input validation failed |
| RATE_LIMIT | 429 | Terlalu banyak request Too many requests |
/v1/transactions
Membuat transaksi pembayaran baru Create a new payment transaction
Request Body
{
"amount": 50000,
"channel_code": "QRIS",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"callback_url": "https://yoursite.com/webhook",
"expiry_minutes": 60
}
Parameters
| Parameter | Type | Required | Deskripsi Description |
|---|---|---|---|
| amount | number | Yes | Nominal (min: 1000) Amount (min: 1000) |
| channel_code | string | Yes | Kode channel pembayaran Payment channel code |
| customer_name | string | Yes | Nama customer Customer name |
| customer_email | string | Yes | Email customer Customer email |
| callback_url | string | No | Webhook URL |
Payment Channels
Response (201)
{
"success": true,
"data": {
"ref_id": "TRX-ABC123",
"amount": 50000,
"status": "pending",
"checkout_url": "https://staging.entropi.id/checkout/TRX-ABC123",
"expires_at": "2026-01-07T11:00:00Z"
}
}
/v1/transactions/{"{ref_id}"}
Cek status transaksi Check transaction status
Transaction Status
/v1/payment-links
Buat payment link untuk dibagikan ke customer Create payment link to share with customers
Request Body
{
"title": "Premium Membership",
"type": "fixed",
"amount": 150000,
"customer": {
"name": "John Doe",
"email": "john@example.com"
},
"limit_usage": 100,
"expired_at": "2026-02-07T00:00:00Z"
}
/v1/payment-links/quick
Buat payment link instan (cocok untuk invoice) Create instant payment link (suitable for invoices)
{
"title": "Invoice #INV-2026-001",
"amount": 500000,
"customer_name": "John Doe",
"customer_email": "john@example.com",
"single_use": true
}
/v1/merchant/balance
Cek saldo merchant Check merchant balance
{
"success": true,
"data": {
"balance": 2500000,
"balance_formatted": "Rp 2.500.000",
"available_for_withdrawal": 2350000
}
}
Webhooks
Terima notifikasi real-time saat status transaksi berubah Receive real-time notifications when transaction status changes
Webhook Payload
{
"event": "transaction.paid",
"data": {
"ref_id": "TRX-ABC123",
"amount": 50000,
"status": "paid",
"paid_at": "2026-01-07T10:45:30Z"
}
}
Events yang Tersedia Available Events
| Event | Deskripsi Description |
|---|---|
| transaction.paid | Transaksi berhasil dibayar Transaction successfully paid |
| transaction.expired | Transaksi expired Transaction expired |
| withdrawal.completed | Withdrawal berhasil Withdrawal completed |
Rate Limiting
Sandbox
100 req/min
Production
1000 req/min