DTH Recharge API

We Provide Online Recharge API Solution for DTH Operators like SunDirect, Airtel DigitalTv, DishTv, VideoconD2H & Tatasky


To use this API, you need an API key.
Please login to your account and navigate to dashboard > API configuration

Learn how to authenticate the APIs.

Initiate New Transaction

Use the below endpoint to initiate a new transaction (supports all indian DTH providers)

/recharge/dth/initiate-transaction
curl -X POST https://ippocloud.com/api/v1
/recharge/dth/initiate-transaction
-H "Authorization: Basic bGl2ZV82MzAzZT...."
-H "Content-Type: application/json"
-d "{\"number\":\"3672XXXXXX\", \"amount\":\"710\",
 \"operator_code\":\"DA\", \"reference_id\":\"MkD67vha56iNAf6\"}"
$url = "https://ippocloud.com/api/v1
/recharge/dth/initiate-transaction";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$headers = array(
   "Authorization: Basic bGl2ZV82MzAzZT....",
   "Content-Type: application/json",
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$data = '{"number":"3672XXXXXX", "amount":"710",
"operator_code":"DA", "reference_id":"MkD67vha56iNAf6"}';
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
$resp = curl_exec($curl);
curl_close($curl);
var_dump($resp);
var url = "https://ippocloud.com/api/v1
/recharge/dth/initiate-transaction";
var xhr = new XMLHttpRequest();
xhr.open("POST", url);
xhr.setRequestHeader("Authorization", "Basic bGl2ZV82MzAzZT....");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};
var data = '{"number":"3672XXXXXX", "amount":"710",
"operator_code":"DA", "reference_id":"MkD67vha56iNAf6"}';
xhr.send(data);
import requests
from requests.structures import CaseInsensitiveDict
url = "https://ippocloud.com/api/v1
/recharge/dth/initiate-transaction"
headers = CaseInsensitiveDict()
headers["Authorization"] = "Basic bGl2ZV82MzAzZT...."
headers["Content-Type"] = "application/json"
data = '{"number":"3672XXXXXX", "amount":"710",
"operator_code":"DA", "reference_id":"MkD67vha56iNAf6"}'
resp = requests.post(url, headers=headers, data=data)
print(resp.status_code)
URL url = new URL("https://ippocloud.com/api/v1
/recharge/dth/initiate-transaction");
HttpURLConnection http = (HttpURLConnection)url.openConnection();
http.setRequestMethod("POST");
http.setDoOutput(true);
http.setRequestProperty("Authorization", "Basic bGl2ZV82MzAzZT....");
http.setRequestProperty("Content-Type", "application/json");
String data = "{\"number\":\"3672XXXXXX\", \"amount\":\"710\",
\"operator_code\":\"DA\", \"reference_id\":\"MkD67vha56iNAf6\"}";
byte[] out = data.getBytes(StandardCharsets.UTF_8);
OutputStream stream = http.getOutputStream();
stream.write(out);
System.out.println(http.getResponseCode() + " " + http.getResponseMessage());
http.disconnect();
var url = "https://ippocloud.com/api/v1
/recharge/dth/initiate-transaction";
var httpRequest = (HttpWebRequest)WebRequest.Create(url);
httpRequest.Method = "POST";
httpRequest.Headers["Authorization"] = "Basic bGl2ZV82MzAzZT....";
httpRequest.ContentType = "application/json";
var data = "{\"number\":\"3672XXXXXX\", \"amount\":\"710\",
\"operator_code\":\"DA\", \"reference_id\":\"MkD67vha56iNAf6\"}";
using (var streamWriter = new StreamWriter(httpRequest.GetRequestStream()))
{
   streamWriter.Write(data);
}
var httpResponse = (HttpWebResponse)httpRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
   var result = streamReader.ReadToEnd();
}
Console.WriteLine(httpResponse.StatusCode);
{
    "data": {
        "entity": "dth_recharge",
        "transaction_id": 6393574,
        "operator": "Airtel Digital Tv",
        "type": "DTH",
        "number": "3672XXXXXX",
        "bill_amount": "₹710.00",
        "discount": "₹24.85",
        "paid": "₹685.15",
        "transaction_status": "SUCCESS",
        "reference_id": "MkD67vha56iNAf6",
        "datetime": "2022-10-17 00:11:53"
    }
}

Request parameters

number

mandatory

string Account Number/ Viewing Card Number/ Subscriber Number/ Customer ID/ Registered Telephone Number. For example, 3672XXXXXX

amount

mandatory

integer Amount to recharge. you can find appropriate plan amount from the operator/provider

operator_code

mandatory

string The unique two-digit code of the operator. For example, DA

reference_id

optional

string a unique identifier assigned for the transaction by client.

Response Parameters

data

object contains all the details such entity, transaction_id, operator, type, number

entity

string something that exists separately from something else and has its own identity

transaction_id

integer Unique transaction ID assigned by system for every transaction

operator

string Operator name

type

string Transaction type DTH

number

string Account Number/ Viewing Card Number/ Subscriber Number/ Customer ID/ Registered Telephone Number. For example 3672XXXXXX

bill_amount

string Recharged amount

discount

string Discount is an amount that you've received for making this transaction

paid

string Net amount that you've paid for this transaction after subtracted discount amount with bill amount

transaction_status

string Returns the transaction status

  • SUCCESS

  • PENDING

  • FAILED

reference_id

string a unique identifier assigned for the transaction by client

datetime

string current datetime of the transaction

Operator Codes

Operator code is a unique number assigned to every telecommunications operator

Operator Name

Operator Code

Range

Sun Direct

SD

₹10 - 10000

Airtel Digital Tv

AD

₹50 - 10000

Videocon

VC

₹50 - 20000

Tata Sky

TS

₹10 - 25000

Dish Tv

DT

₹10 - 20000

Big Tv

BT

₹20 - 25000

Webhook

Webhooks let you build or set up integrations that subscribe to certain events. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL

To configure WebhooK URL, Please login to your account and navigate to dashboard > API configuration

Whenever the transaction status changed from PENDING to SUCCESS or FAILED, we will send an HTTP POST payload in JSON to the webhook's configured URL

Sample webhook JSON payload

Webhooks deliver the responses to your configured URL in JSON format. here's what a complete payload looks like when it's delivered to a webhook:

{
    "data": {
        "entity": "webhook",
        "webhook_event": "event.dth_recharge",
        "webhook_password": "UzmyhfRVBAL0RAG",
        "payload": {
            "entity": "dth_recharge",
            "transaction_id": 6393574,
            "operator": "Airtel Digital Tv",
            "type": "DTH",
            "number": "3672XXXXXX",
            "bill_amount": "₹710.00",
            "discount": "₹24.85",
            "paid": "₹685.15",
            "transaction_status": "SUCCESS",
            "reference_id": "MkD67vha56iNAf6",
            "datetime": "2022-10-17 00:11:53"
        }
    }
}
Do you need help to implement this API? contact us