Skip to main content

Cek Tagihan Pascabayar

Endpoint untuk mengecek detail tagihan sebelum melakukan pembayaran. Inquiry tidak memotong saldo.

Endpoint: POST /v1/order

info

Simpan ref_id dari response inquiry — wajib digunakan saat Bayar Tagihan. Sesi inquiry berlaku 5 menit.

Parameter Request

ParameterTipeWajibKeterangan
api_idstringAPI ID
timestampintegerUnix timestamp
signaturestringHMAC-SHA256
cmdstringHarus inquiry
codestringKode produk pascabayar dari Daftar Produk
customer_nostringNomor pelanggan / ID pelanggan / nomor meter
ref_idstringID referensi unik — jika kosong di-generate otomatis
testingbooleantrue untuk mode testing. Default: false

Contoh Request

<?php
$api_id = 'your_api_id';
$api_key = 'your_api_key';
$secret_key = 'your_secret_key';
$timestamp = time();

// Business params
$businessParams = [
'cmd' => 'inquiry',
'code' => 'MPBPJS',
'customer_no' => '1234567890',
'ref_id' => 'INQ-' . uniqid(),
];

// 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);

// Simpan ref_id untuk pembayaran
$ref_id = $response['data']['ref_id'];

Contoh Response

{
"success": true,
"code": "BILL_INQUIRY_SUCCESS",
"message": "Tagihan berhasil ditemukan",
"data": {
"ref_id": "INQ-001",
"status": "success",
"customer_no": "122219256576",
"customer_name": "Demo Member",
"code": "MPBPJS",
"tagihan": 22500,
"admin": 2700,
"total": 25200,
"desc": {
"jumlah_peserta": "2",
"lembar_tagihan": 1,
"alamat": "JAKARTA PUSAT",
"detail": [{ "periode": "01" }]
}
},
"errors": null,
"meta": null
}

Field Response

FieldTipeKeterangan
ref_idstringSimpan ini — wajib dipakai saat pembayaran
statusstringStatus inquiry (success / failed)
customer_nostringNomor pelanggan
customer_namestringNama pelanggan sesuai tagihan
codestringKode produk
tagihanintegerNilai tagihan sebelum admin (Rp)
adminintegerBiaya admin (Rp)
totalintegerTotal yang harus dibayar = tagihan + admin (Rp)
descobjectDetail tagihan — struktur berbeda per jenis layanan
tip

Tampilkan customer_name, tagihan, admin, dan total ke user sebelum konfirmasi pembayaran.