Docs

BBPS Fetch Bill API

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.
mobile string RAW_BODY Required Customer details required by the operator.
bbpsId string RAW_BODY Required BBPS ID of the operator.
customerMobile string RAW_BODY Required Customer's 10-digit mobile number.
transType string RAW_BODY Required billFetch
urid Alphanumeric RAW_BODY Required Your reference ID. Maximum 20 characters.
opvalue1 string RAW_BODY Required Optional value required by some operators.
opvalue2 string RAW_BODY Required Optional value required by some operators.
opvalue3 string RAW_BODY Required Optional value required by some operators.
opvalue4 string RAW_BODY Required Optional value required by some operators.
opvalue5 string RAW_BODY Required Optional value required by some operators.


Response
These fields are returned in the response:

Parameter Type Description
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.
exactness string
  1. EXACT — the user cannot change the amount
  2. EXACT_DOWN — the user can change the amount but cannot pay more than the bill amount
  3. EXACT_UP — the user can change the amount but cannot pay less than the bill amount
  4. ANY — the user can pay any amount
  5. ADHOC — the biller does not send an amount
  6. BOTH — same as ADHOC, but the biller may send an amount
data object Bill details from the biller.

{
  "orderId": "2406091956xxxxx",
  "status": "SUCCESS",
  "billData": {
    "billFetchStatus": "SUCCESS",
    "billAmount": "1298.00",
    "billName": "Mithun kumar patra",
    "billNumber": "NA",
    "dueDate": "2024-06-09",
    "billPeriod": "QUARTERLY",
    "billerBalance": "",
    "billRemark": "",
    "bbpsName": "Wish Net Pvt Ltd",
    "exactness": "EXACT",
    "resText": ""
  },
  "resText": " -",
  "pointUsed": "",
  "resCode": ""
}


              

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

                -H 'accept: application/json' \
                -H 'content-type: application/json' \
                --data-raw '{"token":"xxxxx","mobile":"xxxxxx","bbpsId":"WISH00000xxxxx","opvalue1":"","opvalue2":"","opvalue3":"","opvalue4":"","customerMobile":"xxxxxx","outletMobile":"xxxxx","transType":"billFetch","urid":"6665bb79b2ee8"}' \
              
                
                  <?php
                  $url = "https://api.clubapi.in/utility/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":"xxxxx","mobile":"xxxxxx","bbpsId":"WISH00000xxxxx","opvalue1":"","opvalue2":"","opvalue3":"","opvalue4":"","customerMobile":"xxxxxx","outletMobile":"xxxxx","transType":"billFetch","urid":"6665bb79b2ee8"}';

                  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);
                  curl_close($curl);
                  ?>
                
              

                URL url = new URL("https://api.clubapi.in/utility/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\":\"xxxxx\",\"mobile\":\"xxxxxx\",\"bbpsId\":\"WISH00000xxxxx\",\"opvalue1\":\"\",\"opvalue2\":\"\",\"opvalue3\":\"\",\"opvalue4\":\"\",\"customerMobile\":\"xxxxxx\",\"outletMobile\":\"xxxxx\",\"transType\":\"billFetch\",\"urid\":\"6665bb79b2ee8\"}" ;
                
                

                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://api.clubapi.in/utility/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\":\"xxxxx\",\"mobile\":\"xxxxxx\",\"bbpsId\":\"WISH00000xxxxx\",\"opvalue1\":\"\",\"opvalue2\":\"\",\"opvalue3\":\"\",\"opvalue4\":\"\",\"customerMobile\":\"xxxxxx\",\"outletMobile\":\"xxxxx\",\"transType\":\"billFetch\",\"urid\":\"6665bb79b2ee8\"}" ;

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