E-Wallet
Top-up saldo e-wallet pelanggan (GoPay, OVO, Dana, ShopeePay, dll) menggunakan alur dua langkah: inquiry → payment.
Endpoint
| Endpoint | Keterangan |
|---|---|
POST /api/v1/merchant/ppob/ewallet/inquiry | Validasi transaksi sebelum eksekusi |
POST /api/v1/merchant/ppob/ewallet/transaction | Eksekusi top-up e-wallet |
Alur Transaksi
1. Inquiry — validasi nomor e-wallet dan cek harga
2. Payment — eksekusi top-up (potong saldo merchant)
Inquiry E-Wallet
Memvalidasi nomor e-wallet dan mendapatkan informasi harga sebelum eksekusi. Tidak memotong saldo.
URL: POST /api/v1/merchant/ppob/ewallet/inquiry
Request
| Field | Tipe | Wajib | Keterangan |
|---|---|---|---|
product_id | String | Ya | Kode produk e-wallet (dari katalog) |
cust_id | String | Ya | Nomor HP / ID akun e-wallet tujuan |
amount | String | Ya | Nominal top-up dalam IDR (digits only, min "1000") |
req_id | String | Tidak | ID request untuk tracing (opsional pada inquiry) |
Contoh Request
{
"product_id": "GOPAY",
"cust_id": "08123456789",
"amount": "50000"
}
curl -X POST "https://api-sandbox.alfakios.com/api/v1/merchant/ppob/ewallet/inquiry" \
-H "Content-Type: application/json" \
-H "X-API-Key: apk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{
"product_id": "GOPAY",
"cust_id": "08123456789",
"amount": "50000"
}'
Response Inquiry Berhasil
{
"success": true,
"message": "E-wallet inquiry completed successfully",
"rc": "000",
"data": {
"req_id": "",
"ref_id": "1777946295495371000",
"product_id": "GOPAY",
"cust_id": "08123456789",
"status": "SUCCESS",
"rc": "000",
"description": "Transaksi Sukses",
"message": "INQUIRY GOPAY 50000 KE 08123456789 SUKSES",
"amount": "50000",
"unit_price": "51500",
"balance_used": "0",
"balance": "500000",
"serial_no": "",
"data": {}
}
}
Payment E-Wallet
Mengeksekusi top-up e-wallet. Saldo merchant akan dipotong.
URL: POST /api/v1/merchant/ppob/ewallet/transaction
Request
| Field | Tipe | Wajib | Keterangan |
|---|---|---|---|
req_id | String | Ya | ID unik transaksi (idempotency key) |
product_id | String | Ya | Kode produk e-wallet (sama dengan inquiry) |
cust_id | String | Ya | Nomor HP / ID akun e-wallet (sama dengan inquiry) |
amount | String | Ya | Nominal top-up (sama dengan inquiry) |
Contoh Request
{
"req_id": "TXN-20240501-010",
"product_id": "GOPAY",
"cust_id": "08123456789",
"amount": "50000"
}
curl -X POST "https://api-sandbox.alfakios.com/api/v1/merchant/ppob/ewallet/transaction" \
-H "Content-Type: application/json" \
-H "X-API-Key: apk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{
"req_id": "TXN-20240501-010",
"product_id": "GOPAY",
"cust_id": "08123456789",
"amount": "50000"
}'
Response Payment Berhasil
{
"success": true,
"message": "E-wallet payment created successfully",
"rc": "000",
"data": {
"req_id": "TXN-20240501-010",
"ref_id": "1777946295495372000",
"product_id": "GOPAY",
"cust_id": "08123456789",
"status": "SUCCESS",
"rc": "000",
"description": "Transaksi Sukses",
"message": "TOPUP GOPAY 50000 KE 08123456789 SUKSES",
"amount": "50000",
"unit_price": "51500",
"balance_used": "51500",
"balance": "448500",
"serial_no": "GW123456789",
"data": {}
}
}
Response Saldo Tidak Cukup
{
"success": true,
"message": "Transaction failed",
"rc": "008",
"data": {
"req_id": "TXN-20240501-011",
"status": "FAILED",
"rc": "008",
"description": "Insufficient Balance",
"message": "Saldo deposit tidak mencukupi",
"balance": "10000",
"data": {}
}
}
Contoh Kode Produk E-Wallet
product_id | Operator | Keterangan |
|---|---|---|
GOPAY | GoPay | Top-up GoPay via nomor HP |
OVO | OVO | Top-up OVO via nomor HP |
DANA | DANA | Top-up DANA via nomor HP |
SHOPEEPAY | ShopeePay | Top-up ShopeePay |
LINKAJA | LinkAja | Top-up LinkAja |
Gunakan endpoint Katalog Produk untuk daftar lengkap yang tersedia di akun merchant Anda.
Catatan
- Inquiry tidak wajib dilakukan sebelum payment — Anda bisa langsung ke payment jika sudah mengetahui harganya dari katalog.
- Gunakan
req_idyang sama untuk retry jika terjadi timeout.