PLN Pascabayar (Tagihan Listrik)
Bayar tagihan listrik PLN pascabayar. Menggunakan alur dua langkah: inquiry tagihan → pembayaran.
Endpoint
| Endpoint | Keterangan |
|---|---|
POST /api/v1/merchant/ppob/pln/postpaid/inquiry | Inquiry tagihan, cek jumlah yang harus dibayar |
POST /api/v1/merchant/ppob/pln/postpaid/transaction | Bayar tagihan listrik |
Inquiry PLN Pascabayar
Mengambil informasi tagihan listrik pelanggan. Tidak memotong saldo.
URL: POST /api/v1/merchant/ppob/pln/postpaid/inquiry
Request
| Field | Tipe | Wajib | Keterangan |
|---|---|---|---|
product_id | String | Ya | Kode produk PLN pascabayar (dari katalog) |
cust_id | String | Ya | Nomor ID pelanggan PLN (bukan nomor meter) |
Contoh Request
{
"product_id": "PLNPOST",
"cust_id": "512345678901"
}
curl -X POST "https://api-sandbox.alfakios.com/api/v1/merchant/ppob/pln/postpaid/inquiry" \
-H "Content-Type: application/json" \
-H "X-API-Key: apk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{"product_id": "PLNPOST", "cust_id": "512345678901"}'
Response Inquiry Berhasil
{
"success": true,
"message": "PLN prepaid inquiry completed successfully",
"rc": "000",
"data": {
"req_id": "",
"ref_id": "1777946295495371000",
"product_id": "PLNPOST",
"cust_id": "512345678901",
"status": "SUCCESS",
"rc": "000",
"description": "Transaksi Sukses",
"message": "INQUIRY PLN POSTPAID KE 512345678901 SUKSES",
"amount": "285000",
"unit_price": "291000",
"balance_used": "0",
"balance": "500000",
"serial_no": "",
"data": {
"nama_pelanggan": "SITI RAHAYU",
"tarif": "R2/TR",
"daya": "2200 VA",
"id_pelanggan": "512345678901",
"periode": "APR 2024",
"tagihan": "285000",
"admin": "6000"
}
}
}
Pembayaran PLN Pascabayar
Membayar tagihan listrik. Saldo merchant akan dipotong.
URL: POST /api/v1/merchant/ppob/pln/postpaid/transaction
Request
| Field | Tipe | Wajib | Keterangan |
|---|---|---|---|
req_id | String | Ya | ID unik transaksi (idempotency key) |
product_id | String | Ya | Kode produk PLN pascabayar |
cust_id | String | Ya | ID pelanggan PLN (sama dengan inquiry) |
Contoh Request
{
"req_id": "TXN-20240501-030",
"product_id": "PLNPOST",
"cust_id": "512345678901"
}
curl -X POST "https://api-sandbox.alfakios.com/api/v1/merchant/ppob/pln/postpaid/transaction" \
-H "Content-Type: application/json" \
-H "X-API-Key: apk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{
"req_id": "TXN-20240501-030",
"product_id": "PLNPOST",
"cust_id": "512345678901"
}'
Response Berhasil
{
"success": true,
"message": "PLN prepaid top-up created successfully",
"rc": "000",
"data": {
"req_id": "TXN-20240501-030",
"ref_id": "1777946295495372000",
"product_id": "PLNPOST",
"cust_id": "512345678901",
"status": "SUCCESS",
"rc": "000",
"description": "Transaksi Sukses",
"message": "BAYAR TAGIHAN PLN 512345678901 SUKSES",
"amount": "285000",
"unit_price": "291000",
"balance_used": "291000",
"balance": "209000",
"serial_no": "REF-PLN-20240501",
"data": {
"nama_pelanggan": "SITI RAHAYU",
"periode": "APR 2024",
"nomor_struk": "REF-PLN-20240501"
}
}
}
Perbedaan PLN Prabayar vs Pascabayar
| Aspek | Prabayar | Pascabayar |
|---|---|---|
| Jenis Produk | Beli token | Bayar tagihan |
cust_id | Nomor meter | ID pelanggan PLN |
| Output | Token 20 digit | Nomor struk |
unit_price | Harga beli + admin | Tagihan + biaya admin |
Catatan
- Satu ID pelanggan PLN pascabayar bisa memiliki tagihan untuk beberapa bulan sekaligus. Konfirmasi dengan pelanggan sebelum melakukan pembayaran.
- Nomor struk pembayaran tersedia di
serial_nosetelah transaksi sukses.