Skip to main content
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. In sandbox, your requests go to a BBPS switch simulator instead of the live Bharat Connect network. The simulator validates each request and responds the way Bharat Connect does, so you can test with any active biller without real customer accounts.

Sandbox credentials

Agent IDs and device block values for each supported initiating channel.

Test billers

How to choose a biller and how the simulator creates and settles test bills.

End-to-end flow

Step-by-step instructions to complete a full bill payment cycle in the sandbox environment.

Sandbox credentials

Use the agent IDs below when constructing sandbox requests. Each agent ID is pre-configured for a specific initiating channel.
Use each agent ID with its own initiating channel. The simulator rejects a physical agent ID used on an online channel with AGT006, and an online agent ID used on a physical channel with AGT005, as Bharat Connect does in production. For example, the AGT agent ID on the INTB channel fails with AGT006. Mixing the two online agent IDs (INTB and MOBB) is not rejected in sandbox, but use the matching ID so that your requests behave the same way in production.

Device block values

The device block must match the tag requirements of the initiating channel. Use the values below when building sandbox requests.
Pass the following tags in the agent.device.tag array for the INTB channel.
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, terminal_id, geo_code) rather than as a tag array. The tag array format applies to the Bill Payment Request API.

Test billers

You can test with any ACTIVE biller returned by the sandbox Fetch Biller MDM Details API. No special test biller or test value is needed.

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 Biller MDM Details API 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. In sandbox, any value that matches a parameter’s expected format works. For example, use any 10-digit number for a mobile number parameter. A value that doesn’t match the format, or a missing mandatory parameter, is rejected with the same error code as in production.

How the simulator handles bills

The simulator behaves like a real biller, with the following rules:
  • The first bill fetch for a customer account creates a bill for that account. Later fetches for the same account return the same bill.
  • The bill amount is generated from the customer account value. It is a whole rupee amount within a typical range for the biller category, limited by the biller’s payment limits. The same account value always returns the same amount, so to get a different amount, use a different account value. You can’t set the amount yourself.
  • The bill due date and any amount options, such as late payment or minimum due amounts, are generated in the same way.
  • The payment amount is checked against the biller’s payment_amount_exactness, as in production.
  • A successful bill payment marks the bill as paid.
  • After the bill is paid, a bill fetch for the same account returns BFR004 (no bill due). For billers that bill periodically, a new bill becomes available when the billing cycle rolls over, in real time. For one-time categories, such as Donation, eChallan, Education Fees and LPG Gas, the account has no further bills. To test another payment straight away, use a different customer account value. Sandbox accounts can’t be reset.
  • Requests are validated as Bharat Connect validates them, including the agent, device, customer, payment and amount details. Failed checks return the error codes listed on the BBPS COU error codes page.
The following table shows the billing cycle the simulator uses for common categories:
The simulator doesn’t reproduce biller-specific declines, such as the LPG cylinder booking errors BFR013 to BFR016, and it doesn’t validate plan details for billers where plan_mdm_requirement is mandatory. Handle these cases based on the BBPS COU error codes and the biller’s MDM details, and verify them in production.
The earlier Loan Repayment test biller and the CF_AUTO_GENERATE input value are no longer supported. Use any active biller with your own test values instead.

End-to-end sandbox testing

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

Initiate a bill fetch

Call the Bill Fetch Request API using your sandbox credentials. Use one of the sandbox agent IDs with the matching device block, pass the ID of any active biller, and pass test values for that biller’s customer input parameters in the input_params block.A successful request returns a ref_id. Store this value, as you need it to poll the bill fetch response and to submit the bill payment request.
2

Poll the bill fetch response

Call the Bill Fetch Response API 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.
3

Complete the payment transaction

Use Cashfree 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.
4

Submit the bill payment request

Call the Bill Payment Request API 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.
5

Poll the bill payment response

Call the Bill Payment Response API 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.
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 page.