# Bill Validate API

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

| Endpoint                                                                           |
| ---------------------------------------------------------------------------------- |
| **Request:&#x20;**<mark style="color:blue;">**POST /couapp/bills/validate**</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 – 14                                                    |
|                                            | 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 |
|                                            | clientReqId            | C         | String       | A unique id which the client has to provide                          |
|                                            | 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                                            |
|                                            | planInfoDaos          | 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",
"billerId": "HUNG00000NATJL",
"customerParamsRequest": 
{ "tags": [
{
"name": "Mobile Number", 
"value": "8281970522"
},
{
"name": "Email ID",
"value": "jithesh@digiledge.in"
},
{
"name": "Id",
"value": "2862"
}
]
},
"billerName": "Hungama Music", 
"billerCategory": "Subscription", 
"macAdress": null, 
"customerMobNo": "8281970523"
}
```

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

```json
{
"genericResponse": { 
"statusCode": "200",
"status": "success",
"message": "Bill Validate Initiated", 
"remarks": ""
},
"billId": "c9670952-ebd7-487a-b6ea-49f2b4d4a718", 
"refId": null,
"billerId": null, 
"status": null, "actionType": null, 
"userId": null, "billerResponse": null, 
"additionalInfo": null,
"customerParams": null, 
"planInfoDaos": null, 
"creationDate": null, 
"modifiedDate": null, 
"createdEpochDate": 0,
"modifiedEpochDate": 0
}
```


---

# 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-validate-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.
