Get Custom Recharge Plans API

The Get Custom Recharge PlansAPI for getting available prepaid plans for a mobile number.

Environment

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

📘

Note:

This API requires an access token using the Get Token API with the scope as read_plans. For more information, refer to Get Token API.

Sample request
curl --location --request GET 'https://payu-nbc/v2/nbc/getCustomizedRechargePlans?agentId={agentId}&circleId={circleId}&mobileNo={mobileNumber}&operatorId={operatorId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>'
Response parameters
Field NameDescription
codeThe 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
payloadIt will contain a list of biller categories. For more information, refer to the payload table.

payload

The payload parameter contains the values in a JSON format are described in the following table:

FieldDescription
Success Scenario
circlesInfoThis field contains the following set of values for each circle in an JSON array format:

- planName: This field contains the plan name.
- price: This field contains the plan price.
- validity: This field contains the validity period of the plan.
- talkTime: This field contains the talk time for the plan.
- validityDescription: This field contains the validity description.
- packageDescription: This field contains the package description.
- planType: This field contains the plan type.
Failure Scenario
refIdFor failure scenarios, this parameter contains the reference ID.
typeThis field contains the value as mobile_plans for this API.
errorFor failure scenarios, this field contains the error message in an array format.
messageThis field contains the message type as mobile_plans_fetch_failed. for this API.
additionalParamsFor failure scenarios, this field contains the additional fields related to billers in an array format. If there is no any additional info, it will be null. 
Sample response

Success scenario

{
   "code":200,
   "status":"SUCCESS",
   "payload":{
      "operatorName":"OPERATOR_1",
      "operatorId":"OPERATOR_ID_1",
      "plansInfo":[
         {
            "planName":"<plan_name_1>",
            "price":"<plan_price>",
            "validity":"<validity>",
            "validityDescription":"<description>",
            "talkTime":"<talk_time>",
            "packageDescription":"<description>",
            "planType":"<plan_type_1>"
         },
         {
            "planName":"<plan_name_2>",
            "price":"<plan_price>",
            "validity":"<validity>",
            "validityDescription":"<description>",
            "talkTime":"<talk_time>",
            "packageDescription":"<description>",
            "planType":"<plan_type_2>"
         }
      ]
   }
}

Failure scenario

"code":600,
"status":"FAILURE",
"payload":{
   "errors":[
      {
         "reason":"<error Message>",
         "errorCode":"<Error Code>"
      }
   ],
   "refId":"<refId>",
   "type":"mobile_plans",
   "message":"mobile_plans_fetch_failed",
   "additionalParams":{
      "Key: "value1",
"Key2": "value2",
"Key3": "value3"\"\"
}
}
}"

Request parameters

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