Payment

API to pay BPJS Kesehatan.

Path

MethodPath
POSTapi/v1/bill/check

Request Body

AttributesTypeDescriptionMandatory
commandsStringValue: pay-pascaYes
usernameStringYour registered phone numberYes
tr_idIntegerIAK inquiry IDYes
signStringSignature. Value: md5(username+api_key+tr_id)Yes
{
  "commands" : "pay-pasca",
  "username" : "123123123", 
  "tr_id"    : "9732787",
  "sign"     : "e4fe9e9c8ba737d6897e7f15bb1380a0"
}
<?xml version="1.0" ?>
<mp>
  <commands>pay-pasca</commands>
  <username>123123123</username>
  <tr_id>9732787</tr_id>
  <sign>e4fe9e9c8ba737d6897e7f15bb1380a0</sign>
</mp>

Response

AttributesTypeDescriptionMandatory
tr_idIntegerIAK inquiry IDYes
codeStringProduct codeYes
datetimeStringTransaction time (Format YmdHis)Yes
hpStringBPJS participant numberYes
tr_nameStringBill account nameYes
periodStringBill periodYes
nominalDoubleBill nominalYes
adminDoubleAdmin feeYes
response_codeStringResponse code. See response code listYes
messageStringMessageYes
priceDoubleTotal price that must be paid (nominal + admin fee)Yes
selling_priceDoubleDeducted balanceYes
balanceDoubleClient remaining balanceYes
norefStringBiller reference number (if exist)No
ref_idStringYour order number / reference ID ( must unique )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",
    "datetime": "20180803170750",
    "hp": "8801234560001",
    "tr_name": "VERGIE",
    "period": "02",
    "nominal": 50000,
    "admin": 2500,
    "response_code": "00",
    "message": "PAYMENT SUCCESS",
    "price": 52500,
    "selling_price": 52300,
    "balance": 999490800,
    "noref": "148732328035714773",
    "ref_id": "09128374651",
    "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>
  <datetime>20180803170750</datetime>
  <hp>8801234560001</hp>
  <tr_name>VERGIE</tr_name>
  <period>02</period>
  <nominal>50000</nominal>
  <admin>2500</admin>
  <response_code>00</response_code>
  <message>PAYMENT SUCCESS</message>
  <price>52500</price>
  <selling_price>52500</selling_price>
  <balance>999490800</balance>
  <noref>148732328035714773</noref>
  <ref_id>09128374651</ref_id>
  <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 payment code explanation using Laravel.

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