Inquiry

API to inquiry BPJS Kesehatan.

Path

MethodPath
POSTapi/v1/bill/check

Test Case

CodeNumberResponse
BPJS8801234560001Success
BPJS8801234560003Inquiry - Time Out
BPJS8801234560004Inquiry - Invoice Has Been Paid
BPJS8801234560005Inquiry - Incorrect Destination Number
BPJS8801234560006Payment - Payment Failed
BPJS8801234560007Payment - Pending / transaction in process
BPJS8801234560008Payment - MISC Error / Biller System Error

Request Body

AttributesTypeDescriptionMandatory
commandsStringValue: inq-pascaYes
usernameStringYour registered phone numberYes
codeStringProduct Code. You can get list of product code in pricelist api or from pricelist hereYes
hpStringBPJS participant numberYes
ref_idStringYour order number / reference ID ( must unique )Yes
signStringSignature. Value: md5(username+api_key+ref_id)Yes
monthIntegerNumber of month you're willing to payYes
{
  "commands" : "inq-pasca",
  "username" : "123123123",
  "code"     : "BPJS",
  "hp"       : "8801234560001",
  "ref_id"   : "09128374651",
  "sign"     : "6515c5094421834a85ed9ac7a0fe443b",
  "month"    : "2"
}
<?xml version="1.0" ?>
<mp>
  <commands>inq-pasca</commands>
  <username>123123123</username>
  <code>BPJS</code>
  <hp>8801234560001</hp>
  <ref_id>09128374651</ref_id>
  <sign>6515c5094421834a85ed9ac7a0fe443b</sign>
  <month>2</month>
</mp>

Response

AttributesTypeDescriptionMandatory
tr_idIntegerIAK inquiry IDYes
codeStringProduct codeYes
hpStringBPJS participant numberYes
tr_nameStringBill account nameYes
periodStringBill periodYes
nominalDoubleBill nominalYes
adminDoubleAdmin feeYes
ref_idStringYour order number / reference ID ( must unique )Yes
response_codeStringResponse code. See response code listYes
messageStringMessageYes
priceDoubleTotal price that must be paid (nominal + admin fee)Yes
selling_priceDoubleDeducted balanceYes
descObjectProduct descriptionYes
desc.kode_cabangStringCode of BPJS branchYes
desc.nama_cabangStringName of BPJS branchYes
desc.sisa_pembayaranStringResidual paymentYes
desc.jumlah_pesertaStringBPJS participantYes
{
  "data": {
    "tr_id": 9732787,
    "code": "BPJS",
    "hp": "8801234560001",
    "tr_name": "VERGIE",
    "period": "02",
    "nominal": 50000,
    "admin": 2500,
    "ref_id": "09128374651",
    "response_code": "00",
    "message": "INQUIRY SUCCESS",
    "price": 52500,
    "selling_price": 52300,
    "desc": {
      "kode_cabang": "0901",
      "nama_cabang": "JAKARTA PUSAT",
      "sisa_pembayaran": "0",
      "jumlah_peserta": "2"
    }
  },
  "meta": []
}
<?xml version="1.0"?>
<mp>
  <tr_id>9732787</tr_id>
  <code>BPJS</code>
  <hp>8801234560001</hp>
  <tr_name>VERGIE</tr_name>
  <period>02</period>
  <nominal>50000</nominal>
  <admin>2500</admin>
  <ref_id>09128374651</ref_id>
  <response_code>00</response_code>
  <message>INQUIRY SUCCESS</message>
  <price>52500</price>
  <selling_price>52500</selling_price>
  <desc>
    <kode_cabang>0901</kode_cabang>
    <nama_cabang>JAKARTA PUSAT</nama_cabang>
    <sisa_pembayaran>0</sisa_pembayaran>
    <jumlah_peserta>2</jumlah_peserta>
  </desc>
</mp>

Live Testing

Request URL
https://testpostpaid.mobilepulsa.net/api/v1/bill/check
Request Method
Request Header
Content-Type: application/json
Body
Result

Tutorial Video

You can see this video for inquiry code explanation using Laravel.

Or you can see this video for inquiry code explanation using PHP.