DTH Info Using Mobile Number

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

ParametersTypeMandatory (M) , Optional(O)Description
numberStringMDTH Number
product_codeStringMProduct Code
request_idStringMYour Unique Transaction/Request Id (max lenth 20)

Sample Request

curl -X POST \
  https://pay2new.in/apis/offer/v1/dthInfoByMobileNumber \
   --header 'Accept: application/json' \
   --header 'content-type: application/json' \
   --header 'secret: qwertyuQWERTY12345asdf' \
   --data '
   { 	
   		"number": "1234567890", 
      "product_code": 25,   
      "request_id": {{$timestamp}} 
   }'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://pay2new.in/apis/offer/v1/dthInfoByMobileNumber",
  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\" : \"1234567890\", \"request_id\" : {{timestamp}}, \"product_code\" : 25 }",
  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

NameTypeDescription
statusStringTransaction Status
messageStringMessage from API
dataArrayResponse Data (If Present)
order_idStringUnique Order Id

Sample Response

{
    "status": 1,
    "message": "Transaction Successful",
    "data": {
        "customer_name": "RADHAMMA",
        "customer_id": "1234567890",
        "balance": "0",
        "plan": "HD Telugu Silver Package Basic Subscription Monthly Renewal",
        "monthly": "0",
        "next_recharge_date": "01-Apr-2022"
    },
    "order_id": "P2N5452534158DFOLASDF"
}
Language
Click Try It! to start a request and see the response here!