Docs

Mobile & DTH Recharge API

Recharge prepaid mobile and DTH for all operators, and pay postpaid bills for all providers in India.
BODY PARAMS

RAW_BODY
json

HEADERS

📘
Request headers

Accept : application/json
Content-Type: application/json

Request Parameters
Send these parameters in the request body:

Parameter Type Position # Description
token string RAW_BODY Required Your API token from the ClubApi dashboard. Send it with every API request and keep it private.
urid string RAW_BODY Required Your unique reference ID for this transaction, used to match it with our records. It must be unique; the same URID can be reused only after 1 day. Maximum 20 characters.
operatorId string RAW_BODY Required Operator ID. Get the list of operators from the Utility API section.
mobile string RAW_BODY Required Mobile number or DTH customer ID, depending on the transaction type.
amount string RAW_BODY Required Recharge amount, for example 10 or 20.
cbId string RAW_BODY Optional Callback ID you have added in the dashboard.
bbpsId string RAW_BODY Optional BBPS ID of the operator.
customerMobile string RAW_BODY Optional Customer's 10-digit mobile number.
opvalue1 string RAW_BODY Optional Optional value 1.
opvalue2 string RAW_BODY Optional Optional value 2.
opvalue3 string RAW_BODY Optional Optional value 3.


Response
These fields are returned in the response:

Parameter Type Description
orderId string Our order ID for your URID. Save it to track the transaction status.
status string Transaction status: SUCCESS, PENDING or FAILED. If no status is received (for example, because of a timeout between your server and ours), save the transaction as PENDING and confirm it later with the Transaction Status API.
mobile string The mobile number you sent in the request.
amount string Transaction amount.
transId string Operator transaction ID.
resCode string Internal response code used by our support team. You do not need to save it.
p2pBuyerBal string Your P2P buyer balance after this transaction. Save it only when the value is greater than 0.
p2aBuyerBal string Your P2A buyer balance after this transaction. Save it only when the value is greater than 0.
creditUsed string Amount debited from your account.
resText string Error message, returned when the request fails.

              {
                "data": {
                  "orderId": "1210708",
                  "status": "PENDING",
                  "mobile": "9000000000",
                  "amount": "100",
                  "transId": "",
                  "resCode": "201",
                  "p2pBuyerBal": "100.23",
                  "p2aBuyerBal": "98462.0000",
                  "creditUsed": "98.0000",
                  "resText": ""
                 
                  }
                }

              

                curl 'https://api.clubapi.in/transaction.php' \
                  --max-time 10 \

                -H 'accept: application/json' \
                -H 'content-type: application/json' \
                --data-raw '{"token":"xxxxxxx","operatorId":"1","amount":"100.00","mobile":"9000000000","urid":"5546523"}' \
              
                
                  <?php
                  $url = "https://api.clubapi.in/transaction.php";

                  $curl = curl_init($url);
                  curl_setopt($curl, CURLOPT_URL, $url);
                  curl_setopt($curl, CURLOPT_POST, true);
                  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
                  curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); // wait max 10 seconds to connect
                  curl_setopt($curl, CURLOPT_TIMEOUT, 10); // wait max 10 seconds for response

                  $headers = array(
                  "accept: application/json",
                  "content-type: application/json",
                  );
                  curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);

                  $data = '{"token":"xxxxxxxxxx","operatorId":"1","amount":"100.00","mobile":"9000000000","urid":"60c60b5d0b687"}';

                  curl_setopt($curl, CURLOPT_POSTFIELDS, $data);

                  //for debug only!
                  curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
                  curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

                  $resp = curl_exec($curl);
                  $info = curl_getinfo($curl);
                  
                  curl_close($curl);
                  
                  
                  ?>
                
              

                URL url = new URL("https://api.clubapi.in/transaction.php");
                HttpURLConnection http = (HttpURLConnection)url.openConnection();
                http.setRequestMethod("POST");
                http.setDoOutput(true);
                http.setConnectTimeout(10000); // 10 seconds
                http.setReadTimeout(10000);    // 10 seconds
                http.setRequestProperty("accept", "application/json");
                http.setRequestProperty("content-type", "application/json");

                String data = "{\"token\":\"xxxxxxx\",\"operatorId\":\"1\",\"amount\":\"100.00\",\"mobile\":\"9000000000\",\"urid\":\"5546523\"}";

                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://sandbox.clubapi.in/transaction.php";

                var httpRequest = (HttpWebRequest)WebRequest.Create(url);
                httpRequest.Method = "POST";
                httpRequest.Timeout = 10000; // 10 seconds

                httpRequest.Headers["accept"] = "application/json";
                httpRequest.Headers["content-type"] = "application/json";

                var data = "{\"token\":\"xxxxxxx\",\"operatorId\":\"1\",\"amount\":\"100.00\",\"mobile\":\"9000000000\",\"urid\":\"5546523\"}";

                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);