DTH Customer Information

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/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

NameTypeDescription
statusIntegerTransaction Status
messageStringMessage from API
dataArrayResponse Data (If Present)
rsStringPlan Amount
descStringPlan 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"
}
Language
Click Try It! to start a request and see the response here!