The Get Prepaid Recharge Plans API for getting prepaid plans. It will provide all the available prepaid recharge plans available for a given agent ID, circle ID and operator ID.
Note:This API requires an access token using the Get Token API with the scope as read_operator_circle. For more information, refer to Get Token API - BBPS.
Sample request
curl --location --request GET 'https://payu-nbc/v2/nbc/getOperatorAndCircleInfo?agentId=`{agentId}`&mobileNumber=`{mobileNumber}`' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>'Response parameters
Field Name  | Description  | 
|---|---|
code  | The global response code and can be any of the following: 
  | 
status  | The status of the API command and can be any of the following: 
  | 
payload  | It 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:
Field  | Description  | 
|---|---|
Success Scenario  | |
circlesInfo  | This field contains the following set of values for each circle in an JSON array format: 
  | 
Failure Scenario  | |
refId  | For failure scenarios, this parameter contains the reference ID.  | 
type  | This field contains the value as operator_circle_fetch for this API.  | 
error  | For failure scenarios, this field contains the error message in an array format.  | 
message  | This field contains the message type as operator_fetch_request_failed for this API.  | 
additionalParams  | For 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_1>",
            "validity":"<validity_1>",
            "talkTime":"<talk_time_1>",
            "packageDescription":"<description_1>",
            "planType":"<plan_type>"
         },
         {
            "planName":"<plan_name_1>",
            "price":"<plan_price_1>",
            "validity":"<validity_1>",
            "talkTime":"<talk_time_1>",
            "packageDescription":"<description_1>",
            "planType":"<plan_type>"
         }
      ]
   }
}Failure scenario
{
   "code":600,
   "status":"FAILURE",
   "payload":{
      "errors":[
         {
            "reason":"<error Message>",
            "errorCode":"<Error Code>"
         }
      ],
      "refId":null,
      "type":"mobile_plans",
      "message":"mobile_plans_fetch_failed",
      "additionalParams":{
         "Key": "value1", 
         "Key2": "value2", 
         "Key3": "value3"
       }
    }
}