Biller Products
PLN Prabayar
Espay menyediakan API untuk pembelian PLN Prabayar secara online. Integrasi dilakukan dengan cara mengirim permintaan ke layanan Bill Inquiry untuk mengecek detail token yang akan dibeli. Setelah itu, untuk menyelesaikan pembayaran, kirim permintaan ke layanan Bill Payment dengan menyertakan data yang diperoleh dari Bill Inquiry. Pelajari lebih lanjut Biller Product | Bill Inquiry dan Biller Product | Bill Payment.
Unduh koleksi Postman – PLN Prabayar di sini.
Kode Produk
PLN Prabayar
PLN Prabayar
| Kode Produk | Nama Produk | Jenis Transaksi |
|---|---|---|
| SLYLPR20 | PLN Prabayar 20.000 | PURCHASE |
| SLYLPR50 | PLN Prabayar 50.000 | PURCHASE |
| SLYLPR100 | PLN Prabayar 100.000 | PURCHASE |
| SLYLPR200 | PLN Prabayar 200.000 | PURCHASE |
| SLYLPR500 | PLN Prabayar 500.000 | PURCHASE |
| SLYLPR1000 | PLN Prabayar 1.000.000 | PURCHASE |
| SLYLPR5000 | PLN Prabayar 5.000.000 | PURCHASE |
| SLYLPR10000 | PLN Prabayar 10.0000.000 | PURCHASE |
| SLYLPR50000 | PLN Prabayar 50.000.000 | PURCHASE |
Bill Inquiry - PLN Prabayar 100.000
Contoh Permintaan
POST /rest/biller/inquirytransaction HTTP/1.1
Host: sandbox-api.espay.id
Content-Type: application/x-www-form-urlencoded
Authorization: Basic ZXNwYXktdGVzdDp0ZXN0
Content-Length: 224
rq_uuid=SANDBOXINQUIRYBILLER010105&
rq_datetime=2019-10-10%2011%3A01%3A30&
sender_id=SANDBOX&
password=test&
order_id=520520795556&
product_code=SLYLPR100&
signature=9d6eede295d8865adc9eefa3fc48c059d22773338b01284eb42ab688671a7c9c
Contoh Respons Positif
{
"rq_uuid":"SENDERIDUUID0001",
"rs_datetime":"2019-09-30 22:02:25",
"error_code":"0000",
"error_message":"Success ",
"order_id":"520520795556",
"amount":20250000,
"bill_amount":20000000,
"admin_fee":250000,
"description":"",
"data":{
"customer_id":"520520795556",
"customer_name":"RAISA",
"meter_serial":"520520795556",
"class":"R1 \/000001300",
"token_unsold1":"0",
"token_unsold2":"0",
"reff_no":"",
"price":"200000",
"admin_fee":"2500",
"remark":"01045731668100000000000000000000"
}
}
Contoh Respons Negatif
{
"rq_uuid": "SANDBOXINQUIRYBILLER010105",
"rs_datetime": "2025-10-20 12:43:47",
"error_code": "610",
"error_message": "Anda bisa melakukan transaksi yang sama setelah 5 menit"
}
Bill Payment - PLN Prabayar 100.000
Contoh Permintaan
POST /rest/biller/paymentreport HTTP/1.1
Host: sandbox-api.espay.id
Content-Type: application/x-www-form-urlencoded
Authorization: Basic ZXNwYXktdGVzdDp0ZXN0
Content-Length: 898
rq_uuid=SANDBOXPAYMENTBILLERPULSAPOSTPAID010107&
rq_datetime=2019-10-10%2011%3A02%3A30&
sender_id=SANDBOX&
password=test&
order_id=520520795556&
product_code=SLYLPR100&
amount=10000000&
signature=f46a2c34884c3d9194140f5ab595cae393749a0c5c25f23d2ebcfec3865196d1&
data={
"customer_id": "520520795556",
"customer_name": "Sam Lucas",
"meter_serial": "10077764594",
"class": "R1 /000001300",
"token_unsold1": "92784001488355688464",
"token_unsold2": "14883592784084640568",
"reff_no": "",
"price": "100000",
"admin_fee": "0"
}
Contoh Respons Positif
{
"rq_uuid":"SENDERIDUUID0001",
"rs_datetime":"2019-09-30 22:02:25",
"error_code":"0000",
"error_message":"Success ",
"order_id":"520520795556",
"amount":20250000,
"bill_amount":20000000,
"admin_fee":250000,
"description":"",
"data":{
"customer_id":"520520795556",
"customer_name":"RAISA",
"meter_serial":"520520795556",
"class":"R1 \/000001300",
"token_unsold1":"0",
"token_unsold2":"0",
"reff_no":"",
"price":"200000",
"admin_fee":"2500",
"remark":"01045731668100000000000000000000"
}
}
Contoh Respons Negatif
{
"rq_uuid": "SANDBOXPAYMENTBILLERPULSAPOSTPAID010107",
"rs_datetime": "2025-10-20 12:44:56",
"error_code": "610",
"error_message": "Anda bisa melakukan transaksi yang sama setelah 5 menit"
}
HTTP Bill Inquiry - PLN Prabayar 100.000
POST /rest/biller/inquirytransaction HTTP/1.1
Host: sandbox-api.espay.id
Content-Type: application/x-www-form-urlencoded
Authorization: Basic ZXNwYXktdGVzdDp0ZXN0
Content-Length: 224
rq_uuid=SANDBOXINQUIRYBILLER010105&rq_datetime=2019-10-10%2011%3A01%3A30&sender_id=SANDBOX&password=test&order_id=520520795556&product_code=SLYLPR100&signature=9d6eede295d8865adc9eefa3fc48c059d22773338b01284eb42ab688671a7c9c
HTTP Bill Payment - PLN Prabayar 100.000
POST /rest/biller/paymentreport HTTP/1.1
Host: sandbox-api.espay.id
Content-Type: application/x-www-form-urlencoded
Authorization: Basic ZXNwYXktdGVzdDp0ZXN0
Content-Length: 898
rq_uuid=SANDBOXPAYMENTBILLERPULSAPOSTPAID010107&rq_datetime=2019-10-10%2011%3A02%3A30&sender_id=SANDBOX&password=test&order_id=520520795556&product_code=SLYLPR100&amount=10000000&signature=f46a2c34884c3d9194140f5ab595cae393749a0c5c25f23d2ebcfec3865196d1&data=%7B%0A%20%20%20%20%20%20%20%20%22customer_id%22%3A%20%22520520795556%22%2C%0A%20%20%20%20%20%20%20%20%22customer_name%22%3A%20%22Sam%20Lucas%22%2C%0A%20%20%20%20%20%20%20%20%22meter_serial%22%3A%20%2210077764594%22%2C%0A%20%20%20%20%20%20%20%20%22class%22%3A%20%22R1%20%20%2F000001300%22%2C%0A%20%20%20%20%20%20%20%20%22token_unsold1%22%3A%20%2292784001488355688464%22%2C%0A%20%20%20%20%20%20%20%20%22token_unsold2%22%3A%20%2214883592784084640568%22%2C%0A%20%20%20%20%20%20%20%20%22reff_no%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%20%20%22price%22%3A%20%22100000%22%2C%0A%20%20%20%20%20%20%20%20%22admin_fee%22%3A%20%220%22%0A%20%20%20%20%7D
CURL Bill Inquiry - PLN Prabayar 100.000
curl --location 'https://sandbox-api.espay.id/rest/biller/inquirytransaction' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic ZXNwYXktdGVzdDp0ZXN0' \
--data-urlencode 'rq_uuid=SANDBOXINQUIRYBILLER010105' \
--data-urlencode 'rq_datetime=2019-10-10 11:01:30' \
--data-urlencode 'sender_id=SANDBOX' \
--data-urlencode 'password=test' \
--data-urlencode 'order_id=520520795556' \
--data-urlencode 'product_code=SLYLPR100' \
--data-urlencode 'signature=9d6eede295d8865adc9eefa3fc48c059d22773338b01284eb42ab688671a7c9c'
CURL Bill Payment - PLN Prabayar 100.000
curl --location 'https://sandbox-api.espay.id/rest/biller/paymentreport' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic ZXNwYXktdGVzdDp0ZXN0' \
--data-urlencode 'rq_uuid=SANDBOXPAYMENTBILLERPULSAPOSTPAID010107' \
--data-urlencode 'rq_datetime=2019-10-10 11:02:30' \
--data-urlencode 'sender_id=SANDBOX' \
--data-urlencode 'password=test' \
--data-urlencode 'order_id=520520795556' \
--data-urlencode 'product_code=SLYLPR100' \
--data-urlencode 'amount=10000000' \
--data-urlencode 'signature=f46a2c34884c3d9194140f5ab595cae393749a0c5c25f23d2ebcfec3865196d1' \
--data-urlencode 'data={
"customer_id": "520520795556",
"customer_name": "Sam Lucas",
"meter_serial": "10077764594",
"class": "R1 /000001300",
"token_unsold1": "92784001488355688464",
"token_unsold2": "14883592784084640568",
"reff_no": "",
"price": "100000",
"admin_fee": "0"
}'