post https://pay2new.in/apis/v1/productList
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
Parameters | Type | Mandatory (M) , Optional(O) | Description |
---|---|---|---|
service_id | Integer | M | Service 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
Name | Type | Description |
---|---|---|
status | integer | Transaction Status |
message | String | Message from API |
data | Array | Response Data (If Present) |
product_code | String | Product Code |
product_name | String | Product Name |
service_id | String | Service 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!"}