post https://pay2new.in/apis/offer/v1/dthInfo
DTH Customer Info provides the customer information for your queried DTH number. The API provides information like the customer name, the client plan, strategy amount, customer balance and so on.
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 |
---|---|---|---|
number | String | M | DTH Number |
product_code | String | M | Product Code |
request_id | String | M | Your Unique Transaction/Request Id (max lenth 20) |
Sample Request
curl -X POST \
https://pay2new.in/apis/offer/v1/roffer \
--header 'Accept: application/json' \
--header 'content-type: application/json' \
--header 'secret: qwertyuQWERTY12345asdf' \
--data '
{ "number" : "123456789",
"request_id" : "P2N54544444545",
"product_code" : "21"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://pay2new.in/apis/offer/v1/roffer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{ \"number\" : \"123456789\", \"request_id\" : \"P2N54544444545\", \"product_code\" : \"21|" }",
CURLOPT_HTTPHEADER => array(
"Accept: application/json",
"content-type: application/json",
"secret: qwertyuQWERTY12345asdf"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Response Parameters
Name | Type | Description |
---|---|---|
status | Integer | Transaction Status |
message | String | Message from API |
data | Array | Response Data (If Present) |
rs | String | Plan Amount |
desc | String | Plan details |
Sample Response
{
"status": 1,
"message": "Transaction Successful",
"data": {
"customer_name": "RADHAMMA",
"balance": "0",
"plan": "HD Telugu Silver Package Basic Subscription Monthly Renewal",
"monthly": "0",
"next_recharge_date": "01-Apr-2022",
"last_recharge_amount": "50.00",
"last_recharge_date": "8-Nov-2021"
},
"order_id": "P2N5452534158DFOLASDF"
}