# Payment

{% tabs %}
{% tab title="Description" %}

{% endtab %}

{% tab title="API Name" %}

{% 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                 |
| dateTrx            | M      | date    | date transactio (request)                        |
| payeeCode          | M      | text    | payee code                                       |
| productCode        | M      | text    | product code                                     |
| custId             | M      | text    | bill number to be pad                            |
| custName           | M      | text    | customer's name                                  |
| billAmt            | M      | numeric | bill amount                                      |
| adminFee           | M      | numeric | admin fee                                        |
| paidAmt            | M      | numeric | paid amount (to be deleted) = billAmt + adminFee |
| billPeriod         | M      | text    | bill periode                                     |
| priceCategoryPower | M      | text    | prices category and power                        |
| standMeter         | M      | text    | stand meter                                      |
| custRefNo          | M      | text    | reference no from BG                             |
| {% 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             | M      | 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   | M      | 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           | M      | 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">TAyA1LG7QNg1wXl29QoP
            DRz6jhp6mnAumH47WIH4esA=</authorization>
        <date xsi:type="xsd:dateTime">Thu, 10 OCT 2019 12:53:03 ICT</date>
    </soapenv:Header>

    <soapenv:Body>
        <exp:payment 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>
                <dateTrx xsi:type="xsd:dateTime">2019-10-10T12:53:00.000Z</dateTrx>
                <payeeCode xsi:type="xsd:string">10011</payeeCode>
                <productCode xsi:type="xsd:string">1001</productCode>
                <custId xsi:type="xsd:string">512345610000</custId>
                <custName xsi:type="xsd:string">NAMXXXXXXXXXXXXXXXXXXXXXX</custName>
                <billAmt xsi:type="xsd:decimal">22220</billAmt>
                <adminFee xsi:type="xsd:decimal">2000.00</adminFee>
                <paidAmt xsi:type="xsd:decimal">24220.00</paidAmt>
                <billPeriod xsi:type="xsd:string">201602</billPeriod>
                <priceCategoryPower xsi:type="xsd:string">R1/450</priceCategoryPower>
                <standMeter xsi:type="xsd:string">00470300 - 00475700</standMeter>
                <custRefNo xsi:type="xsd:string">000000199337</custRefNo>
            </req>
        </exp:payment>
    </soapenv:Body>
</soapenv:Envelope>
```

Response :

```xml
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/s
oap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" x mlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <ns1:paymentResponse soapenv:encodingStyle="http://sc
hemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://exposed.w
ebservice.pacarana.infinetworks.com">
            <paymentReturn href="#id0" />
        </ns1:paymentResponse>
        <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/soa
p/encoding/" xmlns:ns2="http://pacarana.infinetworks.com">
            <adminFee xsi:type="xsd:decimal">2000.00</adminFe e>
                <bankChannel xsi:type="xsd:string">6017</bankChan nel>
                    <bankId xsi:type="xsd:string">10000001</bankId>
                    <bankRefNo xsi:type="xsd:string">201910100001</ba nkRefNo>
                        <billAmt xsi:type="xsd:decimal">22220</billAmt>
                        <billPeriod xsi:type="xsd:string">201602</billPer iod>
                            <billRefNo xsi:type="xsd:string">0213170Z9653C079
                                124163E3999C9965</billRefNo>
                            <code xsi:type="xsd:byte">0</code>
                            <custAccNo xsi:type="xsd:string">1111111111</cust AccNo>
                                <custId xsi:type="xsd:string">512345610000</custI d>
                                    <custName xsi:type="xsd:string">NAMA. /CH@%'M$,^&
                                        T"ST#01</custName>
                                    <custRefNo xsi:type="xsd:string">000000199337</cu stRefNo>
                                        <dateTrx xsi:type="xsd:dateTime">2019-10-
                                            10T12:53: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:n il="true" />
                                        <nominalVoucher xsi:type="xsd:string" xsi:nil="true" />
                                        <paidAmt xsi:type="xsd:decimal">24220.00</paidAmt>
                                        <payeeCode xsi:type="xsd:string">10011</payeeCode>
                                        <priceCategoryPower xsi:type="xsd:string">R1/450</priceCategoryPower>
                                        <pricesCategory xsi:type="xsd:string" xsi:nil="true" />
                                        <productCode xsi:type="xsd:string">1001</productC ode>
                                            <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">00470300 - 00475700</standMeter>
                                                    <tenor xsi:type="xsd:string" xsi:nil="true" />
                                                    <token xsi:type="xsd:string" xsi:nil="true" />
        </multiRef>
    </soapenv:Body>
</soapenv:Envelope>
```

{% endtab %}
{% endtabs %}
