# Inquiry

{% tabs %}
{% tab title="Description" %}
This functionality will perform BPJS Postpaid product inquiry
{% endtab %}

{% tab title="API Name" %}
inquiry
{% endtab %}

{% tab title="Input" %}
WsbgRequest object:

| Field       | Status | Format | Description                      |
| ----------- | ------ | ------ | -------------------------------- |
| bankId      | M      | text   | bank id at BG system             |
| bankChannel | M      | text   | payment channel                  |
| bankRefNo   | M      | text   | reference no from bank/merchant  |
| custAccNo   | M      | text   | cust account no at bank/merchant |
| custId      | M      | text   | bill number to be paid           |
| dateTrx     | M      | date   | date transaction (request)       |
| payeeCode   | M      | text   | payee code                       |
| productCode | M      | text   | product code                     |
| billPeriod  | M      | text   | bill periode                     |


{% endtab %}

{% tab title="Response Parameter" %}
WsbgResponse object:

| Field                | Status | Format  | Description                                            |
| -------------------- | ------ | ------- | ------------------------------------------------------ |
| adminFee             | M      | numeric | admin fee                                              |
| bankChannel          | M      | text    | payment channel copy from request                      |
| bankId               | M      | text    | bank id at BG system (copy from request)               |
| bankRefNo            | M      | text    | reference no from bank/merchant (copy from request)    |
| billAmt              | M      | numeric | bill amount                                            |
| billPeriod           | M      | text    | bill period                                            |
| billRefNo            | M      | text    | reference no from biller                               |
| code                 | M      | numeric | status code : 0 = success 1 = failed 2 = pending       |
| custAccNo            | M      | text    | cust account no at bank / merchant (copy from request) |
| custId               | M      | text    | bill number to be paid (copy from request)             |
| custName             | M      | text    | customer's name                                        |
| custRefNo            | M      | text    | reference no from BG                                   |
| date Trx             | O      | date    | date transaction (response)                            |
| description          | O      | text    | product description                                    |
| kwh                  | O      | text    | unit of energy                                         |
| message              | O      | text    | error message from BG                                  |
| meterNumber          | O      | text    | meter number                                           |
| meterStandCubication | O      | text    | meter stand and cubication                             |
| nominalVoucher       | O      | text    | nominal voucher                                        |
| paidAmt              | M      | numeric | paid amount (to be debeted = billAmt + adminFee)       |
| payeeCode            | M      | text    | payee code                                             |
| priceCategorypower   | O      | text    | prices category and power                              |
| pricesCategory       | O      | text    | prices category and power                              |
| productCode          | M      | text    | product code                                           |
| resultCode           | O      | text    | 2 digit result code                                    |
| secretCode           | O      | text    | secret code                                            |
| serialNumber         | O      | text    | serial number                                          |
| standMeter           | O      | text    | stand meter                                            |
| tenor                | O      | text    | tenor                                                  |
| token                | O      | text    | token                                                  |


{% endtab %}

{% tab title="Example" %}
Request

```xml
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns: soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:exp="http://exposed.webservice.pacarana.infinetworks.com">
    <soapenv:Header>
        <authorization xsi:type="xsd:string">5XgSxfKdy9WCniVRZ7tYK55ncLalqedkgJjU+x0VrUM=</authorization>
        <date xsi:type="xsd:dateTime">Thu, 10 OCT 2019 12:53:03 ICT</date>
    </soapenv:Header>
    <soapenv:Body>
        <exp:inquiry soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
            <req xsi:type="pac:WsbgRequest" xmlns:pac="http://pacarana.infinetworks.com">
                <bankId xsi:type="xsd:string">10000001</bankId>
                <bankChannel xsi:type="xsd:string">6017</bankChannel>
                <bankRefNo xsi:type="xsd:string">201910100001</bankRefNo>
                <custAccNo xsi:type="xsd:string">1111111111</custAccNo>
                <custId xsi:type="xsd:string">1430071801</custId>
                <dateTrx xsi:type="xsd:dateTime">2019-10-10T16:50:00Z</dateTrx>
                <payeeCode xsi:type="xsd:string">10036</payeeCode>
                <productCode xsi:type="xsd:string">1001</productCode>
                <billPeriod xsi:type="xsd:string">01</billPeriod>
            </req>
        </exp:inquiry>
    </soapenv:Body>
</soapenv:Envelope>

```

Response

```xml
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    x mlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <ns1:inquiryResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            xmlns:ns1="http://exposed.webservice.pacarana.infinetworks.com">
            <inquiryReturn href="#id0" />
        </ns1:inquiryResponse>
        <multiRef id="id0" soapenc:root="0" soapenv:encodingS tyle="http://schemas.xmlsoap.org/soap/encoding/"
            xsi:type="ns2:WsbgResponse" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
            xmlns:ns2="http://pacarana.infinetworks.com">
            <adminFee xsi:type="xsd:decimal">2500.00</adminFee>
            <bankChannel xsi:type="xsd:string">6017</bankChannel>
            <bankId xsi:type="xsd:string">10000001</bankId>
            <bankRefNo xsi:type="xsd:string">201910100001</bankRefNo>
            <billAmt xsi:type="xsd:decimal">51000</billAmt>
            <billPeriod xsi:type="xsd:string">01</billPeriod>
            <billRefNo xsi:type="xsd:string" xsi:nil="true" />
            <code xsi:type="xsd:byte">0</code>
            <custAccNo xsi:type="xsd:string">1111111111</custAccNo>
            <custId xsi:type="xsd:string">1430071801</custId>
            <custName xsi:type="xsd:string">DENI Y (PST: 1)</custName>
            <custRefNo xsi:type="xsd:string">000000199372</custRefNo>
            <dateTrx xsi:type="xsd:dateTime">2019-10-10T16:50:00.000Z</dateTrx>
            <description xsi:type="xsd:string" xsi:nil="true" />
            <kwh xsi:type="xsd:string" xsi:nil="true" />
            <message xsi:type="xsd:string" xsi:nil="true" />
            <meterNumber xsi:type="xsd:string" xsi:nil="true" />
            <meterStandCubication xsi:type="xsd:string" xsi:nil="true" />
            <nominalVoucher xsi:type="xsd:string" xsi:nil="true" />
            <paidAmt xsi:type="xsd:decimal">53500.00</paidAmt>
            <payeeCode xsi:type="xsd:string">10036</payeeCode>
            <priceCategoryPower xsi:type="xsd:string" xsi:nil="true" />
            <pricesCategory xsi:type="xsd:string" xsi:nil="true" />
            <productCode xsi:type="xsd:string">1001</productCode>
            <resultCode xsi:type="xsd:string" xsi:nil="true" />
            <secretCode xsi:type="xsd:string" xsi:nil="true" />
            <serialNumber xsi:type="xsd:string" xsi:nil="true" />
            <standMeter xsi:type="xsd:string" xsi:nil="true" />
            <tenor xsi:type="xsd:string" xsi:nil="true" />
            <token xsi:type="xsd:string" xsi:nil="true" />
        </multiRef>
    </soapenv:Body>
</soapenv:Envelope>
```
{% endtab %}
{% endtabs %}
