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.Device block values
The device block must match the tag requirements of the initiating channel. Use the values below when building sandbox requests.- INTB, Internet Banking (Post-login)
- MOBB, Mobile Banking (Post-login)
- AGT, Agent
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 anyACTIVE 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 thebiller_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 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, setbill_fetch_ref_idto theref_idfrom Step 1 and setpg_reference_idto thecf_payment_idreceived from DevStudio in Step 3. - Pass the
biller_responseobject exactly as received from the Bill Fetch Response in Step 2. - Pass the
additional_infofield exactly as received from the Bill Fetch Response in Step 2.
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.