Inquiry

API to inquiry BPJS Kesehatan.

Path

MethodPath
POSTapi/v1/bill/check

Test Case

CodeNumberResponse
BPJS8801234560000Success
BPJS8801234560001Inquiry - Invoice Has Been Paid
BPJS8801234560014Inquiry - Incorrect Destination Number
BPJS8801234560103Inquiry - Time Out
BPJS8801234561037Payment - Payment Failed
BPJS8801234561039Payment - Pending / transaction in process
BPJS8801234561105Payment - MISC Error / Biller System Error
BPJS880123456XXXXTest other response scenarios in the test case menu.

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"       : "8801234560000",
  "ref_id"   : "09128374651",
  "sign"     : "6515c5094421834a85ed9ac7a0fe443b",
  "month"    : "2"
}
<?xml version="1.0" ?>
<mp>
  <commands>inq-pasca</commands>
  <username>123123123</username>
  <code>BPJS</code>
  <hp>8801234560000</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 balance (price - commission)Yes
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": "8801234560000",
    "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>8801234560000</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.