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

# Data to Test Integration

> Use the sandbox credentials, test billers, and end-to-end flow on this page to validate your BBPS COU integration before going live.

Use the sandbox credentials and test flow on this page to validate your BBPS COU integration before going live. The sandbox environment supports end-to-end testing of the bill fetch and bill payment journey, including a built-in auto bill simulator for the Loan Repayment category.

<CardGroup cols={3}>
  <Card title="Sandbox credentials" icon="key" href="#sandbox-credentials">
    Agent IDs and device block values for each supported initiating channel.
  </Card>

  <Card title="Test billers" icon="building-columns" href="#test-billers">
    How to identify customer input parameters for any biller and how to use the auto bill simulator.
  </Card>

  <Card title="End-to-end flow" icon="arrow-right-arrow-left" href="#end-to-end-sandbox-testing">
    Step-by-step instructions to complete a full bill payment cycle in the sandbox environment.
  </Card>
</CardGroup>

## Sandbox credentials

Use the agent IDs below when constructing sandbox requests. Each agent ID is pre-configured for a specific initiating channel.

| Initiating channel            | Channel code | Sandbox agent ID       |
| :---------------------------- | :----------- | :--------------------- |
| Internet Banking (Post-login) | `INTB`       | `CH01CH02INB516193127` |
| Mobile Banking (Post-login)   | `MOBB`       | `CH01CH02MBBPAL001085` |

### Device block values

The device block must match the tag requirements of the initiating channel. Use the values below when building sandbox requests.

<Tabs>
  <Tab title="INTB — Internet Banking (Post-login)">
    Pass the following tags in the `agent.device.tag` array for the `INTB` channel.

    | Tag name             | Sandbox value       |
    | :------------------- | :------------------ |
    | `INITIATING_CHANNEL` | `INTB`              |
    | `IP`                 | `124.170.23.24`     |
    | `MAC`                | `01-23-45-67-89-ab` |
  </Tab>

  <Tab title="MOBB — Mobile Banking (Post-login)">
    Pass the following tags in the `agent.device.tag` array for the `MOBB` channel.

    | Tag name             | Sandbox value     |
    | :------------------- | :---------------- |
    | `INITIATING_CHANNEL` | `MOBB`            |
    | `IP`                 | `124.170.23.24`   |
    | `IMEI`               | `123456789012345` |
    | `OS`                 | `IOS`             |
    | `APP`                | `AGENTAPP`        |
  </Tab>
</Tabs>

<Note>
  For the Bill Fetch Request API, the same values apply but are passed as named fields directly under `agent_device_info` (for example, `init_channel`, `ip`, `mac`) rather than as a tag array. The tag array format applies to the Bill Payment Request API.
</Note>

## Test billers

### Finding customer input parameters

Each biller requires a specific set of customer identifiers to initiate a bill fetch. To find the correct parameters for a biller, call the [Fetch Billers Info API](/docs/api-reference/other-apis/bbps-cou/billers/info) and read the `biller_customer_params` field in the response. This field lists all the input parameter names and their expected formats that must be passed in the `input_params` block of the Bill Fetch Request.

### Auto bill simulator

For the Loan Repayment category, a built-in auto bill simulator is available in the sandbox environment. Instead of supplying real customer identifiers, pass `CF_AUTO_GENERATE` as the value for any input parameter. The system automatically generates a bill and returns a `ref_id` that you can use to poll the Bill Fetch Response API.

Use the following biller to test the auto bill simulator:

| Field                 | Value              |
| :-------------------- | :----------------- |
| Biller ID             | `SWAR00027NAT2J`   |
| Category              | Loan Repayment     |
| Input parameter value | `CF_AUTO_GENERATE` |

<Tip>
  The auto bill simulator eliminates the need for real loan account numbers during sandbox testing, making it straightforward to run a complete end-to-end flow without any production data.
</Tip>

## End-to-end sandbox testing

The following steps walk you through a complete BBPS COU bill payment cycle in the sandbox environment using the auto bill simulator.

<Steps>
  <Step title="Initiate a bill fetch">
    Call the [Bill Fetch Request API](/docs/api-reference/other-apis/bbps-cou/bill-fetch/request) using your sandbox credentials. Use biller ID `SWAR00027NAT2J` and pass `CF_AUTO_GENERATE` as the value for all input parameters in the `input_params` block.

    A successful request returns a `ref_id`. Store this value — you will need it to poll the bill fetch response and to submit the bill payment request.
  </Step>

  <Step title="Poll the bill fetch response">
    Call the [Bill Fetch Response API](/docs/api-reference/other-apis/bbps-cou/bill-fetch/response) using the `ref_id` from Step 1. Poll at regular intervals until the response returns a terminal status.

    Once successful, note the `biller_response` object and the `additional_info` field from the response. You must pass both of these fields exactly as received into the Bill Payment Request in Step 4.
  </Step>

  <Step title="Complete the payment transaction">
    Use [Cashfree DevStudio](https://www.cashfree.com/devstudio) to complete the payment leg of the transaction in the sandbox environment. Once the payment is complete, DevStudio returns a Cashfree payment ID (`cf_payment_id`). Store this value — it is required as the `pg_reference_id` in the next step.
  </Step>

  <Step title="Submit the bill payment request">
    Call the [Bill Payment Request API](/docs/api-reference/other-apis/bbps-cou/bill-payment/request) with the following data:

    * Under `head`, set `bill_fetch_ref_id` to the `ref_id` from Step 1 and set `pg_reference_id` to the `cf_payment_id` received from DevStudio in Step 3.
    * Pass the `biller_response` object exactly as received from the Bill Fetch Response in Step 2.
    * Pass the `additional_info` field exactly as received from the Bill Fetch Response in Step 2.

    A successful request returns a `transaction_ref_id`. Store this value along with the `bill_fetch_ref_id` to poll for the final payment status.
  </Step>

  <Step title="Poll the bill payment response">
    Call the [Bill Payment Response API](/docs/api-reference/other-apis/bbps-cou/bill-payment/response) using both the `bill_fetch_ref_id` from Step 1 and the `transaction_ref_id` from Step 4. Poll at regular intervals until `data.status` returns `success` or `failed`.

    A `success` status confirms that the end-to-end BBPS COU transaction completed successfully in the sandbox environment.
  </Step>
</Steps>

<Note>
  Complete all integration testing in the sandbox environment before deploying to production. For help with errors encountered during testing, refer to the [BBPS COU error codes](/docs/api-reference/other-apis/bbps-cou/error-codes) page.
</Note>

<div class="hidden" data-table-of-contents="bottom">
  <p class="mt-4 font-medium flex items-center gap-2 related-docs-heading">
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="w-4 h-4">
      <path d="M3 4h7a2 2 0 0 1 2 2v13a2 2 0 0 0-2-2H3z" />

      <path d="M21 4h-7a2 2 0 0 0-2 2v13a2 2 0 0 1 2-2h7z" />
    </svg>

    <span>Related topics</span>
  </p>

  <ul>
    <li><a href="/docs/api-reference/other-apis/bbps-cou/overview">BBPS COU overview</a></li>
    <li><a href="/docs/api-reference/other-apis/bbps-cou/bill-fetch/request">Bill Fetch Request API</a></li>
    <li><a href="/docs/api-reference/other-apis/bbps-cou/bill-payment/request">Bill Payment Request API</a></li>
    <li><a href="/docs/api-reference/other-apis/bbps-cou/error-codes">BBPS COU error codes</a></li>
  </ul>
</div>
