API Test Keys
Fetch Bill Request
GET/v1/bill_payments/bill_requests/:idClick to copy
Use this endpoint to retrieve the status and details of a bill request created via the
API. Since bill requests are processed asynchronously, poll this endpoint until thestatus reaches a terminal state of success or failed. On success, the response contains the bill details, account holder information and any biller-specific metadata required for the next step.Polling Recommendation
Poll at intervals of 2-5 seconds. The bill retrieval typically completes within 10-30 seconds depending on the biller's response time.
Is this page helpful?
Curl
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X GET https://api.razorpay.com/v1/bill_payments/bill_requests/billreq_ERNEungCtXpZqM
Success (bills do not exist)
Success (bills exist)
Failure
1{2"id": "billreq_ERNEungCtXpZqM",3"entity": "bill_payment.bill_request",4"status": "success",5"customer": {6"id": "rzp_cust_123",7"name": "Gaurav Kumar",8"mobile": "919000090000",9"email": "gaurav.kumar@example.com"10},11"biller_id": "biller_001",12"gateway_biller_id": "TPOW00000MUM01",13"created_at": 1609459200,14"account_holder": {15"AccountHolderName": "Gaurav Kumar",16"<KEY>": "<VALUE>"17},18"bills": [],19"data": {20"email": "gaurav.kumar@example.com",21"KEY2": "VALUE2",22"KEY3": "VALUE3"23},24"error_code": "BAD_REQUEST_ERROR",25"error_description": "No bill is currently available for this customer account. The customer may have no outstanding dues or the bill for this cycle has not yet been generated.",26"error_source": "biller",27"error_step": "bill_request",28"error_reason": "no_outstanding_bill"29}
Path Parameters
id *
string Razorpay's bill request id created. For example, billreq_ERNEungCtXpZqM.
Response Parameters
idstringRazorpay's bill request id. Store for reference and reconciliation.
entitystring Entity type. Always bill_payment.bill_request.
statusstringRequest status. Possible values:
processing- The request is in progress. Continue polling.success- Bill details retrieved successfully. Proceed to create a payment.failed- Bill retrieval failed. See fields for details.
customerobjectCustomer reference details echoed from the request as dynamic key-value pairs. Returned only when sent in the request. Free-form metadata that you can use for your own tracking and reconciliation.
customer.id stringDynamic key-value pair holding your customer reference. Echoed back exactly as sent in the request. Not validated by Razorpay.
customer.name stringDynamic key-value pair holding the customer name. Echoed back exactly as sent in the request. Not validated by Razorpay.
customer.mobile *
stringCustomer mobile number provided at payment create on PA.
customer.email stringDynamic key-value pair holding the customer email. Echoed back exactly as sent in the request. Not validated by Razorpay.
biller_idstringRazorpay's internal biller id, same as sent in request. Use for reference and reconciliation.
gateway_biller_idstringNPCI biller id. Use for reference and reconciliation.
gatewaystring Bill payment gateway used. Default value is bbps.
created_atintegerRequest created timestamp at Razorpay (Unix seconds). Audit trail.
account_holderobject Details of the bill account holder, i.e. the actual user whose bill is being paid. Returned as dynamic key-value pairs defined by the biller's account_holder_config (NPCI biller MDM). The keys and values vary by biller. Razorpay does not control either.
billsarrayBill details if a bill is retrieved against the request. Empty array if not available.
bills[].bill_numberstringBill number given from biller. Show bill reference number on UI/UX.
bills[].amountintegerTotal bill amount provided by biller in paise. Show the bill amount to be paid by customer.
bills[].currencystring Default to INR. Show the currency of the amount in their UI/UX.
bills[].account_holder_namestring Account holder name as per the biller record. Verify against account_holder data.
bills[].bill_dateintegerBill generation date from biller (Unix seconds). Show the bill generated date on UI/UX.
bills[].due_dateintegerBill due date from biller (Unix seconds). Show the due date of the bill on UI/UX.
bills[].bill_periodenum Billing frequency. Values: onetime, daily, weekly, monthly, bimonthly, quarterly, halfyearly, yearly. Show the billing frequency of the bill on UI/UX.
bills[].amount_detailsobjectAmount breakup returned as dynamic key-value pairs defined by the biller (NPCI biller MDM). The keys and values vary by biller category. Razorpay does not control either. Show as part of amount breakup in UI/UX.
bills[].amount_details.min_amount_due integerDynamic key-value pair holding the minimum amount due in paise. Returned only when sent by the biller. Varies by biller category.
bills[].amount_details.current_outstanding_amount integerDynamic key-value pair holding the current outstanding amount in paise. Returned only when sent by the biller. Varies by biller category.
dataobjectDynamic key-value pairs of information sent by biller. Razorpay does not control this. Show biller-specific customer data on receipt.
error_codestring Error code if status is failed or if no bill is available. For example, BAD_REQUEST_ERROR, GATEWAY_ERROR.
error_descriptionstringHuman-readable error description.
error_sourcestring Origin of the error. Values: customer, biller, gateway, business.
error_stepstring Step at which the error occurred. For example, bill_request, validation.
error_reasonstringProgrammatic error reason code. Use for error-specific handling logic.
Errors
The bill request id is invalid or not found.
Error Status: 400
No bill request was found for the provided id.
Solution
The API <key/secret> provided is invalid.
Error Status: 401
The API credentials passed in the request differ from the ones generated on the Dashboard.
Solution
Fetch Bill Request
GET/v1/bill_payments/bill_requests/:idClick to copy
Use this endpoint to retrieve the status and details of a bill request created via the
API. Since bill requests are processed asynchronously, poll this endpoint until thestatus reaches a terminal state of success or failed. On success, the response contains the bill details, account holder information and any biller-specific metadata required for the next step.Polling Recommendation
Poll at intervals of 2-5 seconds. The bill retrieval typically completes within 10-30 seconds depending on the biller's response time.
Is this page helpful?
Path Parameters
id *
string Razorpay's bill request id created. For example, billreq_ERNEungCtXpZqM.
Response Parameters
idstringRazorpay's bill request id. Store for reference and reconciliation.
entitystring Entity type. Always bill_payment.bill_request.
statusstringRequest status. Possible values:
processing- The request is in progress. Continue polling.success- Bill details retrieved successfully. Proceed to create a payment.failed- Bill retrieval failed. See fields for details.
customerobjectCustomer reference details echoed from the request as dynamic key-value pairs. Returned only when sent in the request. Free-form metadata that you can use for your own tracking and reconciliation.
customer.id stringDynamic key-value pair holding your customer reference. Echoed back exactly as sent in the request. Not validated by Razorpay.
customer.name stringDynamic key-value pair holding the customer name. Echoed back exactly as sent in the request. Not validated by Razorpay.
customer.mobile *
stringCustomer mobile number provided at payment create on PA.
customer.email stringDynamic key-value pair holding the customer email. Echoed back exactly as sent in the request. Not validated by Razorpay.
biller_idstringRazorpay's internal biller id, same as sent in request. Use for reference and reconciliation.
gateway_biller_idstringNPCI biller id. Use for reference and reconciliation.
gatewaystring Bill payment gateway used. Default value is bbps.
created_atintegerRequest created timestamp at Razorpay (Unix seconds). Audit trail.
account_holderobject Details of the bill account holder, i.e. the actual user whose bill is being paid. Returned as dynamic key-value pairs defined by the biller's account_holder_config (NPCI biller MDM). The keys and values vary by biller. Razorpay does not control either.
billsarrayBill details if a bill is retrieved against the request. Empty array if not available.
bills[].bill_numberstringBill number given from biller. Show bill reference number on UI/UX.
bills[].amountintegerTotal bill amount provided by biller in paise. Show the bill amount to be paid by customer.
bills[].currencystring Default to INR. Show the currency of the amount in their UI/UX.
bills[].account_holder_namestring Account holder name as per the biller record. Verify against account_holder data.
bills[].bill_dateintegerBill generation date from biller (Unix seconds). Show the bill generated date on UI/UX.
bills[].due_dateintegerBill due date from biller (Unix seconds). Show the due date of the bill on UI/UX.
bills[].bill_periodenum Billing frequency. Values: onetime, daily, weekly, monthly, bimonthly, quarterly, halfyearly, yearly. Show the billing frequency of the bill on UI/UX.
bills[].amount_detailsobjectAmount breakup returned as dynamic key-value pairs defined by the biller (NPCI biller MDM). The keys and values vary by biller category. Razorpay does not control either. Show as part of amount breakup in UI/UX.
bills[].amount_details.min_amount_due integerDynamic key-value pair holding the minimum amount due in paise. Returned only when sent by the biller. Varies by biller category.
bills[].amount_details.current_outstanding_amount integerDynamic key-value pair holding the current outstanding amount in paise. Returned only when sent by the biller. Varies by biller category.
dataobjectDynamic key-value pairs of information sent by biller. Razorpay does not control this. Show biller-specific customer data on receipt.
error_codestring Error code if status is failed or if no bill is available. For example, BAD_REQUEST_ERROR, GATEWAY_ERROR.
error_descriptionstringHuman-readable error description.
error_sourcestring Origin of the error. Values: customer, biller, gateway, business.
error_stepstring Step at which the error occurred. For example, bill_request, validation.
error_reasonstringProgrammatic error reason code. Use for error-specific handling logic.
Errors
The bill request id is invalid or not found.
Error Status: 400
No bill request was found for the provided id.
Solution
The API <key/secret> provided is invalid.
Error Status: 401
The API credentials passed in the request differ from the ones generated on the Dashboard.
Solution
Curl
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X GET https://api.razorpay.com/v1/bill_payments/bill_requests/billreq_ERNEungCtXpZqM
Success (bills do not exist)
Success (bills exist)
Failure
1{2"id": "billreq_ERNEungCtXpZqM",3"entity": "bill_payment.bill_request",4"status": "success",5"customer": {6"id": "rzp_cust_123",7"name": "Gaurav Kumar",8"mobile": "919000090000",9"email": "gaurav.kumar@example.com"10},11"biller_id": "biller_001",12"gateway_biller_id": "TPOW00000MUM01",13"created_at": 1609459200,14"account_holder": {15"AccountHolderName": "Gaurav Kumar",16"<KEY>": "<VALUE>"17},18"bills": [],19"data": {20"email": "gaurav.kumar@example.com",21"KEY2": "VALUE2",22"KEY3": "VALUE3"23},24"error_code": "BAD_REQUEST_ERROR",25"error_description": "No bill is currently available for this customer account. The customer may have no outstanding dues or the bill for this cycle has not yet been generated.",26"error_source": "biller",27"error_step": "bill_request",28"error_reason": "no_outstanding_bill"29}