# BILL PAY API

Bill Pay API is a request that will be sent to the biller portal which contains payment information that is sent from NPCI through the Biller Operating Unit

<br>

<figure><img src="https://3406671578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdNFAKvIjsqw6Rq8EEAEB%2Fuploads%2F14ZPDAVK1KdhNFjy6AHj%2Fimage.png?alt=media&#x26;token=6b2dc844-76c9-465e-bb05-f01676e03f4b" alt=""><figcaption></figcaption></figure>

* NPCI sends the Bill Payment Request to BOU.
* BOU forwards the Bill Payment Request to Biller.
* Biller sends the Bill Payment Request Acknowledgement to BOU, immediately upon receiving the request.
* After Biller processes the request, the resulting Bill Payment Response is sent to BOU.
* Once BOU receives the Bill Payment Response, a Bill Payment Response Acknowledgement is sent to Biller.
* BOU forwards the Bill Payment Response to NPCI.
* On receiving the Bill Payment Response, NPCI sends Bill Payment Status to BOU.
* Once BOU receives the Status from NPCI, they send the corresponding notification to Biller.

Bill Pay API is a request that will be sent to the biller portal which contains payment information that is sent from NPCI through the Biller Operating Unit.

<mark style="color:blue;">**Request Parameters**</mark>

**The various parameters are explained below:**

| Parent Property/Element                                              | Property/Element Name | Mandatory | Data Type | Description                                                                                                                                                                                                    |
| -------------------------------------------------------------------- | --------------------- | --------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>\[ROOT]</strong></p><p>(No parent property / element)</p> | refId                 | M         | String    | Unique identification assigned by the initiating BBPOU to unambiguously identify the transaction which is passed on, unchanged, throughout the entire end-to-end chain, binding the Fetch and Payment messages |
|                                                                      | txn                   | M         | String    | Transaction information, passed throughout the system, visible to all entities of the ecosystem                                                                                                                |
|                                                                      | txnReferenceId        | M         | String    | Transaction reference number used by the Customer for referring to a Payment transaction                                                                                                                       |
|                                                                      | ts                    | M         | String    | Transaction reference number used by the Customer for referring to a Payment transaction                                                                                                                       |
|                                                                      | type                  | M         | String    | Type of the message (Forward or Reversal Type)                                                                                                                                                                 |
|                                                                      | billerId              | M         | String    | Unique identification code allocated to the Biller.                                                                                                                                                            |
|                                                                      | customerParams        | M         | Array     | Customer bill fetch related details                                                                                                                                                                            |
|                                                                      | additionalInfo        | M         | Array     | Additional information parameters sent by the Biller supporting fetch is copied in the payment request.                                                                                                        |
|                                                                      | paymentMethod         | M         | Object    | Payment methods opted by the Customer like quick pay, split pay, OFFUSpay and paymentmode.                                                                                                                     |
|                                                                      | amount                | M         | Object    | Amount related details for the payment                                                                                                                                                                         |
|                                                                      | amount.Amt            | M         | Object    | Details of the bill payment amount made by the Customer                                                                                                                                                        |
|                                                                      | amount.SplitPayAmount | M         | String    | Amount paid through the second payment mode                                                                                                                                                                    |
|                                                                      | amount.Tag            | M         | Array     | Amount paid by the customer indicating different amount option combinations                                                                                                                                    |
|                                                                      | tenantId              | M         | String    | OU ID of the request originating BOU                                                                                                                                                                           |
|                                                                      |                       |           |           |                                                                                                                                                                                                                |
|                                                                      |                       |           |           |                                                                                                                                                                                                                |

<mark style="color:blue;">**Expected Acknowledgement Parameters**</mark>

**The various parameters are explained below:**

| Parent Property/Element                | Property/Element Name | Mandatory | Mandatory                               | Description                 |
| -------------------------------------- | --------------------- | --------- | --------------------------------------- | --------------------------- |
| \[ROOT] (No parent property / element) | reason                | M         | String Min Length – 1, Max Length – 100 | Reason of the Status        |
|                                        | code                  | M         | String Fixed Length 3                   | Response code for a request |
|                                        | status                | M         | String Min Length – 1, Max Length – 100 | Status of given request     |

**Json Formatted Request Example**

```json

    {
    "refId": "String", "txn": {
    "txnReferenceId": "String", "ts": "String",
    "type": "String",
    },
    "billerId:": "String", "customerParams": [
    {
    ],
    "additionalInfo": [
    {
    "name": "String",
    "value": "String"
    }
    ],
    "paymentMethod": { "quickPay": "String", "splitPay": "String", "offusPay": "String", "paymentMode": "String"
    },
    "amount": {
    "amt": {
    "amount": "String", "custConvFee": "String", "currency": "String"
    },
    "splitPayAmount": "String", "tags": [
    {
    "name": "String",
    "value": "String"
    }
    ]
    },
    "billerResponse": { "customerName": "String", "amount": "String",
    "dueDate": "String", "custConvFee": "String", "billDate": "String", "billNumber": "String", "billPeriod": "String", "tags": [
    {
    "name": "String",
    "value": "String"
    }
    ]
    },
    "tenantId" : "String"
    }
```

####

**Json Formatted Response Example**

```json

    {
    "reason":"String",
    "code":"Integer", "status":"String"
    }
```
