Biller Products
BPJS Kesehatan
Espay menyediakan API untuk memproses pembayaran BPJS Kesehatan secara online. Integrasi dilakukan dengan cara mengirim permintaan ke layanan Bill Inquiry dengan menyertakan kode pelanggan. Setelah itu, untuk menyelesaikan pembayaran, kirim permintaan ke layanan Bill Payment dengan menyertakan data yang diperoleh dari Bill Inquiry. Pelajari lebih lanjut Bill Inquiry dan Bill Payment.
Unduh koleksi Postman – BPJS Kesehatan di sini
Kode Produk
BPJS Kesehatan
BPJS Kesehatan
| Kode Produk | Nama Produk | Jenis Transaksi |
|---|---|---|
| BPJSKS | BPJS Kesehatan | PAYMENT |
Bill Inquiry - BPJS Kesehatan
Contoh Permintaan
POST /rest/biller/inquirytransaction HTTP/1.1
Host: sandbox-api.espay.id
Content-Type: application/x-www-form-urlencoded
Authorization: ••••••
Content-Length: 225
rq_uuid=SANDBOXINQUIRYBILLER010101034&
rq_datetime=2019-10-10%2011%3A01%3A30&
sender_id=SANDBOX&
password=test&
order_id=8801835307911&
product_code=BPJSKS&
signature=9d6eede295d8865adc9eefa3fc48c059d22773338b01284eb42ab688671a7c9c
Contoh Respons Positif
{
"rq_uuid":"SANDBOXINQUIRYBILLER010101034",
"rs_datetime":"2025-02-14 14:41:39",
"error_code":"0000",
"error_message":"Success",
"amount":10500000,
"bill_amount":10500000,
"admin_fee":500000,
"data":{
"va_number":"8801835307911",
"customer_id":"8801835307911",
"customer_name":"ONI SAPUTRA PRATAMA",
"family_number":"1",
"bill_period":"1",
"bill_amount":105000,
"admin_fee":5000,
"amount":105000,
"remain_payment":0,
"reff_code":"00000000000000000000004387103120",
"branch_code":"2301",
"branch_name":"JAKARTA",
"remark":""
}
}
Contoh Respons Negatif
{
"rq_uuid":"SANDBOXINQUIRYBILLER010101034",
"rs_datetime":"2025-02-14 14:44:17",
"error_code":405,
"error_desc":"product denied"
}
Bill Payment - BPJS Kesehatan
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: 1094
rq_uuid=SANDBOXPAYMENTBILLER010102987876&
rq_datetime=2019-10-10%2011%3A02%3A30&
sender_id=SANDBOX&
password=test&
order_id=8801835307911&
roduct_code=BPJSKS&
amount=8750000&
signature=f46a2c34884c3d9194140f5ab595cae393749a0c5c25f23d2ebcfec3865196d1&
data={
"va_number":"8801835307911",
"customer_id":"8801835307911",
"customer_name":"EKO SUPRAPTO",
"family_number":1,
"bill_period":1,
"bill_amount":85000,
"admin_fee":2500,
"amount":87500,
"remain_payment":0,
"reff_code":"00000004985600000000000000000000",
"branch_code":"0101",
"branch_name":"BANDA ACEH",
"remark":""
}
Contoh Respons Positif
{
"rq_uuid":"SANDBOXPAYMENTBILLER010102987876",
"rs_datetime":"2025-02-14 14:44:41",
"error_code":"0000",
"error_message":"Success",
"ref_id":"BPJS20250214144441",
"order_id":"8801835307911",
"recon_ref":"425F30F055AD7812",
"data":{
"reff":"425F30F055AD7812",
"va_number":"8801835307911",
"customer_id":"8801835307911",
"customer_name":"ONI SAPUTRA PRATAMA",
"family_number":"1",
"remain_payment":0,
"bill_period":1,
"bill_amount":100000,
"catatan":"BPJS KESEHATAN MENYATAKAN STRUK INI SEBAGAI BUKTI PEMBAYARAN YANG SAH",
"admin_fee":5000,
"amount":102500,
"message":"SEGERA DAFTARKAN AUTODEBIT IURAN JKN ! MUDAH, AMAN, TEPAT WAKTU, PRAKTIS"
}
}
Contoh Respons Negatif
{
"rq_uuid":"SANDBOXPAYMENTBILLER010102987876",
"rs_datetime":"2025-02-14 14:46:29",
"error_code":405,
"error_desc":"product denied"
}
HTTP Bill Inquiry - BPJS Kesehatan
POST /rest/biller/inquirytransaction HTTP/1.1
Host: sandbox-api.espay.id
Content-Type: application/x-www-form-urlencoded
Authorization: Basic ZXNwYXktdGVzdDp0ZXN0
Content-Length: 225
rq_uuid=SANDBOXINQUIRYBILLER010101034&rq_datetime=2019-10-10%2011%3A01%3A30&sender_id=SANDBOX&password=test&order_id=8801835307911&product_code=BPJSKS&signature=9d6eede295d8865adc9eefa3fc48c059d22773338b01284eb42ab688671a7c9c
HTTP Bill Payment - BPJS Kesehatan
POST /rest/biller/paymentreport HTTP/1.1
Host: sandbox-api.espay.id
Content-Type: application/x-www-form-urlencoded
Authorization: Basic ZXNwYXktdGVzdDp0ZXN0
Content-Length: 1094
rq_uuid=SANDBOXPAYMENTBILLER010102987876&rq_datetime=2019-10-10%2011%3A02%3A30&sender_id=SANDBOX&password=test&order_id=8801835307911&product_code=BPJSKS&amount=8750000&signature=f46a2c34884c3d9194140f5ab595cae393749a0c5c25f23d2ebcfec3865196d1&data=%7B%0A%20%20%20%20%20%20%20%20%22va_number%22%3A%20%228801835307911%22%2C%0A%20%20%20%20%20%20%20%20%22customer_id%22%3A%20%228801835307911%22%2C%0A%20%20%20%20%20%20%20%20%22customer_name%22%3A%20%22EKO%20SUPRAPTO%22%2C%0A%20%20%20%20%20%20%20%20%22family_number%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%22bill_period%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%22bill_amount%22%3A%2085000%2C%0A%20%20%20%20%20%20%20%20%22admin_fee%22%3A%202500%2C%0A%20%20%20%20%20%20%20%20%22amount%22%3A%2087500%2C%0A%20%20%20%20%20%20%20%20%22remain_payment%22%3A%200%2C%0A%20%20%20%20%20%20%20%20%22reff_code%22%3A%20%2200000004985600000000000000000000%22%2C%0A%20%20%20%20%20%20%20%20%22branch_code%22%3A%20%220101%22%2C%0A%20%20%20%20%20%20%20%20%22branch_name%22%3A%20%22BANDA%20ACEH%22%2C%0A%20%20%20%20%20%20%20%20%22remark%22%3A%20%22%22%0A%20%20%20%20%7D
CURL Bill Inquiry - BPJS Kesehatan
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=SANDBOXINQUIRYBILLER010101034' \
--data-urlencode 'rq_datetime=2019-10-10 11:01:30' \
--data-urlencode 'sender_id=SANDBOX' \
--data-urlencode 'password=test' \
--data-urlencode 'order_id=8801835307911' \
--data-urlencode 'product_code=BPJSKS' \
--data-urlencode 'signature=9d6eede295d8865adc9eefa3fc48c059d22773338b01284eb42ab688671a7c9c'
CURL Bill Payment - BPJS Kesehatan
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=SANDBOXPAYMENTBILLER010102987876' \
--data-urlencode 'rq_datetime=2019-10-10 11:02:30' \
--data-urlencode 'sender_id=SANDBOX' \
--data-urlencode 'password=test' \
--data-urlencode 'order_id=8801835307911' \
--data-urlencode 'product_code=BPJSKS' \
--data-urlencode 'amount=8750000' \
--data-urlencode 'signature=f46a2c34884c3d9194140f5ab595cae393749a0c5c25f23d2ebcfec3865196d1' \
--data-urlencode 'data={
"va_number": "8801835307911",
"customer_id": "8801835307911",
"customer_name": "EKO SUPRAPTO",
"family_number": 1,
"bill_period": 1,
"bill_amount": 85000,
"admin_fee": 2500,
"amount": 87500,
"remain_payment": 0,
"reff_code": "00000004985600000000000000000000",
"branch_code": "0101",
"branch_name": "BANDA ACEH",
"remark": ""
}'