Payment

API to pay Gas Negara.

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"    : "9732788",
  "sign"     : "032a26153bd4a705f34965c86612ce15"
}
<?xml version="1.0" ?>
<mp>
  <commands>pay-pasca</commands>
  <username>123123123</username>
  <tr_id>9732788</tr_id>
  <sign>032a26153bd4a705f34965c86612ce15</sign>
</mp>

Response

AttributesTypeDescriptionMandatory
tr_idIntegerIAK inquiry IDYes
codeStringProduct codeYes
datetimeStringTransaction time (Format YmdHis)Yes
hpStringGas negara customer 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.addressStringCustomer addressYes
desc.first_meterStringInitial meterYes
desc.last_meterStringFinal meterYes
desc.usageIntegerNumber of usageYes
{
  "data": {
    "tr_id": 9732788,
    "code": "PGAS",
    "datetime": "20180803171739",
    "hp": "0110014601",
    "tr_name": "NGATIMUN",
    "period": "0917",
    "nominal": 322002,
    "admin": 2500,
    "response_code": "00",
    "message": "PAYMENT SUCCESS",
    "price": 324502,
    "selling_price": 323902,
    "balance": 999166898,
    "noref": "244183135447",
    "ref_id": "151270689512",
    "desc": {
      "address": "-",
      "first_meter": "006538",
      "last_meter": "006573",
      "usage": 35
    }
  },
  "meta": []
}
<?xml version="1.0"?>
<mp>
  <tr_id>9732788</tr_id>
  <code>PGAS</code>
  <datetime>20171208112252</datetime>
  <hp>0110014601</hp>
  <tr_name>NGATIMUN</tr_name>
  <period>0917</period>
  <nominal>322002</nominal>
  <admin>2500</admin>
  <response_code>00</response_code>
  <message>PAYMENT SUCCESS</message>
  <price>324502</price>
  <selling_price>324002</selling_price>
  <balance>81023</balance>
  <noref>244183135447</noref>
  <ref_id>151270689512</ref_id>
  <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 payment code explanation using Laravel.

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