API Test Keys
Fetch Bill Payment
GET/v1/bill_payments/payments/:idClick to copy
Retrieve the real-time status of a bill payment here. Since payments are processed asynchronously, poll this endpoint until the status reaches a terminal state of success or failed.
Polling Recommendation
Poll at intervals of 3ā5 seconds. Most bill payments resolve within 30ā60 seconds, but certain billers have extended processing windows. A pending status means NPCI has acknowledged the request but the biller has not confirmed. Continue polling.
Do Not Retry on Pending
Do not initiate a fresh Create a Bill Payment when the status is pending. The X-Bill-Payments-Idempotency header on the original request protects against duplicates only when the same key is replayed with an identical body. Poll this endpoint until the status reaches success or failed instead.
Payment State Machine
processing- Bill payment request created and sent to NPCI. Continue polling.pending- NPCI has acknowledged the request but the biller has not confirmed. Continue polling. Do not retry.success- NPCI confirmed the payment was accepted by the biller. Capture the PG payment if not already captured.failed- Payment was rejected by NPCI or the biller. Initiate a refund on the PG payment if money was collected.
Is this page helpful?
Curl
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X GET https://api.razorpay.com/v1/bill_payments/payments/bill_pay_xxxx
status: success
status: pending
status: failed
Failure
1{2"id": "bill_pay_xxxx",3"entity": "bill_payment.payment",4"status": "success",5"gateway": "bbps",6"gateway_transaction_id": "bbps_txn_id",7"biller_id": "biller_001",8"gateway_biller_id": "TPOW00000MUM01",9"biller_transaction_id": "AB123456",10"direct_pay": false,11"bill_pay_amount": 1015,12"currency": "INR",13"fees": {14"app_convenience_fee": 10,15"biller_convenience_fee": 516},17"customer": {18"id": "rzp_cust_123",19"name": "Gaurav Kumar",20"mobile": "919000090000",21"email": "gaurav.kumar@example.com"22},23"payment": [24{25"id": "pay_MbJ5AvwNpAkfLA",26"provider": "razorpay",27"amount": 600,28"currency": "INR",29"method": "card"30},31{32"id": "pay_MbJ5AvwNpAkfLB",33"provider": "razorpay",34"amount": 430,35"currency": "INR",36"method": "upi"37}38],39"account_holder": {40"account_number": "XXXXXXX",41"KEY": "VALUE",42"KEY2": "VALUE2"43},44"bills": [45{46"bill_number": "820356722187",47"amount": 1015,48"currency": "INR",49"bill_date": 1609459200,50"due_date": 1609459200,51"bill_period": "monthly"52}53],54"data": {55"mobile_number": "Text",56"KEY": "VALUE"57},58"error_code": null,59"error_description": null,60"error_source": null,61"error_step": null,62"error_reason": null63}
Path Parameters
id *
stringUnique identifier of the bill payment returned by
. For example,bill_pay_xxxx.Response Parameters
idstringRazorpay's unique bill payment transaction id.
entitystring Indicates the type of entity. Always bill_payment.payment.
statusstringCurrent status of the bill payment. Possible values:
processing- Request created and sent to NPCI. Continue polling.pending- NPCI acknowledged the request but the biller has not confirmed. Continue polling. Do not retry.success- NPCI confirmed the payment was accepted by the biller.failed- Payment was rejected by NPCI or the biller. See fields for details.
gatewaystring Payment gateway. Always bbps.
gateway_transaction_idstringBBPS/NPCI transaction reference id. Fixed length of 12 or 20 characters. Store this for reconciliation, settlement tracking and dispute resolution.
biller_idstringRazorpay biller entity id.
gateway_biller_idstringNPCI's biller id.
biller_transaction_idstring Biller's internal transaction/receipt reference number. Present only when status is success. Share this with the customer as their BBPS payment reference.
direct_payboolean true if the payment was made without a prior bill retrieval; false if a bill_request_id was provided. Derived by Razorpay. Not sent in the request.
bill_pay_amountintegerTotal bill amount paid in paise, excluding fees.
currencystring Currency. Always INR.
feesobjectFee breakdown.
fees.app_convenience_feeintegerApp/platform convenience fee charged to the customer, in paise.
fees.biller_convenience_feeintegerCustomer Convenience Fee (CCF) charged by the biller, in paise.
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 *
string Customer's mobile number with country code. For example, 919000090000.
customer.email stringDynamic key-value pair holding the customer email. Echoed back exactly as sent in the request. Not validated by Razorpay.
paymentarrayArray of payment method details collected via the Razorpay PG.
payment[].idstringRazorpay payment entity id.
payment[].providerstring Payment provider. Always razorpay.
payment[].amountintegerAmount paid via the selected method, in paise.
payment[].currencystring Payment currency. Always INR.
payment[].methodstring Payment method. Values: card, upi, netbanking, wallet.
account_holderobject Bill account holder details 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.
billsarrayArray of bills paid in this transaction.
bills[].bill_numberstringBiller's bill reference/invoice number. Mandatory in multi-bill scenarios.
bills[].amountintegerIndividual bill amount in paise.
bills[].currencystring Bill currency. Always INR.
bills[].bill_dateintegerBill generation date as a UNIX timestamp.
bills[].due_dateintegerBill payment due date as a UNIX timestamp.
bills[].bill_periodstring Billing frequency. Values: onetime, daily, monthly, quarterly, halfyearly, yearly.
dataobjectAdditional biller-specific metadata. Dynamic key-value pairs that vary by biller.
error_codestring Error code. Present only when status is failed. Values: BAD_REQUEST_ERROR, GATEWAY_ERROR, SERVER_ERROR.
error_descriptionstringHuman-readable error description.
error_sourcestring Where the error originated. Values: customer, biller, gateway, razorpay.
error_stepstring Step at which the error occurred. For example, bill_payment, validation.
error_reasonstringProgrammatic error reason code. Use this for error-specific handling logic.
error_metadataobjectAdditional context such as payment ids and gateway error codes.
created_atintegerUNIX timestamp when the bill payment was created.
Errors
The bill payment id is invalid or not found.
Error Status: 400
No bill payment 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 Payment
GET/v1/bill_payments/payments/:idClick to copy
Retrieve the real-time status of a bill payment here. Since payments are processed asynchronously, poll this endpoint until the status reaches a terminal state of success or failed.
Polling Recommendation
Poll at intervals of 3ā5 seconds. Most bill payments resolve within 30ā60 seconds, but certain billers have extended processing windows. A pending status means NPCI has acknowledged the request but the biller has not confirmed. Continue polling.
Do Not Retry on Pending
Do not initiate a fresh Create a Bill Payment when the status is pending. The X-Bill-Payments-Idempotency header on the original request protects against duplicates only when the same key is replayed with an identical body. Poll this endpoint until the status reaches success or failed instead.
Payment State Machine
processing- Bill payment request created and sent to NPCI. Continue polling.pending- NPCI has acknowledged the request but the biller has not confirmed. Continue polling. Do not retry.success- NPCI confirmed the payment was accepted by the biller. Capture the PG payment if not already captured.failed- Payment was rejected by NPCI or the biller. Initiate a refund on the PG payment if money was collected.
Is this page helpful?
Path Parameters
id *
stringUnique identifier of the bill payment returned by
. For example,bill_pay_xxxx.Response Parameters
idstringRazorpay's unique bill payment transaction id.
entitystring Indicates the type of entity. Always bill_payment.payment.
statusstringCurrent status of the bill payment. Possible values:
processing- Request created and sent to NPCI. Continue polling.pending- NPCI acknowledged the request but the biller has not confirmed. Continue polling. Do not retry.success- NPCI confirmed the payment was accepted by the biller.failed- Payment was rejected by NPCI or the biller. See fields for details.
gatewaystring Payment gateway. Always bbps.
gateway_transaction_idstringBBPS/NPCI transaction reference id. Fixed length of 12 or 20 characters. Store this for reconciliation, settlement tracking and dispute resolution.
biller_idstringRazorpay biller entity id.
gateway_biller_idstringNPCI's biller id.
biller_transaction_idstring Biller's internal transaction/receipt reference number. Present only when status is success. Share this with the customer as their BBPS payment reference.
direct_payboolean true if the payment was made without a prior bill retrieval; false if a bill_request_id was provided. Derived by Razorpay. Not sent in the request.
bill_pay_amountintegerTotal bill amount paid in paise, excluding fees.
currencystring Currency. Always INR.
feesobjectFee breakdown.
fees.app_convenience_feeintegerApp/platform convenience fee charged to the customer, in paise.
fees.biller_convenience_feeintegerCustomer Convenience Fee (CCF) charged by the biller, in paise.
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 *
string Customer's mobile number with country code. For example, 919000090000.
customer.email stringDynamic key-value pair holding the customer email. Echoed back exactly as sent in the request. Not validated by Razorpay.
paymentarrayArray of payment method details collected via the Razorpay PG.
payment[].idstringRazorpay payment entity id.
payment[].providerstring Payment provider. Always razorpay.
payment[].amountintegerAmount paid via the selected method, in paise.
payment[].currencystring Payment currency. Always INR.
payment[].methodstring Payment method. Values: card, upi, netbanking, wallet.
account_holderobject Bill account holder details 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.
billsarrayArray of bills paid in this transaction.
bills[].bill_numberstringBiller's bill reference/invoice number. Mandatory in multi-bill scenarios.
bills[].amountintegerIndividual bill amount in paise.
bills[].currencystring Bill currency. Always INR.
bills[].bill_dateintegerBill generation date as a UNIX timestamp.
bills[].due_dateintegerBill payment due date as a UNIX timestamp.
bills[].bill_periodstring Billing frequency. Values: onetime, daily, monthly, quarterly, halfyearly, yearly.
dataobjectAdditional biller-specific metadata. Dynamic key-value pairs that vary by biller.
error_codestring Error code. Present only when status is failed. Values: BAD_REQUEST_ERROR, GATEWAY_ERROR, SERVER_ERROR.
error_descriptionstringHuman-readable error description.
error_sourcestring Where the error originated. Values: customer, biller, gateway, razorpay.
error_stepstring Step at which the error occurred. For example, bill_payment, validation.
error_reasonstringProgrammatic error reason code. Use this for error-specific handling logic.
error_metadataobjectAdditional context such as payment ids and gateway error codes.
created_atintegerUNIX timestamp when the bill payment was created.
Errors
The bill payment id is invalid or not found.
Error Status: 400
No bill payment 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/payments/bill_pay_xxxx
status: success
status: pending
status: failed
Failure
1{2"id": "bill_pay_xxxx",3"entity": "bill_payment.payment",4"status": "success",5"gateway": "bbps",6"gateway_transaction_id": "bbps_txn_id",7"biller_id": "biller_001",8"gateway_biller_id": "TPOW00000MUM01",9"biller_transaction_id": "AB123456",10"direct_pay": false,11"bill_pay_amount": 1015,12"currency": "INR",13"fees": {14"app_convenience_fee": 10,15"biller_convenience_fee": 516},17"customer": {18"id": "rzp_cust_123",19"name": "Gaurav Kumar",20"mobile": "919000090000",21"email": "gaurav.kumar@example.com"22},23"payment": [24{25"id": "pay_MbJ5AvwNpAkfLA",26"provider": "razorpay",27"amount": 600,28"currency": "INR",29"method": "card"30},31{32"id": "pay_MbJ5AvwNpAkfLB",33"provider": "razorpay",34"amount": 430,35"currency": "INR",36"method": "upi"37}38],39"account_holder": {40"account_number": "XXXXXXX",41"KEY": "VALUE",42"KEY2": "VALUE2"43},44"bills": [45{46"bill_number": "820356722187",47"amount": 1015,48"currency": "INR",49"bill_date": 1609459200,50"due_date": 1609459200,51"bill_period": "monthly"52}53],54"data": {55"mobile_number": "Text",56"KEY": "VALUE"57},58"error_code": null,59"error_description": null,60"error_source": null,61"error_step": null,62"error_reason": null63}