Payment

API to pay PLN Postpaid.

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

Response

AttributesTypeDescriptionMandatory
tr_idIntegerIAK inquiry IDYes
codeStringProduct codeYes
datetimeStringTransaction time (Format YmdHis)Yes
hpStringPLN postpaid 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 balance (price - commission)Yes
balanceDoubleClient remaining balanceYes
norefStringBiller reference number (if exist)No
ref_idStringYour order number / reference ID ( must unique )Yes
descObjectProduct descriptionYes
desc.tarifStringElectrical fare groupYes
desc.dayaIntegerElectrical powerYes
desc.lembar_tagihanStringNumber of billsYes
desc.lembar_tagihan_sisaIntegerNumber of bills remaining after paymentYes
desc.tagihanObjectBill detailYes
desc.tagihan.detailArrayBill detailYes
desc.tagihan.detail.meter_awalStringInitial meter value for detailed monthYes
desc.tagihan.detail.meter_akhirStringFinal meter value for detailed monthYes
desc.tagihan.detail.periodeStringBill period for detailed monthYes
desc.tagihan.detail.nilai_tagihanStringBill amount for detailed monthYes
desc.tagihan.detail.adminStringAdmin fee for detailed monthYes
desc.tagihan.detail.dendaStringPenalty fee for detailed monthYes
desc.tagihan.detail.totalDoubleBill total for detailed monthYes
If lembar_tagihan_sisa return value > 0, then you have to include it in your receipt (maximal 4 bill quantities per transaction).
{
  "data": {
    "tr_id": 9732792,
    "code": "PLNPOSTPAID",
    "datetime": "20180803171844",
    "hp": "530000000000",
    "tr_name": "SUBCRIBER NAME",
    "period": "201608",
    "nominal": 300000,
    "admin": 2500,
    "response_code": "00",
    "message": "PAYMENT SUCCESS",
    "price": 302500,
    "selling_price": 301900,
    "balance": 997586108,
    "noref": "004212C9245F1BA43A77CEBD5CD5DA39",
    "ref_id": "09128374655",
    "desc": {
      "tarif": "R1",
      "daya": 1300,
      "lembar_tagihan": "1",
      "lembar_tagihan_sisa": 0,
      "tagihan": {
        "detail": [
          {
            "meter_awal": "00080000",
            "meter_akhir": "00080000",
            "periode": "201608",
            "nilai_tagihan": "300000",
            "admin": "2500",
            "denda": "0",
            "total": 302500
          }
        ]
      }
    }
  },
  "meta": []
}
<?xml version="1.0"?>
<mp>
  <tr_id>9732792</tr_id>
  <code>PLNPOSTPAID</code>
  <datetime>20170725153910</datetime>
  <hp>530000000000</hp>
  <tr_name>SUBCRIBER NAME</tr_name>
  <period>201608</period>
  <nominal>300000</nominal>
  <admin>2500</admin>
  <response_code>00</response_code>
  <message>PAYMENT SUCCESS</message>
  <price>302500</price>
  <selling_price>301900</selling_price>
  <balance>73657753</balance>
  <no_ref>004212C9245F1BA43A77CEBD5CD5DA39</no_ref>
  <ref_id>09128374655</ref_id>
  <desc>
    <tarif>R1</tarif>
    <daya>1300</daya>
    <lembar_tagihan>1</lembar_tagihan>
    <lembar_tagihan_sisa>0</lembar_tagihan_sisa>
    <tagihan>
      <detail>
        <meter_awal>00080000</meter_awal>
        <meter_akhir>00080000</meter_akhir>
        <periode>201608</periode>
        <nilai_tagihan>300000</nilai_tagihan>
        <admin>2500</admin>
        <denda>0</denda>
        <total>302500</total>
      </detail>
    </tagihan>
  </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.