Skip to main content

Bayar Tagihan Pascabayar

Endpoint untuk melakukan pembayaran tagihan setelah inquiry berhasil.

Endpoint: POST /v1/order

warning

Gunakan ref_id yang sama dengan saat inquiry. Sesi inquiry berlaku 5 menit — jika habis, ulangi inquiry dari awal.

Parameter Request

ParameterTipeWajibKeterangan
api_idstringAPI ID
timestampintegerUnix timestamp
signaturestringHMAC-SHA256
cmdstringHarus pay-pasca
codestringKode produk (sama dengan saat inquiry)
customer_nostringNomor pelanggan (sama dengan saat inquiry)
ref_idstringRef ID dari response inquiry
testingbooleantrue untuk mode testing. Default: false

Contoh Request

<?php
// Lanjutan dari inquiry — gunakan $ref_id yang sudah disimpan
$api_id = 'your_api_id';
$api_key = 'your_api_key';
$secret_key = 'your_secret_key';
$timestamp = time();

// Business params
$businessParams = [
'cmd' => 'pay-pasca',
'code' => 'MPBPJS',
'customer_no' => '1234567890',
'ref_id' => $ref_id, // dari response inquiry
];

// Urutkan A ke Z (ksort)
ksort($businessParams);

$canonicalBody = json_encode($businessParams, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
$bodyHash = hash('sha256', $canonicalBody);
$stringToSign = implode('|', [$api_id, $api_key, $timestamp, $bodyHash]);
$signature = hash_hmac('sha256', $stringToSign, $secret_key);

$payload = array_merge($businessParams, [
'api_id' => $api_id,
'timestamp' => $timestamp,
'signature' => $signature,
]);

$ch = curl_init('https://api.isikuota.com/v1/order');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);

Contoh Response

{
"success": true,
"code": "BILL_PAYMENT_SUCCESS",
"message": "Pembayaran tagihan berhasil",
"data": {
"ref_id": "INQ-001",
"status": "success",
"customer_no": "08123456789",
"customer_name": "Demo Member",
"code": "MPBPJS",
"tagihan": 22500,
"admin": 2700,
"total": 25200,
"sn": "S1234554321N",
"desc": {
"jumlah_peserta": "2",
"lembar_tagihan": 1,
"alamat": "JAKARTA PUSAT",
"detail": [{ "periode": "01" }]
},
"created_at": "2026-05-31 10:41:16"
},
"errors": null,
"meta": null
}

Field Response

FieldTipeKeterangan
ref_idstringID referensi transaksi
statusstringStatus pembayaran (success / pending / failed)
customer_nostringNomor pelanggan
customer_namestringNama pelanggan
codestringKode produk
tagihanintegerNilai tagihan sebelum admin (Rp)
adminintegerBiaya admin (Rp)
totalintegerTotal yang dibayarkan (Rp)
snstring/nullSerial number bukti bayar (null jika masih pending)
descobjectDetail tagihan
created_atstringWaktu transaksi dibuat