Product List / Operator List

This API provides Active services Product List & Operator Code

📘

Header Request

Accept : application/json
Content-Type: application/json
secret : Unique secret key (Provided by Pay2New)

Request Parameters

ParametersTypeMandatory (M) , Optional(O)Description
service_idIntegerMService ID

Sample Request

curl --location 'https://pay2new.in/apis/v1/productList' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'secret: qwertyuQWERTY12345asdf' \
--data '{
    			"service_id": 1
        }'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://pay2new.in/apis/v1/productList',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "service_id": 1
}',
  CURLOPT_HTTPHEADER => array(
    "Accept: application/json",
    "Content-Type: application/json",
    "secret: qwertyuQWERTY12345asdf"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response Parameters

NameTypeDescription
statusintegerTransaction Status
messageStringMessage from API
dataArrayResponse Data (If Present)
product_codeStringProduct Code
product_nameStringProduct Name
service_idStringService ID

Sample Response

{
  "status": 1,
  "message": "Transaction Successful!",
  "data": [
    {
      "product_code": "1",
      "product_name": "AIRTEL",
      "service_id": "1"
    },
    {
      "product_code": "2",
      "product_name": "VI",
      "service_id": "1"
    },
    {
      "product_code": "3",
      "product_name": "JIO",
      "service_id": "1"
    },
    {
      "product_code": "4",
      "product_name": "BSNL",
      "service_id": "1"
    }
  ]
}
{"status":2,"message":"Invalid Json!"}
Language
Click Try It! to start a request and see the response here!