# Bill Payment API

<mark style="color:blue;">**API for paying a Customer Bill, based on Biller Category, Customer Parameters etc.**</mark>

| Endpoint                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Request:**<mark style="color:blue;">**POST**</mark><mark style="color:blue;">**&#x20;**</mark>*<mark style="color:blue;">**/couapp/agent/bills/payment**</mark>* |

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

**The various parameters are explained below:**

| Parent Property/Element                    | Property/Element Name  | Mandatory | Data Type    | Description                                                          |
| ------------------------------------------ | ---------------------- | --------- | ------------ | -------------------------------------------------------------------- |
| **\[ROOT]** (No parent property / element) | tenantId               | M         | Alphanumeric | Fixed Length – 4                                                     |
|                                            | refId                  | M         | Alphanumeric | 35-character Alphanumeric ID Unique to each transaction.             |
|                                            | billId                 | M         | Alphanumeric | Generated when a bill fetch or bill validation is initiated          |
|                                            | amountBreakSet         | C         | List         |                                                                      |
|                                            | paymentMode            | M         | String       |                                                                      |
|                                            | paymentInformation     | M         | String       |                                                                      |
|                                            | amountOptions          | M         | Boolean      |                                                                      |
|                                            | billerId               | M         | Alphanumeric | Unique ID assigned to the Biller by NPCI Eg: BSNL00000NATHL          |
|                                            | billerName             | M         | String       | Name of the biller                                                   |
|                                            | billerCategory         | M         | String       | Category of biler                                                    |
|                                            | macAdress              | C         | Alphanumeric | MAC Address of the Agent Server                                      |
|                                            | customerMobNo          | M         | String       | Mobile of the Customer, on whose behalf the Agent is paying the Bill |
|                                            | txnAmount              | M         | Int          | Transaction amount                                                   |
|                                            | paymentChannel         | M         | String       | Payment Channel of Agent                                             |
|                                            | deviceBlockTags        | M         | List         | Device block tags of Agent                                           |
|                                            | customerParamsReques t | M         | Object       | Unique parameters used for identifying a Customer Bill               |
| **customerParamsReq uest**                 | tags                   | M         | List         | List of customer params                                              |
| **tags**                                   | name                   | M         | String       | Name of customer param                                               |
| **tags**                                   | value                  | M         | String       | Value of customer param                                              |

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

**The various parameters are explained below:**

| Parent Property/Element                   | Property/Element Name | Mandatory | Data Type | Description                                             |
| ----------------------------------------- | --------------------- | --------- | --------- | ------------------------------------------------------- |
| **\[ROOT]**(No parent property / element) | billid                | C         | UUID      | Machine-generated Unique ID for a Bill, used internally |
|                                           | refId                 | C         | String    | Will be null                                            |
|                                           | billerId              | C         | String    | Will be null                                            |
|                                           | status                | C         | String    | Will be null                                            |
|                                           | actionType            | C         | String    | Will be null                                            |
|                                           | billerResponse        | C         | String    | Will be null                                            |
|                                           | additionalInfo        | C         | String    | Will be null                                            |
|                                           | customerParams        | C         | String    | Will be null                                            |
|                                           | creationDate          | C         | String    | Will be null                                            |
|                                           | modifiedDate          | C         | String    | Will be null                                            |
|                                           | createdEpochDate      | C         | String    | Will be null                                            |
|                                           | modifiedEpochDate     | C         | String    | Will be null                                            |
| generalResp                               | statusCode            | M         | Numeric   | 200- SUCCESS Other than 200-Failure                     |
|                                           | status                | M         | String    | It is either “Success” or failure                       |
|                                           | message               | M         | String    | Contains the reason message for failure / success       |
|                                           | remarks               | C         | String    |                                                         |

<mark style="color:blue;">**Json Formatted Request Example**</mark>

```json
{
"tenantId": "FE41", "actionType": "FETCH_PAY", 
"amountBreakSet": null, 
"amountOptions": false,
"billId": "5947f973-b595-484d-a19c-24a7668b058e",
"billerCategory": "Loan Repayment", 
"billerId": "KIFS00000NATST",
"billerName": "KIFS Housing Finance Ltd", 
"customerMobNo": "8281970522", 
"customerParams": [
{
"name": "APPLICATION NUMBER",
"value": "7710485"
}
],
"paymentMode": "UPI", "paymentChannel": "Agent", 
"paymentInformation": "xxxxxxxx@abc", 
"deviceBlockTags": [
{
"name": "MOBILE", 
"value": "9591810218"
},
{
"name": "GEOCODE",
"value": "28.6139,78.5555"
},
{
"name": "POSTAL_CODE",
"value": "600001"
},
{
"name": "TERMINAL_ID",
"value": "333001"
}
],
"refId": "vkL5Q79lukhzL4dSHatditBwzin20751743", 
"txnAmount": 5600
}
```

<mark style="color:blue;">**Json Formatted Response Example**</mark>

```json
{
"txnId": "fdd28ccc-90bd-4719-8adf-26e085d18d54", 
"refId": null,
"actionType": null, 
"userType": null, 
"userId": null, 
"txnAmount": 0.0, 
"billerId": null, 
"billerCategory": null, 
"offUsPay": null, 
"splitPay": null, 
"quickPay": null, 
"paymentMode": null, 
"custConvFee": null,
"currency": null,
"status": "BILL_PAYMENT_INITIATED",
"genericResponse": { 
"statusCode": "200",
"status": "success",
"message": "Bill Payment Initiated", 
"remarks": ""
}
}
```

**Initiating Channel Vs Device Block Parameters**

| Initiating Channel                | Device Block Tags                           |
| --------------------------------- | ------------------------------------------- |
| Bank Branch                       | IFSC, MOBILE, GEOCODE, POSTAL\_CODE         |
| Mobile (Pre-login)                | IP, IMEI, OS, APP                           |
| Mobile Banking(Post-login)        | IP, IMEI, OS, APP                           |
| Internet (Pre-login)              | IP, MAC                                     |
| Internet Banking (Post-login) ATM | <p>IP, MAC</p><p>TERMINAL\_ID</p>           |
| Kiosk                             | TERMINAL\_ID                                |
| Agent                             | TERMINAL\_ID, MOBILE, GEOCODE, POSTAL\_CODE |
| Business Correspondent            | TERMINAL\_ID, MOBILE, GEOCODE, POSTAL\_CODE |

**Payment Mode Vs Payment Info Parameters**

| Payment Mode     | Payment Information Tag |
| ---------------- | ----------------------- |
| Cash             | Remarks                 |
| Internet Banking | IFSC\|AccountNo         |
| Credit Card      | CardNum\|AuthCode       |
| DEbit Card       | CardNum\|AuthCode       |
| Prepaid Card     | CardNum\|AuthCode       |
| IMPS             | MMID\|MobileNo          |
| NEFT             | IFSC\|AccountNo         |
| UPI              | VPA                     |
| Wallet           | WalletName\|MobileNo    |
| AEPS             | Aadhaar\|IIN            |
| Account Transfer | IFSC\|AccountNo         |
| Bharat QR        | IFSC\|AccountNo         |
| USSD             | Remarks                 |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digiledge.in/untitled/bbps/bbps-agent-integration/bbps-agent-api/bill-payment-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
