> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Bill Fetch Request

> With the biller's MDM details in hand, use this API to initiate a bill fetch or validation for the customer. Pass the customer input parameters specified in the biller's MDM response, such as a consumer number or mobile number, along with the agent device context. The API automatically determines the payment flow (`FETCH_AND_PAY` or `VALIDATE_AND_PAY`) based on the biller's configuration.

<Warning>
This API is only applicable for billers whose `fetch_requirement` or `support_bill_validation` is `MANDATORY` or `OPTIONAL`. For billers where both are `NOT_SUPPORTED` (`DIRECT_PAY` flow), skip this step and proceed directly to the [Bill Payment Request API](/api-reference/other-apis/bbps-cou/bill-payment/request).
</Warning>

<Accordion title="Flow determination logic">

The flow is evaluated in the following priority order based on the biller's MDM configuration:

| Priority | `fetch_requirement` | `support_bill_validation` | Flow |
|---|---|---|---|
| 1 | `MANDATORY` | Any | `FETCH_AND_PAY` |
| 2 | `NOT_SUPPORTED` | `MANDATORY` or `OPTIONAL` | `VALIDATE_AND_PAY` |
| 3 | `NOT_SUPPORTED` | `NOT_SUPPORTED` | `DIRECT_PAY` |
| 4 | `OPTIONAL` | `MANDATORY` | `VALIDATE_AND_PAY` |
| 5 | `OPTIONAL` | Any other | `FETCH_AND_PAY` |

For `DIRECT_PAY`, this API is not applicable. Calling it returns a validation error. Proceed directly to the Bill Payment Request API.

</Accordion>

<Warning>
With synchronous responses enabled, handle both HTTP `200` and HTTP `202`, and set your HTTP client timeout to at least 30 seconds. For details, see [Synchronous responses](/api-reference/other-apis/bbps-cou/synchronous-responses).
</Warning>

<Tip>
Once you receive a successful bill fetch, proceed to the [Bill Payment Request API](/api-reference/other-apis/bbps-cou/bill-payment/request) to complete the payment. When polling the [Bill Fetch Response API](/api-reference/other-apis/bbps-cou/bill-fetch/response) for the result, check the biller's `biller_response_type` field from the Fetch Biller MDM Details response. If it is `LIST` (the biller can return multiple outstanding bills in a single fetch, such as traffic challans), use `x-api-version: 2026-01-01` on the response API to receive all bills in the `biller_responses` array. For all other billers, use the default `x-api-version: 2025-01-01`, which returns a single bill in `biller_response`.
</Tip>



## OpenAPI

````yaml openapi/bbps/bbps-cou.yaml post /bbps/cou/v1/billers/request/bill-fetch
openapi: 3.0.3
info:
  title: BBPS for Customers (Customer Operating Unit)
  version: 1.0.0
  description: >
    APIs for Agent Institutions to integrate with the Bharat Bill Payment System
    (BBPS) as a Customer Operating Unit (COU). These APIs enable bill discovery,
    bill fetch, bill payment, ticket management, and wallet operations.
servers:
  - url: https://sandbox.cashfree.com
    description: Sandbox (Testing) environment.
  - url: https://api.cashfree.com
    description: Production environment.
security:
  - XClientID: []
    XClientSecret: []
paths:
  /bbps/cou/v1/billers/request/bill-fetch:
    post:
      tags:
        - Bill Fetch
      summary: Bill Fetch Request
      description: >-
        With the biller's MDM details in hand, use this API to initiate a bill
        fetch or validation for the customer. Pass the customer input parameters
        specified in the biller's MDM response, such as a consumer number or
        mobile number, along with the agent device context. The API
        automatically determines the payment flow (`FETCH_AND_PAY` or
        `VALIDATE_AND_PAY`) based on the biller's configuration.


        <Warning>

        This API is only applicable for billers whose `fetch_requirement` or
        `support_bill_validation` is `MANDATORY` or `OPTIONAL`. For billers
        where both are `NOT_SUPPORTED` (`DIRECT_PAY` flow), skip this step and
        proceed directly to the [Bill Payment Request
        API](/api-reference/other-apis/bbps-cou/bill-payment/request).

        </Warning>


        <Accordion title="Flow determination logic">


        The flow is evaluated in the following priority order based on the
        biller's MDM configuration:


        | Priority | `fetch_requirement` | `support_bill_validation` | Flow |

        |---|---|---|---|

        | 1 | `MANDATORY` | Any | `FETCH_AND_PAY` |

        | 2 | `NOT_SUPPORTED` | `MANDATORY` or `OPTIONAL` | `VALIDATE_AND_PAY` |

        | 3 | `NOT_SUPPORTED` | `NOT_SUPPORTED` | `DIRECT_PAY` |

        | 4 | `OPTIONAL` | `MANDATORY` | `VALIDATE_AND_PAY` |

        | 5 | `OPTIONAL` | Any other | `FETCH_AND_PAY` |


        For `DIRECT_PAY`, this API is not applicable. Calling it returns a
        validation error. Proceed directly to the Bill Payment Request API.


        </Accordion>


        <Warning>

        With synchronous responses enabled, handle both HTTP `200` and HTTP
        `202`, and set your HTTP client timeout to at least 30 seconds. For
        details, see [Synchronous
        responses](/api-reference/other-apis/bbps-cou/synchronous-responses).

        </Warning>


        <Tip>

        Once you receive a successful bill fetch, proceed to the [Bill Payment
        Request API](/api-reference/other-apis/bbps-cou/bill-payment/request) to
        complete the payment. When polling the [Bill Fetch Response
        API](/api-reference/other-apis/bbps-cou/bill-fetch/response) for the
        result, check the biller's `biller_response_type` field from the Fetch
        Biller MDM Details response. If it is `LIST` (the biller can return
        multiple outstanding bills in a single fetch, such as traffic challans),
        use `x-api-version: 2026-01-01` on the response API to receive all bills
        in the `biller_responses` array. For all other billers, use the default
        `x-api-version: 2025-01-01`, which returns a single bill in
        `biller_response`.

        </Tip>
      operationId: billFetchRequest
      parameters:
        - in: header
          name: x-api-version
          required: false
          description: >
            API version to be used. Format is YYYY-MM-DD. The only supported
            version for this API is `2025-01-01`. If not specified, `2025-01-01`
            is used.
          schema:
            type: string
            default: '2025-01-01'
            enum:
              - '2025-01-01'
          example: '2025-01-01'
      requestBody:
        description: >-
          Request parameters to initiate a bill fetch or bill validation
          request.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - bill_fetch_request
              properties:
                bill_fetch_request:
                  type: object
                  required:
                    - agent_id
                    - biller_id
                    - input_params
                  properties:
                    agent_id:
                      type: string
                      description: >-
                        Unique ID assigned to your BBPS agent upon registration
                        at NBBL. This is provided to you after your onboarding
                        and agent creation at NBBL. Contact your Cashfree
                        account manager if you have not received this.
                      example: OU01XXXXINT001123456
                    biller_id:
                      type: string
                      description: >-
                        Biller ID as returned by the Fetch Biller MDM Details
                        API.
                      example: VODA00000MUM03
                    agent_device_info:
                      type: object
                      description: >
                        Device and channel metadata for the device initiating
                        the bill fetch request on behalf of the customer.
                        Required by BBPS for audit and compliance purposes.
                        Mandatory for FETCH_AND_PAY. Optional for
                        VALIDATE_AND_PAY. At least one sub-field must be
                        non-null. The `init_channel` field determines which
                        sub-fields are mandatory and which payment modes are
                        supported.
                      properties:
                        init_channel:
                          type: string
                          description: >
                            Initiating channel through which the bill fetch
                            request originates. Only the following three
                            channels are supported:


                            **`MOBB` — Mobile Banking (Post-login)**

                            Required device block tags: `ip`, `imei`, `os`,
                            `app`

                            Supported payment modes: Internet Banking, Credit
                            Card, Debit Card, Prepaid Card, UPI, Wallet, AEPS,
                            USSD, CBDC


                            **`INTB` — Internet Banking (Post-login)**

                            Required device block tags: `ip`, `mac`

                            Supported payment modes: Internet Banking, Credit
                            Card, Debit Card, Prepaid Card, UPI, Wallet, CBDC


                            **`AGT` — Agent**

                            Required device block tags: `terminal_id`, `mobile`,
                            `geo_code`, `postal_code`

                            Supported payment modes: Cash, Credit Card, Debit
                            Card, Prepaid Card, UPI, AEPS, Bharat QR, CBDC
                          enum:
                            - MOBB
                            - INTB
                            - AGT
                          example: INTB
                        ip:
                          type: string
                          description: IP address of the device initiating the request.
                          example: 124.170.23.22
                        mobile:
                          type: string
                          description: Mobile number of the agent device.
                          example: '9830098300'
                        geo_code:
                          type: string
                          description: >-
                            GPS coordinates of the device in
                            "latitude,longitude" format.
                          example: 12.9667,77.5667
                        postal_code:
                          type: string
                          description: Postal code of the device location.
                          example: '400063'
                        terminal_id:
                          type: string
                          description: Unique terminal identifier for the agent device.
                          example: '1234556'
                        imei:
                          type: string
                          description: IMEI number of the mobile device.
                          example: '123456789012345'
                        ifsc:
                          type: string
                          description: IFSC code of the agent's bank branch.
                          example: ABCD0001234
                        mac:
                          type: string
                          description: MAC address of the device.
                          example: 00-0D-60-07-2A-F0
                        os:
                          type: string
                          description: >-
                            Operating system of the device. Example values are
                            iOS and Android.
                          example: iOS
                        app:
                          type: string
                          description: >-
                            Name of the agent application initiating the
                            request.
                          example: AGENTAPP
                    customer_info:
                      type: object
                      description: >-
                        Personal details of the customer for whom the bill fetch
                        is being initiated. Used by the biller to associate the
                        request with a customer account. Mandatory for
                        `FETCH_AND_PAY`. Optional for `VALIDATE_AND_PAY`.
                      required:
                        - customer_mobile
                      properties:
                        customer_mobile:
                          type: string
                          description: >-
                            Mobile number of the customer initiating the bill
                            fetch.
                          example: 9505XXXX98
                        customer_email:
                          type: string
                          description: Customer's email address.
                          example: customer@example.com
                        aadhaar:
                          type: string
                          description: Customer's 12-digit Aadhaar number.
                          example: '123456789012'
                        pan:
                          type: string
                          description: Customer's PAN card number.
                          example: BXXCG7754K
                    input_params:
                      type: object
                      required:
                        - input
                      description: Customer identifiers matching the biller configuration.
                      properties:
                        input:
                          type: array
                          description: >-
                            Array of customer identifier key-value pairs
                            required by the biller. Each object contains one
                            customer parameter. The parameters to collect and
                            their validation rules are defined in the
                            `biller_customer_params` array returned by the Fetch
                            Biller MDM Details API for this biller.
                          minItems: 1
                          items:
                            type: object
                            required:
                              - param_name
                              - param_value
                            properties:
                              param_name:
                                type: string
                                description: >-
                                  The customer identifier the biller uses to
                                  look up the account. The parameter name must
                                  exactly match the value returned in the
                                  `biller_customer_params` array of the Fetch
                                  Biller MDM Details API response for this
                                  biller. Submit one input object per required
                                  customer parameter.
                                example: Loan Account Number
                              param_value:
                                type: string
                                description: >-
                                  The customer's input value for the
                                  corresponding `param_name`. Must conform to
                                  the `data_type`, `min_length`, `max_length`,
                                  and `regex` constraints defined in the
                                  biller's MDM configuration.
                                example: LN00123456
            example:
              bill_fetch_request:
                agent_id: CH01CH02INB516193127
                biller_id: SWAR00027NAT2J
                agent_device_info:
                  init_channel: INTB
                  ip: 124.170.23.24
                  mac: 01-23-45-67-89-ab
                customer_info:
                  customer_mobile: '9958732581'
                input_params:
                  input:
                    - param_name: Loan Account Number
                      param_value: LN0098765444
                    - param_name: Mobile Number
                      param_value: '7428771693'
      responses:
        '200':
          description: >-
            Final result returned in the same call. Returned only when
            synchronous responses are enabled for your account and the result is
            ready within the synchronous wait period.
          headers:
            x-api-version:
              $ref: '#/components/headers/x-api-version'
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      The status of the API call. Returns `OK` when the request
                      is successfully processed and the final result is
                      available in the same call. This field indicates the API
                      call succeeded. The outcome of the bill fetch operation is
                      available in the `data` object.
                    example: OK
                  message:
                    type: string
                    description: >-
                      Final outcome of the bill fetch or bill validation
                      request. The possible values match the `message` values
                      that the Bill Fetch Response API returns.
                    enum:
                      - Bill details fetched successfully
                      - Bill request failed
                  data:
                    type: object
                    description: Contains the final result of the bill fetch request.
                    properties:
                      ref_id:
                        type: string
                        description: >-
                          Unique reference ID for this request. Can be used to
                          fetch the result from the Bill Fetch Response API if
                          needed.
                        example: 9c9c176478db40f6b029f8ddbba62901806
                      status:
                        type: string
                        description: >-
                          Final status of the bill fetch or validation.
                          `SUCCESS` indicates the biller returned the bill
                          details (for FETCH_AND_PAY) or validated the
                          customer's identity (for VALIDATE_AND_PAY). `FAILED`
                          indicates the biller rejected the request. Check
                          `result.bill_fetch_response.response_reason` and
                          `compliance_reason` for the failure details.
                        enum:
                          - SUCCESS
                          - FAILED
                        example: SUCCESS
                      flow:
                        type: string
                        description: >-
                          Payment flow determined by the biller's MDM
                          configuration. Store this value because it determines
                          which fields to expect in `data.result`.
                        enum:
                          - FETCH_AND_PAY
                          - VALIDATE_AND_PAY
                        example: FETCH_AND_PAY
                      result:
                        type: object
                        description: >-
                          Final result of the request, in the same format as the
                          `data` object returned by the [Bill Fetch Response
                          API](/api-reference/other-apis/bbps-cou/bill-fetch/response)
                          for the same `ref_id`. Present only in HTTP `200`
                          responses.
              examples:
                success_fetch_and_pay:
                  summary: Success for FETCH_AND_PAY
                  value:
                    status: OK
                    message: Bill details fetched successfully
                    data:
                      ref_id: 9c9c176478db40f6b029f8ddbba62901806
                      status: SUCCESS
                      flow: FETCH_AND_PAY
                      result:
                        bill_fetch_response:
                          ref_id: 9c9c176478db40f6b029f8ddbba62901806
                          approval_ref_num: SBOX-REF-45bce5fdbcc34c24
                          response_code: '000'
                          response_reason: Successful
                          compliance_resp_cd: ''
                          compliance_reason: ''
                        bill_details:
                          customer_params:
                            tag:
                              - name: Loan Account Number
                                value: PANFNLdFrpFY66KkGzL3
                              - name: Mobile Number
                                value: '6286042303'
                        biller_response:
                          customer_name: Sbox Test Customer
                          amount: '100.00'
                          cust_conv_fee: ''
                          due_date: '2026-11-16'
                          bill_date: '2026-10-16'
                          bill_number: SBOX-REF-45bce5fdbcc34c24
                          bill_period: MONTHLY
                          tag: null
                        additional_info: null
                success_validate_and_pay:
                  summary: Success for VALIDATE_AND_PAY
                  value:
                    status: OK
                    message: Bill details fetched successfully
                    data:
                      ref_id: HENSVVR4QOS7X1UGPY7JGUV444P10102202
                      status: SUCCESS
                      flow: VALIDATE_AND_PAY
                      result:
                        bill_fetch_response:
                          ref_id: HENSVVR4QOS7X1UGPY7JGUV444P10102202
                          approval_ref_num: AB123456
                          response_code: '000'
                          response_reason: Successful
                        additional_info: null
                failed:
                  summary: Failed (both flows)
                  value:
                    status: OK
                    message: Bill request failed
                    data:
                      ref_id: b0b8b97547b944b985eb196358462451850
                      status: FAILED
                      flow: FETCH_AND_PAY
                      result:
                        bill_fetch_response:
                          ref_id: b0b8b97547b944b985eb196358462451850
                          approval_ref_num: ''
                          response_code: '200'
                          response_reason: Failure
                          compliance_resp_cd: BFR004
                          compliance_reason: >-
                            Payment received for the billing period - no bill
                            due
                        bill_details: null
                        biller_response: null
                        additional_info: null
        '202':
          description: >-
            The bill fetch request has been accepted and queued for processing.
            Use the `ref_id` in the response to poll the Bill Fetch Response API
            for the result. If synchronous responses are enabled for your
            account, this status indicates the result was not ready within the
            synchronous wait period. Fall back to polling.
          headers:
            x-api-version:
              $ref: '#/components/headers/x-api-version'
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      The status of the API call. Returns `ACCEPTED` when the
                      request is successfully queued for processing. This field
                      indicates the API call succeeded. Poll the Bill Fetch
                      Response API using the `ref_id` in the `data` object for
                      the final result.
                    example: ACCEPTED
                  message:
                    type: string
                    description: >-
                      Confirmation that the request has been accepted and queued
                      for processing.
                    example: Bill fetch request accepted for processing
                  data:
                    type: object
                    description: >-
                      Acknowledgement data returned immediately upon request
                      acceptance.
                    properties:
                      ref_id:
                        type: string
                        description: >-
                          Unique reference ID for this request. Use this to poll
                          the Bill Fetch Response API.
                        example: 9c9c176478db40f6b029f8ddbba62901806
                      status:
                        type: string
                        description: >-
                          Processing status of the request. Always "PROCESSING"
                          at this stage.
                        example: PROCESSING
                      flow:
                        type: string
                        description: >-
                          Payment flow determined by the biller's MDM
                          configuration. Store this value because it determines
                          which fields to expect in the Bill Fetch Response.
                        enum:
                          - FETCH_AND_PAY
                          - VALIDATE_AND_PAY
                          - DIRECT_PAY
                        example: FETCH_AND_PAY
        '400':
          description: Bad request error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: >-
                  bill_fetch_request.biller_id : is missing in the request.
                  Value received: 
                code: bill_fetch_request.biller_id_missing
                type: invalid_request_error
        '401':
          description: Authentication Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '429':
          description: Rate Limit Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitResponse'
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
components:
  headers:
    x-api-version:
      schema:
        type: string
        format: YYYY-MM-DD
        enum:
          - '2025-01-01'
          - '2026-01-01'
      description: >-
        The API version used to process this request, echoed back in the
        response.
  schemas:
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A description of the error explaining what went wrong.
        code:
          type: string
          description: >-
            An error code identifying the specific validation failure. Use this
            to handle errors programmatically.
        type:
          type: string
          description: The category of the error indicating the class of failure.
    UnauthorizedResponse:
      type: object
      properties:
        message:
          type: string
          description: A description of the error explaining what went wrong.
          example: authentication Failed
        code:
          type: string
          description: >-
            An error code identifying the specific failure. Use this to handle
            errors programmatically.
          example: request_failed
        type:
          type: string
          description: The category of the error indicating the class of failure.
          example: authentication_error
    RateLimitResponse:
      type: object
      properties:
        message:
          type: string
          description: A description of the error explaining what went wrong.
          example: Too many requests from IP. Check headers
        code:
          type: string
          description: >-
            An error code identifying the specific failure. Use this to handle
            errors programmatically.
          example: request_failed
        type:
          type: string
          description: The category of the error indicating the class of failure.
          example: rate_limit_error
    InternalServerErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A description of the error explaining what went wrong.
          example: internal Server Error
        code:
          type: string
          description: >-
            An error code identifying the specific failure. Use this to handle
            errors programmatically.
          example: internal_error
        type:
          type: string
          description: The category of the error indicating the class of failure.
          example: api_error
  securitySchemes:
    XClientID:
      type: apiKey
      in: header
      name: x-client-id
      description: >-
        Your unique client identifier issued by Cashfree. You can find this in
        your [Merchant
        Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Your unique client secret issued by Cashfree. Keep this confidential and
        never expose it in client-side code. You can find this in your [Merchant
        Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.