Inquiry

API to inquiry PDAM.

Path

MethodPath
POSTapi/v1/bill/check

Test Case

CodeNumberResponse
PDAMKOTA.SURABAYA10200000Success - 1 bill
PDAMKOTA.MEDAN10200999Success - 4 bills
AETRA10200001Inquiry - Invoice Has Been Paid
AETRA10200014Inquiry - Incorrect Destination Number
AETRA10200103Inquiry - Time Out
PDAMKOTA.MEDAN10201037Payment - Payment Failed
PDAMKOTA.MEDAN10201039Payment - Pending / transaction in process
PDAMKOTA.MEDAN10201105Payment - MISC Error / Biller System Error
PDAMKOTA.MEDAN1020XXXXTest 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
hpStringPDAM 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"        : "PDAMKOTA.SURABAYA",
  "hp"          : "10200000",
  "ref_id"      : "0912837465",
  "sign"        : "ebb8b87be79243370bd29bfb8894e8d7"
}
<?xml version="1.0" ?>
<mp>
  <commands>inq-pasca</commands>
  <username>123123123</username>
  <code>PDAMKOTA.SURABAYA</code>
  <hp>10200000</hp>
  <ref_id>0912837465</ref_id>
  <sign>ebb8b87be79243370bd29bfb8894e8d7</sign>
</mp>

Response

AttributesTypeDescriptionMandatory
tr_idIntegerIAK inquiry IDYes
codeStringProduct codeYes
hpStringPDAM 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 balance (price - commission)Yes
descObjectProduct descriptionYes
desc.bill_quantityIntegerBill quantityYes
desc.addressStringInvoice AddressYes
desc.biller_adminStringAdmin feeYes
desc.pdam_nameStringPDAM nameYes
desc.stamp_dutyStringStamp duty feeYes
desc.due_dateStringDue date (only for PDAMKOTA.SURABAYA)No
desc.kode_tarifStringFare code (only for PDAMKOTA.SURABAYA)No
desc.billObjectBill detailsYes
desc.bill.detailArrayBill detailsYes
desc.bill.detail.periodStringBill period of detailed monthYes
desc.bill.detail.first_meterIntegerInitial meter of detailed monthYes
desc.bill.detail.last_meterIntegerFinal meter of detailed monthYes
desc.bill.detail.penaltyDoublePenalty fee of detailed monthYes
desc.bill.detail.bill_amountDoubleBill amount of detailed monthYes
desc.bill.detail.misc_amountDoubleOthers fee of detailed monthYes
desc.bill.detail.standStringCurrent PDAM stand of detailed month (only for PDAMKOTA.SURABAYA)No

There are 2 types of PDAM response :

  1. Separated desc.bill.detail for each period

For example when there is PDAM bill 2 periods, then the desc.bill.detail will be 2 index array that contain detail for each period.

  1. Unified desc.bill.detail for all period

For example when there is PDAM bill 2 periods, then the desc.bill.detail just 1 index array that contain detail for all period. Below table is a list of PDAM products for unified detail for all period:

---
PDAMKAB.ACEHBESARPDAMKAB.ACEHTAMIANGPDAMKAB.ACEHUTARA
PDAMKAB.AGAMPDAMKAB.BANDUNGBPDAMKAB.BANGGAI
PDAMKAB.BANGKABARATPDAMKAB.BANTULPDAMKAB.BANYUASIN
PDAMKAB.BATANGHARIPDAMKAB.BEKASIPDAMKAB.BELITUNGTIMUR
PDAMKAB.BENGKAYANGPDAMKAB.BONEPDAMKAB.BONEBOLANGO
PDAMKAB.BULUNGANTANJUNGSELORPDAMKAB.BUTONPDAMKAB.CILACAPNONREGULER
PDAMKAB.DOMPUPDAMKAB.ENREKANGPDAMKAB.GIANYAR
PDAMKAB.GIANYARNONAIRPDAMKAB.GORONTALOPDAMKAB.GORONTALOLIMBOTO
PDAMKAB.GOWAPDAMKAB.GUNUNGKIDULPDAMKAB.HALMAHERAUTARA
PDAMKAB.HULUSUNGAIUTARAAMUNTAIPDAMKAB.JEMBRANAPDAMKAB.KAPUASHULU
PDAMKAB.KARAWANGBPDAMKAB.KEDIRIPDAMKAB.KERINCI
PDAMKAB.KETAPANGPDAMKAB.KOLAKAPDAMKAB.KOLAKAUTARA
PDAMKAB.KOTABARUPULAULAUTPDAMKAB.KUDUSPDAMKAB.KUPANG
PDAMKAB.KUTAIBARATPDAMKAB.KUTAIKERTANEGARAPDAMKAB.LAMANDAU
PDAMKAB.LAMONGANPDAMKAB.LAMPUNGSELATANPDAMKAB.LEBAK
PDAMKAB.LIMAPULUHKOTAPDAMKAB.LOMBOKTIMURPDAMKAB.LUWU
PDAMKAB.LUWUTIMURPDAMKAB.LUWUUTARAPDAMKAB.MAGELANG
PDAMKAB.MAGETANPDAMKAB.MAJALENGKAPDAMKAB.MALINAU
PDAMKAB.MALUKUTENGGARAPDAMKAB.MANGGARAIPDAMKAB.MAROS
PDAMKAB.MEMPAWAHPDAMKAB.MERANGINPDAMKAB.MINAHASAUTARA
PDAMKAB.MUARABUNGOPDAMKAB.MUARAENIMPDAMKAB.MUAROJAMBI
PDAMKAB.MUSIBANYUASINPDAMKAB.NGAWIPDAMKAB.OGANILIR
PDAMKAB.OKUBATURAJAPDAMKAB.OKUSELATANPDAMKAB.PACITAN
PDAMKAB.PADANGPARIAMANPDAMKAB.PAMEKASANPDAMKAB.PANDEGLANG
PDAMKAB.PESSELPDAMKAB.POLMANPDAMKAB.PRABUMULIH
PDAMKAB.PURWAKARTAPDAMKAB.SANGGAUPDAMKAB.SAROLANGUN
PDAMKAB.SERANGPDAMKAB.SERDANGPDAMKAB.SERUYAN
PDAMKAB.SIDRAPPDAMKAB.SIJUNJUNGPDAMKAB.SIKKA
PDAMKAB.SINJAIPDAMKAB.SOLOKPDAMKAB.SRAGEN
PDAMKAB.SUMBAWAPDAMKAB.SUMENEPPDAMKAB.TABALONG
PDAMKAB.TANAHBUMBUPDAMKAB.TANAHDATARPDAMKAB.TANGERANG
PDAMKAB.TANJUNGJABUNGBARATPDAMKAB.TEBOPDAMKAB.TIMORTENGAHUTARA
PDAMKAB.TRENGGALEKPDAMKAB.TUBANPDAMKAB.TULUNGAGUNG
PDAMKAB.WAJOPDAMKOTA.BIMAPDAMKOTA.BLITAR
PDAMKOTA.BONEWATAMPONEPDAMKOTA.BONTANGPDAMKOTA.BUKITTINGGI
PDAMKOTA.CILEGONPDAMKOTA.DAROYPDAMKOTA.DKIPALYJA
PDAMKOTA.GORONTALOPDAMKOTA.JAMBIPDAMKOTA.KANDANGAN
PDAMKOTA.KENDARIPDAMKOTA.KUTAITIMURPDAMKOTA.LANGSA
PDAMKOTA.LUBUKLINGGAUPDAMKOTA.MAGELANGPDAMKOTA.MOJOKERTO
PDAMKOTA.PALOPOPDAMKOTA.PALUPDAMKOTA.PANGKALPINANG
PDAMKOTA.PAREPAREPDAMKOTA.PARIAMANPDAMKOTA.PEKANBARU
PDAMKOTA.PEMATANGSIANTARPDAMKOTA.RANTAUPRAPATPDAMKOTA.SABANG
PDAMKOTA.SAMPITPDAMKOTA.SINGKAWANGPDAMKOTA.TANJUNGBALAI
PDAMKOTA.TANJUNGPINANGPDAMKOTA.TARAKANPDAMKOTA.TARUTUNG
PDAMKOTA.TASIKMALAYAPDAMKOTA.TEBINGTINGGIPDAMKOTA.TEMBILAHAN
PDAMKOTA.TERNATEPDAMKOTA.TOMOHONPDAMKOTA.WISATABATU
PDAMKOTA.YOGYAKARTA--
Other than above table is separated detail

Separated Detail Response

{
  "data": {
    "tr_id": 9732791,
    "code": "PDAMKOTA.SURABAYA",
    "hp": "10200000",
    "tr_name": "DADANG SOEKARDI",
    "period": "201412",
    "nominal": 35490,
    "admin": 2000,
    "ref_id": "0912837465",
    "response_code": "00",
    "message": "INQUIRY SUCCESS",
    "price": 37490,
    "selling_price": 36790,
    "desc": {
      "bill_quantity": 1,
      "address": "WONOKROMO S.S BARU 2 8",
      "biller_admin": "",
      "pdam_name": "PDAM SURABAYA",
      "stamp_duty": "",
      "due_date": "1-15 DES 2014",
      "kode_tarif": "3A",
      "bill": {
        "detail": [
          {
            "period": "201412",
            "first_meter": 4589,
            "last_meter": 4613,
            "penalty": 7500,
            "bill_amount": 27240,
            "misc_amount": 750,
            "stand": ""
          }
        ]
      }
    }
  },
  "meta": []
}
<?xml version="1.0"?>
<mp>
  <tr_id>9732791</tr_id>
  <code>PDAMKOTA.SURABAYA</code>
  <hp>10200000</hp>
  <tr_name>DADANG SOEKARDI</tr_name>
  <period>201412</period>
  <nominal>35490</nominal>
  <admin>2000</admin>
  <ref_id>0912837465</ref_id>
  <response_code>00</response_code>
  <message>INQUIRY SUCCESS</message>
  <price>37490</price>
  <selling_price>36790</selling_price>
  <desc>
    <bill_quantity>1</bill_quantity>
    <address>WONOKROMO S.S BARU 2 8</address>
    <biller_admin></biller_admin>
    <pdam_name>PDAM SURABAYA</pdam_name>
    <stamp_duty></stamp_duty>
    <due_date>1-15 DES 2014</due_date>
    <kode_tarif>3A</kode_tarif>
    <bill>
      <detail>
        <period>201412</period>
        <first_meter>4589</first_meter>
        <last_meter>4613</last_meter>
        <penalty>7500</penalty>
        <bill_amount>27240</bill_amount>
        <misc_amount>750</misc_amount>
        <stand></stand>
      </detail>
    </bill>
  </desc>
</mp>

Unified Detail Response

{
  "data": {
    "tr_id": 9732791,
    "code": "PDAMKOTA.YOGYAKARTA",
    "hp": "10200000",
    "tr_name": "DADANG SOEKARDI",
    "period": "201803,201804",
    "nominal": 35490,
    "admin": 2000,
    "ref_id": "0912837465",
    "response_code": "00",
    "message": "INQUIRY SUCCESS",
    "price": 37490,
    "selling_price": 36790,
    "desc": {
      "bill_quantity": 1,
      "address": "WONOKROMO S.S BARU 2 8",
      "biller_admin": "",
      "pdam_name": "PDAM KOTA YOGYAKARTA",
      "stamp_duty": "",
      "kode_tarif": "",
      "bill": {
        "detail": [
          {
            "period": "201803,201804",
            "first_meter": 4589,
            "last_meter": 4613,
            "penalty": 7500,
            "bill_amount": 27240,
            "misc_amount": 750
          }
        ]
      }
    }
  },
  "meta": []
}
<?xml version="1.0"?>
<mp>
  <tr_id>9732791</tr_id>
  <code>PDAMKOTA.YOGYAKARTA</code>
  <hp>10200000</hp>
  <tr_name>DADANG SOEKARDI</tr_name>
  <period>201803,201804</period>
  <nominal>35490</nominal>
  <admin>2000</admin>
  <ref_id>0912837465</ref_id>
  <response_code>00</response_code>
  <message>INQUIRY SUCCESS</message>
  <price>37490</price>
  <selling_price>36790</selling_price>
  <desc>
    <bill_quantity>1</bill_quantity>
    <address>WONOKROMO S.S BARU 2 8</address>
    <biller_admin></biller_admin>
    <pdam_name>PDAM KOTA YOGYAKARTA</pdam_name>
    <stamp_duty></stamp_duty>
    <kode_tarif></kode_tarif>
    <bill>
      <detail>
        <period>201803,201804</period>
        <first_meter>4589</first_meter>
        <last_meter>4613</last_meter>
        <penalty>7500</penalty>
        <bill_amount>27240</bill_amount>
        <misc_amount>750</misc_amount>
      </detail>
    </bill>
  </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.