Inquiry

API to inquiry Gas Negara.

Path

MethodPath
POSTapi/v1/bill/check

Test Case

CodeNumberResponse
PGAS0110014601Success
PGAS0110014603Inquiry - Time Out
PGAS0110014604Inquiry - Invoice Has Been Paid
PGAS0110014605Inquiry - Incorrect Destination Number
PGAS0110014606Payment - Payment Failed
PGAS0110014607Payment - Pending / transaction in process
PGAS0110014608Payment - 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
hpStringGas negara customer numberYes
ref_idStringYour order number / reference ID ( must unique )Yes
signStringSignature. Value: md5(username+api_key+ref_id)Yes
{
  "commands"    : "inq-pasca",
  "username"    : "123123123",
  "code"        : "PGAS",
  "hp"          : "0110014601",
  "ref_id"      : "151270689512",
  "sign"        : "12fe359b0638d81d70ea1d278f400ab1"
}
<?xml version="1.0" ?>
<mp>
<commands>inq-pasca</commands>
<username>123123123</username>
<code>PGAS</code>
<hp>0110014601</hp>
<ref_id>151270689512</ref_id>
<sign>12fe359b0638d81d70ea1d278f400ab1</sign>
</mp>

Response

AttributesTypeDescriptionMandatory
tr_idIntegerIAK inquiry IDYes
codeStringProduct codeYes
hpStringGas negara customer 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.addressStringCustomer addressYes
desc.first_meterStringInitial meterYes
desc.last_meterStringFinal meterYes
desc.usageIntegerNumber of usageYes
{
  "data": {
    "tr_id": 9732788,
    "code": "PGAS",
    "hp": "0110014601",
    "tr_name": "NGATIMUN",
    "period": "0917",
    "nominal": 322002,
    "admin": 2500,
    "ref_id": "151270689512",
    "response_code": "00",
    "message": "INQUIRY SUCCESS",
    "price": 324502,
    "selling_price": 323902,
    "desc": {
      "address": "-",
      "first_meter": "006538",
      "last_meter": "006573",
      "usage": 35
    }
  },
  "meta": []
}
<?xml version="1.0"?>
<mp>
  <tr_id>9732788</tr_id>
  <code>PGAS</code>
  <hp>0110014601</hp>
  <tr_name>NGATIMUN</tr_name>
  <period>0917</period>
  <nominal>322002</nominal>
  <admin>2500</admin>
  <ref_id>151270689512</ref_id>
  <response_code>00</response_code>
  <message>INQUIRY SUCCESS</message>
  <price>324502</price>
  <selling_price>324002</selling_price>
  <desc>
    <address>-</address>
    <first_meter>006538</first_meter>
    <last_meter>006573</last_meter>
    <usage>35</usage>
  </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.