Get Payment Status API

You can use the Get Payment Status API to manually request the status of a bill payment transaction. Sometime the response of a Bill Payment API can be interrupted due to network failures. To handle such situations you can programmatically use this API to make a manual request.

Environment

Test Environmenthttps://bbps-sb.payu.in .
Production EnvironmentContact your Account Manager to get access to the production environment

๐Ÿ“˜

Note:

Send the scope of the Get Token API as read_transactions to obtain the access_token for this request. For more information, refer to Get Token API - BBPS.

Sample request
curl --location -g --request GET 'https://<hostName>/<host name>/v2/nbc/status/billpayment?refId={refId} ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' 
Response parameters
Field NameDescription
codeThis field contains the global response code and can be any of the following:

- 0: If web service call failed
- 1: if web service call succeeded
statusThe status of the API command and can be any of the following:

- SUCCESS
- FAILURE
payloadThis parameter contains the bill fetch transaction data. For more information, refer to the payload table.

payload

FieldDescritpion
refIdThis field contains the reference ID for the queried payment request.
txnStatusThis field contains the status related to requested refId. It will contain status as inโ€ฏthe Transaction Status Code table. For more information, refer to Transaction Status Code.
requestTimeStampThis field contains the actual payment requested date time stamp of payment request.
paidAmountThis field contains the payment requested amount
billerIdThis field contains the payment requested biller ID.
additionalParamsThis field contains the payment related additional params like payment txnRefId.
planResponseThis field contains the activated plan information lists returned by Biller. This field is conditional and BOU will pass if billerResponseType for respective biller is SELECTIVE type
Sample response

Success scenario

{
   "code":200,
   "status":"SUCCESS",
   "payload":{
      "refId":"<refId>",
      "txnStatus":"PAYMENT_SUCCESS",
      "requestTimeStamp":"<Requested Time stamp>",
      "paidAmount":"<Amount Paid>",
      "billerId":"<billerId>",
      "additionalParams":{
         "txnReferenceId":"<txnRefId>",
         "billerReferenceNumber":"<billerReferenceNumber>",
         "key1":"value2",
         "key2":"value2"
      },
      "planResponse":[
         {
            "planType":"ACTIVATED",
            "key1":"value1",
            "key2":"value2",
            "key3":"value3",
            "key4":"value4",
            "key5":"value5"
         }
      ]
   }
}

Failure scenario

  • When the PayU Transaction ID does not exist:
{
   "code":200,
   "status":"SUCCESS",
   "payload":{
      "refId":"<refId>",
      "txnStatus":"RECORD_NOT_FOUND",
      "requestTimeStamp":"<Requested Time stamp>",
      "paidAmount":0,
      "billerId":"",
      "additionalParams":{
         "txnReferenceId":""
      }
   }
}
  • When Payment transaction failed at billerโ€™s end and failure status captured at PayUโ€™s end:
{
   "code":200,
   "status":"SUCCESS",
   "payload":{
      "refId":"<refId>",
      "txnStatus":"PAYMENT_FAILURE",
      "requestTimeStamp":"<Requested Time stamp>",
      "paidAmount":"<Amount Paid>",
      "billerId":"<BillerId>",
      "additionalParams":{
         "txnReferenceId":"<txnRefId>"
      }
   }
}
  • When Payment transaction is not captured at PayUโ€™s end and PayU is also waiting for the actual status of the transaction:
{
   "code":200,
   "status":"SUCCESS",
   "payload":{
      "refId":"<refId>",
      "txnStatus":"PAYMENT_PENDING",
      "requestTimeStamp":"<Requested Time stamp>",
      "paidAmount":"<amount paid>",
      "billerId":"<billerId>",
      "additionalParams":{
         "txnReferenceId":"<txnRefId>"
      }
   }
}

Request parameters

Language
Credentials
Bearer
Click Try It! to start a request and see the response here!