Encryption Method

                          

//In Php

                              function encryptData($data, $apiToken) {
    
$method = 'aes-256-cbc';

$password = substr(hash('sha256', $apiToken, true), 0, 32);

// IV must be exact 16 chars (128 bit)
$iv = chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0);

$encrypted = base64_encode(openssl_encrypt($data, $method, $password, OPENSSL_RAW_DATA, $iv));
return $encrypted;

}






# In C#



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Security.Cryptography;
using System.IO;
using System.Text;

namespace Rextester
{
    public class Program
    {
        
        
        public static void Main(string[] args)
        {
            

// Create sha256 hash
SHA256 mySHA256 = SHA256Managed.Create();
byte[] key = mySHA256.ComputeHash(Encoding.ASCII.GetBytes(password));

// Create secret IV
byte[] iv = new byte[16] { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };

string encrypted = EncryptString(data, apiToken, iv);

Console.WriteLine(encrypted);
            
            
        }
        
        
        public static string EncryptString(string data, byte[] key, byte[] iv)
{
    // Instantiate a new Aes object to perform string symmetric encryption
    Aes encryptor = Aes.Create();

    encryptor.Mode = CipherMode.CBC;

    // Set key and IV
    byte[] aesKey = new byte[32];
    Array.Copy(key, 0, aesKey, 0, 32);
    encryptor.Key = aesKey;
    encryptor.IV = iv;

    // Instantiate a new MemoryStream object to contain the encrypted bytes
    MemoryStream memoryStream = new MemoryStream();

    // Instantiate a new encryptor from our Aes object
    ICryptoTransform aesEncryptor = encryptor.CreateEncryptor();

    // Instantiate a new CryptoStream object to process the data and write it to the 
    // memory stream
    CryptoStream cryptoStream = new CryptoStream(memoryStream, aesEncryptor, CryptoStreamMode.Write);

    // Convert the plainText string into a byte array
    byte[] plainBytes = Encoding.ASCII.GetBytes(plainText);

    // Encrypt the input plaintext string
    cryptoStream.Write(plainBytes, 0, plainBytes . Length);

    // Complete the encryption process
    cryptoStream.FlushFinalBlock();

    // Convert the encrypted data from a MemoryStream to a byte array
    byte[] cipherBytes = memoryStream.ToArray();

    // Close both the MemoryStream and the CryptoStream
    memoryStream.Close();
    cryptoStream.Close();

    // Convert the encrypted byte array to a base64 encoded string
    string cipherText = Convert.ToBase64String(cipherBytes, 0, cipherBytes.Length);

    // Return the encrypted data as a string
    return encryptedData;
}






        
    }
}



                              
                              
                          
                      

Recharge API

                          
                              http://api.rechapi.com/recharge.php?format=#format&token=#token&mobile=#mobile&amount=#amount&opid=#opid&urid=#urid&opvalue1=#opvalue1&opvalue2=#opvalue2&opvalue3=#opvalue3
                              
                              /*
                              // If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/recharge.php?format=#format&secure=1&userId=#userId
                              Method -> POST
                              $rechargeData="token=#token&mobile=#mobile&amount=#amount&opid=#opid&urid=#urid&opvalue1=#opvalue1&opvalue2=#opvalue2&opvalue3=#opvalue3&time=#time";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              /*
                              #format -> text/xml/json
                              #token  -> Recharge Api Token , It is available after login in rechapi account
                              #userId  -> Its your id which is available after login in account
                              #mobile -> 10 digit valid mobile number or landline number excluding std code
                              #amount -> Recharge amount
                              #op     -> Mobile operator id (Operator id given below in table)
                              #urid -> Your unique transaction id , maximum length is 15.
                              #opvalue1 -> Required in case other than mobile , dth recharge
                              #opvalue2 -> Required in case other than mobile , dth recharge
                              #time -> time value in seconds as indian time for example 1548608189
                              */

                              //Output text

                              #Orderid|#status|#mobile|#amount|#opid|#error_code|#service|#bal|#resText|#billAmount;

                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                  #Orderid
                                  #status
                                  #mobile
                                  #amount
                                  #opid
                                  #error_code
                                  #service
                                  #bal
                                  #resText
                                  #billAmount
                              

                              //Output json

                              {"data":{"orderId":"#Orderid","status":"#status","mobile":"#mobile","amount":"#amount","operatorId":"#optid","error_code":"#error_code","service":"#service","bal":"#bal","resText":"#resText","billAmount":"#billAmount"}}

                              /*
                              #Orderid -> RechApi unique recharge order id , multiple orderid supported like 1234,3434,1234 etc but supported for dispute.
                              #status  -> Recharge status (SUCCESS/PENDING/FAILED)
                              #optid -> Operator transaction id if recharge is success
                              #error_code -> error code from rechapi server
                              #service -> Operator name
                              #bal -> Api final balance
                              #resText -> error code details
                              #billAmount -> In case of electrity and gas bill payment if you had provide wroung bill amount it will show you correct bill amount.
                             
                              */
                          
                      

Recharge Status API

                          
                              http://api.rechapi.com/api_status.php?format=#format&token=#token&orderId=#orderId

Use urid=#urid instead of orderId=#orderId if you want to track from your urid value.

/*
                              // If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/api_status.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token&orderId=#orderId";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              //Output Text

                              #Orderid|#status|#mobile|#amount|#error_code|#transactionId|#bal|#resText#

                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                  
                                      #status
                                      #mobile
                                      #amount
                                      #error_code
                                      #transactionId
                                      #bal
                                      #resText
                                  
                              

                              //Output json

                              {"data":[{"orderId":"#Orderid","status":"#status","mobile":"#mobile","amount":"#amount","error_code":"#error_code","TransId":"#transactionId","service":"#service","reqTime":"#reqTime","bal":"#bal","resText":"#resText"}]}


                              /*
                              #status  -> Recharge status (SUCCESS/PENDING/FAILED/Disputed)
                              #transactionId -> Operator Transaction id
                              #reqTime -> Recharge request time

                              */

                          
                      

Recharge Dispute API

                          
                              http://api.rechapi.com/dispute.php?format=#format&token=#token&orderid=#orderid&type=#type
/*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/dispute.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token&orderid=#orderid&type=#type";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */

                              //Output text

                              #Orderid|#status|#error_code|#resText

                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                  #Orderid
                                  #status
                                  #error_code
                                  #resText
                              

                              //Output json

                              {"data":{"orderId":"#Orderid","status":"#status","error_code":"#error_code","resText":"#resText"}}

                              /*
                              #status -> FAILED/SUCCESS
                              #type -> 1/2 , 1 for dispute and reproccess , 2 for dispute and refund
                              */
                          
                      

Recharge Balance API

                          
                              http://api.rechapi.com/bal.php?format=#format&token=#token


/*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/dispute.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              
                              //Output text

                              #username|#balance|#error_code|#resText

                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                  #username
                                  #balance
                                  #error_code
                                  #resText
                              

                              //Output json

                              {"data":{"user":"#username","bal":"#balance","error_code":"#error_code","resText":"#resText"}}
                          
                      

Api Recharge Sample Code

                          
                              $url="http://api.rechapi.com/recharge.php?format=xml&token=#apiKey&mobile=#mobile&amount=#amount&opid=#operatorId&urid=#yourTransactionId";
                              $request_timeout = 60; // 60 seconds timeout
                              $ch = curl_init();
                              curl_setopt($ch, CURLOPT_URL, $url);
                              curl_setopt($ch, CURLOPT_TIMEOUT, $request_timeout);
                              curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $request_timeout);
                              curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                              $output = curl_exec($ch);
                              $curl_error = curl_errno($ch);
                              $getserver= curl_getinfo($ch);
                              curl_close($ch);
                              if($getserver["http_code"]==200)
                              {

                              $xml = simplexml_load_string($output);
                              $orderId=$xml->orderId;
                              $status=$xml->status;
                              $mobile=$xml->mobile;
                              $amount=$xml->amount;
                              $operatorId=$xml->operatorId;
                              $error_code=$xml->error_code;
                              $service=$xml->service;
                              $resText=$xml->resText;
                              if($status=="FAILED")

                              {
                              #do coding for FAILED Recharge

                              }
                              elseif($status=="SUCCESS"){

                              #do coding for SUCCESS Recharge
                              }
                              else {

                              #do coding for PENDING recharge
                              }

                              }
                              elseif($curl_error=="28"){
                              #do coding for PENDING Recharge

                              }
                          
                      

Api Recharge Status Sample Code

                          

                              $url="http://api.rechapi.com/api_status.php?format=xml&token=#apiKey&orderId=#orderid";
                              $request_timeout = 60; // 60 seconds timeout
                              $ch = curl_init();
                              curl_setopt($ch, CURLOPT_URL, $url);
                              curl_setopt($ch, CURLOPT_TIMEOUT, $request_timeout);
                              curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $request_timeout);
                              curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                              $output = curl_exec($ch);
                              $curl_error = curl_errno($ch);
                              $getserver= curl_getinfo($ch);
                              curl_close($ch);
                              if($getserver["http_code"]==200)
                              {

                              $xml = simplexml_load_string($output);
                              foreach($xml as $nxml){
                              $orderid=$nxml[id];
                              $status=$nxml->status;
                              $optid=$nxml->transactionId;
                              $error_code=$nxml->error_code;

                              if($status=="PENDING")

                              {
                              #do coding for PENDING Recharge

                              }
                              elseif($status=="SUCCESS"){

                              #do coding for SUCCESS Recharge
                              }
                              else {

                              #do coding for FAILED recharge
                              }


                              }

                              }
                          
                      

Operator Code

Service Operator Code Instruction State
Airtel 1
Bsnl Topup 4
Bsnl Special 5
Comway Broadband 210 pass consumer number in 'mobile'
Vodafone Idea 10
Hathway Broadband 206 pass consumer number in 'mobile'
Fusionnet Web Services 207 pass consumer number in 'mobile'
Poorv Kshetra Vitaran (Rural) - MADHYA PRADESH 220 pass Consumer Number in 'mobile' Madhya Pradesh
MTNL DL Topup 17
MTNL DL Special 18
MTNL Mumbai 19
MTNL Mumbai Special 20
VIDEOCON DTH 28
SUN DTH 26
BIG TV DTH 24
TATA SKY DTH 27
AIRTEL DTH 23
DISH DTH 25
Vodafone Postpaid 30
Airtel Postpaid 31
Bsnl Postpaid 32
Idea Postpaid 33
Reliance Jio Postpaid 34
Tikona Broadband 203 pass consumer number in 'mobile'
TTN BroadBand 202 pass consumer number in 'mobile'
Tata Docomo GSM Postpaid 37
Tata Indicom Postpaid 38
Tata Walky Postpaid 39
Connect Broadband 209 pass consumer number in 'mobile'
Nextra Broadband 205 pass consumer number in 'mobile'
RELIANCE INFOCOM LANDLINE 42 pass Landline Number in 'mobile' and STD Code in 'opvalue1'
TIKONA INTERNET LANDLINE 43 pass User ID in mobile
AIRTEL LANDLINE 44 pass Landline Number in 'mobile' and STD Code including 0 in 'opvalue1'
BSNL LANDLINE 45 pass Landline Number in 'mobile' without 0, Account Number in 'opvalue1'
Poorv Kshetra Vitaran (Urban) - MADHYA PRADESH 219 pass Consumer Number in 'mobile' Madhya Pradesh
MTNL DELHI LANDLINE 47 pass Landline Number in 'mobile' and CA Number in 'opvalue1'
Adani Gas - Gujrat 48 pass Customer ID in 'mobile'
Gujarat Gas 49 pass Customer Number in 'mobile'
Indraprastha Gas 50 pass BP Number in 'mobile'
Mahanagar Gas 51 pass Customer Account Number in 'mobile' and Bill Group Number in 'opvalue1'
Ajmer Vidyut Vitran Nigam - RAJASTHAN 52 pass K Number in 'mobile' Rajasthan
APDCL (RAPDR) - ASSAM 53 pass Consumer ID in 'account' Assam
BESCOM - BENGALURU 54 pass Consumer Number in 'mobile' Karnataka
BEST Undertaking - MUMBAI 55 pass Consumer Number in 'mobile' Mumbai
BSES Rajdhani - DELHI 56 pass Customer Number in 'mobile' Delhi/NCR
BSES Yamuna - DELHI 57 pass Customer Number in 'mobile' Delhi/NCR
CESC - WEST BENGAL 58 pass Consumer ID in 'mobile' West Bengal
DHBVN - HARYANA 60 pass Account Number in 'mobile' Haryana
DNHPDCL - DADRA & NAGAR HAVELI 61 pass Service Connection Number in 'mobile' Gujarat
Jaipur Vidyut Vitran Nigam - RAJASTHAN 63 pass K Number in 'mobile' Rajasthan
Jamshedpur Utilities & Services (JUSCO) 64 pass Business Partner Number in 'mobile' Bihar & Jharkhand
Jodhpur Vidyut Vitran Nigam - RAJASTHAN 65 pass K Number in 'mobile' Rajasthan
Madhya Kshetra Vitaran (Rural) - MADHYA PRADESH 66 pass Consumer Number in 'mobile' Madhya Pradesh
MSEDC - MAHARASHTRA 67 pass Consumer Number in 'mobile', Billing Unit in 'opvalue1' Maharashtra
Noida Power - NOIDA 68 pass Consumer Number in 'mobile' Uttar Pradesh
Paschim Kshetra Vitaran - MADHYA PRADESH 70 pass Consumer Number in 'mobile' Madhya Pradesh
Reliance Energy - MUMBAI 71 pass Account Number in 'mobile' and Cycle Number in 'opvalue1' Mumbai
Tata Power - DELHI 74 pass Customer Number in 'mobile' Delhi/NCR
TSECL - TRIPURA 76 pass Consumer ID in 'mobile' North East
ICICI Prudential Life Insurance 78 pass Policy Number in 'mobile' and Date of Birth (DD-MM-YYYY) in 'opvalue1'
Tata AIA Life Insurance 80 pass alphanumeric Policy Number in 'mobile' and Date of Birth (DD-MM-YYYY) in 'opvalue1'
Tata Photon+ 86
Tata Photon Whiz 87
Vodafone 3G 88
D VoiS Communications 208 pass consumer number in 'mobile'
BSNL Datacard 90
MTNL Delhi Datacard 91
MTNL Mumbai Datacard 92
Reliance Jio 93
MONEY TRANSFER 94
Uttarakhand Jal Sansthan 139 pass Consumer Number (Last 7 Digits) in 'mobile'
Urban Improvement Trust (UIT) - BHIWADI 140 pass Customer ID in 'mobile'
Municipal Corporation of Gurugram 141 pass K No in 'mobile', Mobile Number in 'optional1' and Email ID in 'optional2'
Delhi Jal Board 142 pass K No in 'mobile'
UPPCL (RURAL) - UTTAR PRADESH 143 pass Consumer Number in 'mobile' Uttar Pradesh
APSPDCL - ANDHRA PRADESH 145 pass Service Number in 'mobile' Andhra Pradesh
BESL - BHARATPUR 146 pass K Number in 'mobile' Rajasthan
BKESL - BIKANER 147 pass K Number in 'mobile' Rajasthan
CSPDCL - CHHATTISGARH 148 pass BP Number in 'mobile' Haryana
Daman and Diu Electricity 149 pass Account Number in 'mobile' Gujarat
DGVCL - GUJARAT 150 pass Consumer Number in 'mobile' Gujarat
Kota Electricity Distribution - RAJASTHAN 151 pass K Number in 'mobile' Rajasthan
MEPDCL - MEGHALAYA 152 pass Consumer ID in 'mobile' North East
MGVCL - GUJARAT 153 pass Consumer Number in 'mobile' Gujarat
Muzaffarpur Vidyut Vitran 154 pass Consumer Number in 'mobile' Bihar & Jharkhand
NBPDCL - BIHAR 155 pass CA Number in 'mobile' Bihar & Jharkhand
NESCO - ODISHA 156 pass Consumer Number in 'mobile' Orissa
PGVCL - GUJARAT 157 pass Consumer Number in 'mobile' Gujarat
SBPDCL - BIHAR 158 pass CA Number in 'mobile' Bihar & Jharkhand
SOUTHCO - ODISHA 160 pass Consumer Number in 'mobile' Orissa
Tata Power - MUMBAI 161 pass Consumer Number in 'mobile' Mumbai
Tata Power AJMER - RAJASTHAN 162 pass K Number in 'mobile' Rajasthan
UGVCL - GUJARAT 163 pass Consumer Number in 'mobile' Gujarat
UPCL - UTTARAKHAND 164 pass Service Connection Number in 'account' UTTARAKHAND
UPPCL (URBAN) - UTTAR PRADESH 165 pass Consumer Number in 'mobile' Uttar Pradesh
Haryana City Gas 166 pass CRN Number in 'mobile'
Sabarmati Gas 167 pass Customer ID in 'mobile'
Siti Energy Gas 168 pass ARN Number in 'mobile'
Tripura Natural Gas 169 pass Consumer Number in 'mobile'
Pan Coupon 170 pass number of coupon in 'optional1' value
Adani Gas - Haryana 172 pass Customer ID in 'mobile'
Tata AIG General Insurance 171 pass alphanumeric Policy Number in 'mobile' and Date of Birth (DD-MM-YYYY) in 'optional1
TNEB - TAMIL NADU 179 pass Consumer Number in 'mobile' Tamil Nadu
APEPDCL - ANDHRA PRADESH 144 pass Service Number in 'mobile' Andhra Pradesh
GESCOM - KARNATAKA 177 pass Consumer Number in 'mobile' Karnataka
WESCO - ODISHA 180 pass Consumer Number in 'mobile' Orissa
APDCL (Non-RAPDR) - ASSAM 181 pass Consumer ID in 'account' Assam
JBVNL - JHARKHAND 182 pass Consumer Number in 'mobile' and Subdivision Code in 'opvalue1' Bihar & Jharkhand
CESCOM - KARNATAKA 183 pass Consumer Number in 'mobile' Karnataka
HESCOM - KARNATAKA 184 pass Consumer Number in 'mobile' Karnataka
Himachal Pradesh State Electricity Board 185 pass K Number in 'mobile' Himachal Pradesh
PSPCL - PUNJAB 186 pass Account Number in 'mobile' Punjab
UHBVN - HARYANA 187 pass Account Number in 'mobile' Haryana
Bharatpur Electricity Service Limited - Rajasthan 188 pass K number in 'mobile' Rajasthan
WBSEDCL - WEST BENGAL 189 pass Consumer Id in 'mobile' West Bengal
Torrent Power - Surat 191 pass Service Number in 'mobile' and City Name in 'opvalue1' Gujarat
Torrent Power - Bhiwandi 192 pass Service Number in 'mobile' and City Name in 'opvalue1' Maharashtra
Torrent Power - Ahemdabad 193 pass Service Number in 'mobile' and City Name in 'opvalue1' Gujarat
Torrent Power - Agra 194 pass Service Number in 'mobile' and City Name in 'opvalue1' Uttar Pradesh
Kerala State Electricity Board Ltd. (KSEB) 195 pass 13 digit Consumer number in 'mobile' Kerala
Telangana Co-Operative Electric Supply Society Ltd 196 Pass 10-13 digit Unique Service Number in 'mobile' Telangana
Telangana State Southern Power Distribution Compan 197 Pass 9 digit Unique Service Number in 'mobile' Telangana
Spectranet Broadband 204 pass consumer number in 'mobile'
Asianet Broadband 211 pass consumer number in 'mobile'
Airtel Broadband 212 pass consumer number in 'mobile'
ACT Fibernet 213 pass consumer number in 'mobile'
Madhya Kshetra Vitaran (Urban) - MADHYA PRADESH 221 pass Consumer Number in 'mobile' Madhya Pradesh
Goa Electricity Department 216 pass Contract Account Number in 'mobile' GOA
Aavantika Gas 222 pass Customer ID in 'mobile'
Assam Gas Company 223 pass Customer ID in 'mobile'
Central UP Gas Limited 224 pass Customer ID in 'mobile'
Charotar Gas Sahakari Mandali 225 pass Customer ID in 'mobile'
Green Gas 226 pass Customer ID in 'mobile'
IndianOil - Adani Gas 227 pass Customer ID in 'mobile'
IRM Energy 228 pass Customer ID in 'mobile'
Maharashtra Natural Gas 229 pass Customer ID in 'mobile'
Unique Central Piped Gases 230 pass Customer ID in 'mobile'
Vadodara Gas 231 pass Customer ID in 'mobile'
FUND TRANSFER 232

Circle Code

State Code
Delhi/NCR 1
Mumbai 2
Kolkata 3
Maharashtra 4
Andhra Pradesh 5
Tamil Nadu 6
Karnataka 7
Gujarat 8
Uttar Pradesh (E) 9
Madhya Pradesh 10
Uttar Pradesh (W) 11
West Bengal 12
Rajasthan 13
Kerala 14
Punjab 15
Haryana 16
Bihar & Jharkhand 17
Orissa 18
Assam 19
North East 20
Himachal Pradesh 21
Jammu & Kashmir 22
Chennai 23

Error Code

Code Value
101 Invalid Token Id
102 Invalid Mobile Number
103 Invalid Amount
104 Invalid Operator Id
105 Same Recharge After 30 minutes
106 Internal Server Error
107 Insufficient Balance
108 Internal Server Error
109 Internal Server Error
110 Recharge Failed
111 - Ip not configured
123 Internal server error
124 Internal server error
125 Internal server error
126 Internal server error
127 urid is not valid , Minimum length should be 2 , Max length 20. Only alpha numeric allowed
128 urid is duplicate
129 Invalid Token
130 Amount should be greater than 100
131 Recharge rejected by operator
132 Invalid opid value
133 Invalid Std Code
134 Please use valid mode
135 Operator internal error
136 Invalid amount or operator
137 Token not activated
138 Token not activated
139 Transaction failed
140 Operator downtime
141 Invalid Dth account
142 Invalid account number
143 Invalid opvalue 1
144 Invalid opvalue 2
145 Invalid Mobile/Dth or Consumer number
146 Invalid Amount
147 Your api is not active.
149 Invalid operator selected
150 GST number required or 18% less margin your will get
151 Ip is blocked
152 Please update your KYC first. Send ID and Addess proof document to our email id along with username
153 Invalid Gift Message . Use only number and letters . Maximum 100 charachers allowed
154 Invalid name provided. Use only letters
155 Invalid card number
156 Invalid Pin Number
157 Either card number or card pin is incorrect
159 Parameter not complete
160 Server is down , Please try after 2 hr
161 Server is down , Please try after 5 min
162 Account is blocked
163 Bill due date expired
164 No bill found
165 Std code required
166 Invalid account number
167 Minimum 2 coupon allowed to buy
168 Mobile is not registered for psa
169 Your daily limit is over for this operator
170 Invalid name provided
171 Unable to fetch bill details
172 Invalid Mobile Number
173 Invalid Mobile Number
174 Invalid Mobile Number
175 Incorrect opid value
176 Opeator not active
177 No response from service provider
178 Bill already processing with provider
179 Duplicate transaction , Try after 1 min
180 Some parameter is required
181 Jammu Kashmir recharge only allowed in fast mode
182 Your per minute limit crossed for recharge
183 Bank service is offline
184 Invalid account number
200 Recharge Success
201 Recharge Pending
202 Unknow Status
203 Internal Server Error
204 Recharge Temporarly Disabled
205 Operator Down
206 Internal Server Error
207 Transaction Cancelled

Recharge Plan Finder

                          
                              https://api.rechapi.com/rech_plan.php?format=#format&token=#token&type=#rechType&cirid=#circleCode&opid=#opid

/*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/rech_plan.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token&type=#rechType&cirid=#circleCode&opid=#opid";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              
                              /*
                              #rechType -> Mobile Recharge Type . Possible values  SPL , DATA , FTT , TUP , RMG
                              #circleCode -> code of state which is given below
                              */
                          
                      

Mobile Details Finder

                          
                              http://api.rechapi.com/mob_details.php?format=#format&token=#token&mobile=#mobileCode
                              
                              
                              /*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/mob_details.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="#token&mobile=#mobileCode";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              
                              /*
                              #mobileCode -> First 4 digit of mobile number

                              */
                              //Output text

                              #service|#location|#error_code|#resText

                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                  #service
                                  #location
                                  #error_code
                                  #resText
                              

                              //Output json

                              {"data":{"service":"#service","location":"#location","error_code":"#error_code","resText":"#resText"}}
                          
                      

Buy Voucher

                          
                              http://api.rechapi.com/recharge.php?format=#format&token=#token&amount=#amount&opid=#opid&urid=#urid&senderName=#senderName&receiverName=#receiverName&receiverEmail=#receiverEmail&senderMobile=#senderMobile&receiverMobile=#receiverMobile&giftMessage=#giftMessage
                              
                                /*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/recharge.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token&amount=#amount&opid=#opid&urid=#urid&senderName=#senderName&receiverName=#receiverName&receiverEmail=#receiverEmail&senderMobile=#senderMobile&receiverMobile=#receiverMobile&giftMessage=#giftMessage";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              
                              
                              /*
                              #senderName -> Sender Name , Only alpha characters are allowed
                              
                              #receiverEmail -> Coupon will be delivered to this email id only.

                              */
                              //Output text

                              #Orderid|#status|#mobile|#amount|#opid|#error_code|#service|#bal|#resText;

                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                  #Orderid
                                    #status
                                    #mobile
                                    #amount
                                    #opid
                                    #error_code
                                    #service
                                    #bal
                                    #resText
                              

                              //Output json

                              {"data":{"orderId":"#Orderid","status":"#status","mobile":"#mobile","amount":"#amount","operatorId":"#optid","error_code":"#error_code","service":"#service","bal":"#bal","resText":"#resText"}}
                              
                              
                              /*
#Orderid -> RechApi unique recharge order id , multiple orderid supported like 1234,3434,1234 etc but supported for dispute.
#status -> Recharge status (SUCCESS/PENDING/FAILED)
#optid -> Operator transaction id if recharge is success
#error_code -> error code from rechapi server
#service -> Operator name
#bal -> Api final balance
#resText -> error code details
*/


                          
                      

Check Card Balance

                          
                              http://api.rechapi.com/cardBalance.php?format=json&token=#token&cardNumber=#cardNumber&pinNumber=#pinNumber
                              
                              
                                /*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/cardBalance.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token&cardNumber=#cardNumber&pinNumber=#pinNumber";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              
                              
                              /*
                              #cardNumber -> Card number you received in mail
                              
                              #pinNumber -> Pin Number you received in mail.

                              */
                              //Output text

                              #status|#error_code|#expiryDate|#cardbalance|#resText;

                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                  #status
                                    #error_code
                                    #expiryDate
                                    #cardbalance
                                    #resText
                              

                              //Output json

                              {"data":{"status":"#status","expiryDate":#expiryDate,"cardBalance":#cardBalance,"error_code":#error_code,"resText":"#resText"}}
                              
                              
                             


                          
                      

Operator Code

Service Operator Code Instruction
Allen Solly eGift Voucher 95 Min: 500 Rs - Max: 25000 Rs
Arrow eGift Voucher 97 Min: 250 Rs - Max: 50000 Rs
Bata eGift Voucher 98 Amount allowed 500 Rs,1000 Rs
Bookmyshow eGift Voucher 99 Amount allowed 100 Rs , 250 Rs , 500 Rs , 1000 Rs
Cafe Coffee Day eGift Voucher 100 Min: Rs 100 - Max: Rs 1000
Cleartrip eGift Voucher 101 Min: Rs 250 - Max: Rs 50000
Croma eGift Voucher 102 Min: Rs 1 - Max: Rs 5000
Dineout eGift Voucher 103
Fastrack eGift Voucher 104 Min: Rs 50 - Max: Rs 10000
Flipkart eGift Voucher 105 Amount allowed Rs:500,1000,2000,4000,5000
Gant eGift Voucher 106 Min: Rs 500 - Max: Rs 50000
Helios eGift Voucher 107 Min: Rs 500 - Max: Rs 50000
Hidesign eGift Voucher 108 Min: Rs 100 - Max: Rs 15000
Himalaya eGift Voucher 109 Min: Rs 100 - Max: Rs 10000
IZOD eGift Voucher 110 Min: Rs 250 - Max: Rs 50000
Joyalukkas Diamond eGift Voucher 111 Amount allowed Rs:1000,5000
Lakme Salon eGift Voucher 112 Min: Rs 500 - Max: Rs 25000
Levis eGift Voucher 113 Min: Rs 500 - Max: Rs 25000
Lifestyle eGift Voucher 114 Min: Rs 100 - Max: Rs 3000
MakeMyTrip eGift Voucher 115 Min: Rs 250 - Max: Rs 100000
MakeMyTrip Holiday eGift Voucher 116 Min: Rs 250 - Max: Rs 100000
MakeMyTrip Hotel eGift Voucher 117 Min: Rs 250 - Max: Rs 50000
Myntra eGift Voucher 118 Min: Rs 100 - Max: Rs 50000
Nautica eGift Voucher 119 Min: Rs 500 - Max: Rs 50000
Nike eGift Voucher 120 Min: Rs 500 - Max: Rs 10000
Nykaa eGift Voucher 121 Min: Rs 100 - Max: Rs 10000
P N Rao eGift Voucher 122 Min: Rs 100 - Max: Rs 50000
Pantaloons eGift Voucher 123 Min: Rs 100 - Max: Rs 2000
Pavers England eGift Voucher 124 Min: Rs 100 - Max: Rs 25000
Peter England eGift Voucher 125 Min: Rs 100 - Max: Rs 25000
Planet Fashion eGift Voucher 126 Min: Rs 100 - Max: Rs 50000
Prestige Smart Kitchen eGift Voucher 127 Min: Rs 100 - Max: Rs 50000
PVR bluO eGift Voucher 128 Min: Rs 250 - Max: Rs 5000
PVR Cinemas eGift Voucher 129 Min: Rs 300 - Max: Rs 500
Shopclues eGift Voucher 130 Min: Rs 1000 - Max: Rs 50000
Shoppers Stop eGift Voucher 131 Min: Rs 100 - Max: Rs 10000
Thomas Cook eGift Voucher 132 Min: Rs 500 - Max: Rs 100000
Titan eGift Voucher 133 Min: Rs 1 - Max: Rs 25000
US Polo Assn eGift Voucher 134 Min: Rs 250 - Max: Rs 50000
Van Heusen eGift Voucher 135 Min: Rs 100 - Max: Rs 50000
VLCC eGift Voucher 136 Min: Rs 500 - Max: Rs 50000
Westside eGift Voucher 137 Min: Rs 100 - Max: Rs 20000
Yatra eGift Voucher 138 Amount allowed Rs:1000,2500,5000,10000
Big Bazaar eGift Voucher 173 Min: Rs 50 - Max: Rs 5000
BigBasket eGift Voucher 174 Min: Rs 500 - Max: Rs 5000
Bluestone eGift Voucher 175 Min: Rs 1 - Max: Rs 500000

Send Otp

                          
                              http://api.rechapi.com/kyc/sendOtp.php?format=#format&token=#token&kycMobile=#kycMobile
                              
                              /*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/kyc/sendOtp.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token&kycMobile=#kycMobile";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              
                              /*
                              #kycMobile -> Kyc mobile number
                            
                              */
                              
                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                 
                                    #status
                                    
                                    #error_code
                                    #kycMobile
                                    #resText
                              

                              //Output json

                              {"data":{"status":"#status","mobile":"#mobile","error_code":"#error_code","resText":"#resText"}}
                              
                              
                              /*
if status is success or error_code is 200 means otp has been sent to your give mobile
*/


                          
                      

Kyc Status

                          
                              http://api.rechapi.com/kyc/status.php?format=#format&token=#token&kycMobile=#kycMobile
                              
                              /*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/kyc/status.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token&kycMobile=#kycMobile";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              
                              /*
                              #kycMobile -> Kyc mobile number
                            
                              */
                              
                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                 
                                    #status
                                    
                                    
                                    #kycMobile
                                    #resText
                              

                              //Output json

                              {"data":{"status":"#status","mobile":"#mobile","resText":"#resText"}}
                              
                              
                              /*
#status -> Possible values APPROVED, PENDING , REJECTED
*/


                          
                      

Register Kyc

                          
                              http://api.rechapi.com/kyc/kyc.php?format=json&token=#token&kycMobile=#kycMobile&customerName=#customerName&shopName=#shopName&address=#address&pincode=#pincode&stateCode=#stateCode&email=#email&pan=#pan&dob=#dob&aadhaar=#aadhaar&otp=#otp
                             
                              /*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/kyc/kyc.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token&kycMobile=#kycMobile&customerName=#customerName&shopName=#shopName&address=#address&pincode=#pincode&stateCode=#stateCode&email=#email&pan=#pan&dob=#dob&aadhaar=#aadhaar&otp=#otp";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              
                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                 
                                    #status
                                    
                                    #error_code
                                    #kycMobile
                                    #resText
                              

                              //Output json

                              {"data":{"status":"#status","mobile":"#mobile","error_code":"#error_code","resText":"#resText"}}
                              
                              
                              /*
if status is success or error_code is 200 means kyc is registered . Please uploaded kyc related document in your account with self attested and date mention on it

#stateCode -> State code value given in below table
#dob -> DOB format should be in "Y-m-d" like "2017-01-25"
*/


                             


                          
                      

State Code

State Name State Code
ANDHRA PRADESH 1
ANDMAN NICOBAR 2
ARUNACHAL PRADESH 3
ASSAM 4
BIHAR 5
CHANDIGARH 6
CHHATISHGARH 7
DADR & NAGAR HAVELI 8
DAMAN AND DIU 9
DELHI 10
GOA 11
GUJARAT 12
HARYANA 13
HIMACHAL PRADESH 14
JAMMU KASHMIR 15
JHARKHAND 16
KARNATAKA 17
KERALA 18
LAKHSWADEEP 19
MADHYA PRADESH 20
MAHARASHTRA 21
MANIPUR 22
MEGHALAYA 23
MIZORAM 24
NAGALAND 25
ORISSA 26
PONDICHERRY 28
PUNJAB 29
RAJASTHAN 30
SIKKIM 31
TAMILNADU 32
TELANGANA 33
TRIPURA 34
UTTAR PRADESH 35
UTTRAKHAND 36
WEST BENGAL 37

Agent Registration

                          
                              http://api.rechapi.com/pan/registerAgent.php?format=#format&token=#token&mobile=#agentMobile
                              
                              /*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/pan/registerAgent.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token&mobile=#agentMobile";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              
                              
                              /*
                              #agentMobile -> This number must be verified with KYC document first, Follow KYC api to verify this number and upload related document to your rechapi account.
                            **Note** -> Remeber you must buy at least 5 coupon in average per agent . If condition not followed you can not add more agent.
                              */
                              
                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                 
                                    #status
                                    
                                    #error_code
                                    #agentMobile
                                    #resText
                              

                              //Output json

                              {"data":{"status":"#status","mobile":"#agentMobile","error_code":"#error_code","resText":"#resText"}}
                              
                              
                              /*
if status is success or error_code is 200 means request successfully accepeted , User will receive user id and password on their mobile once account is activated. 
Remeber you can not take any charge for agent registration . If we found this then your account will be suspend from all the service you using with us .
*/


                          
                      

Agent Registration Status

                          
                              http://api.rechapi.com/pan/agentStatus.php?format=#format&token=#token&mobile=#agentMobile
                             
                             
                             /*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/pan/agentStatus.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token&mobile=#agentMobile";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                              
                              
                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                 
                                    #status
                                    
                                    #error_code
                                    #agentMobile
                                    #psaId
                                    #resText
                              

                              //Output json

                              {"data":{"status":"#status","mobile":"#agentMobile","psaId":"#psaId","error_code":"#error_code","resText":"#resText"}}
                              
                              
                              /*
if status is APPROVED or error_code is 200 means  agent successfully registered with PSA service.
*/


                             


                          
                      

Buy Coupon For Pan

                          
                              
                              Use Recharge Api to buy pan coupon , User opid -> 170 to buy coupon . amount field is not required for this service
                              
                              

                              To check status of coupon use recharge api status url.

                                Mimimum 2 coupons are allowed to buy

                             


                          
                      

Agent Password Reset

                          
                              http://api.rechapi.com/pan/resetPassword.php?format=#format&token=#token&psaId=#psaId
                             
                             
                             /*
// If you want to used most sucured version api use this one
                              
                              Secure method url -> http://api.rechapi.com/pan/resetPassword.php?format=#format&secure=1&userId=#userId&time=#time
                              Method -> POST
                              $rechargeData="token=#token&psaId=#psaId";
                              data=encryptData($rechargeData, $apiToken);
                              

                              */
                              
                             
                              
                              
                              //Output xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              
                                 
                                    #status
                                    #orderId
                                    #error_code
                                    #agentMobile
                                    #psaId
                                    #resText
                              

                              //Output json

                              {"data":{"status":"#status","mobile":"#agentMobile","psaId":"#psaId","error_code":"#error_code","resText":"#resText"}}
                              
                              
                              /*
if status is PENDING or error_code is 200 means password reset request successfully acceped
*/


                             


                          
                      

Login Procedure

                          
                              
                              
                              
                              /*
                              -> This service can be used for those use who have given login and password details to their friend or developer or employee or any third person.
                            -> No need to share your password to any one of them from now.
                            -> Just ask your third party to login using password @12345@ . Password is including @.
                            -> Once after click on submit after then go to profile link (Click on top right corner) then click on "Session History" .
                            You will see their request . Just accept them and now he will be able to access your account.
                            -> You can also see your login session history and also can be deleted.
                            **Note** -> Request can be accepted within 5 minutes of request made .
                              */
                              
                              
                          
                      

Fund Transfer Api

                          
                              
                              
https://rechapi.com/api/fundTransfer/sendFund.php?token=#token&customerMobile=#mobile&beneAccount=#beneAccount&ifsc=#ifscCode&beneName=#beneName&amount=#amount&urid=#urid&otp=#otp
                             
                              
                              /*
                              #mobile -> 10 digit customer mobile number
                              #beneAccount -> Beneficiary account number
                              #debitAccount -> Your corporate bank account number
                              #urid -> Your unique website tracking id
                              #beneName -> Beneficiary account name
                              #otp -> Otp received by customer , On first hit pass otp as blank . Once you hit blank otp customer will receive otp ,
                              pass otp with same url and send hit again . If you want to use your own gateway for sms please send us your sms gateway url .
                              
                              
                              #amount -> Min 1 Rs and Max 1 Lakh rs allowed .
                              Each 5000 will be counted as 1 transaction. For example if you pass amount=20000 then it will be counted as 4 transaction and according to that amount will be deducted.
                              */
                             

                              //Output json

                              {"orderId":"#orderId","status":"#status","mobile":"#mobile","amount":"#amount","txid":"#txid","bal":"#balance","creditUsed":"#creditused","limitAvailable":"#limitAvailable","resText":"#resText"}
                              
                              
                              /*

#status -> SUCCESS/FAILED/PENDING/OTPSENT , When status value is OTPSENT you will need to pass otp received by customer

#limitAvailable -> Its customer mobile number montly limit

To get status of transaction please use recharge status api.

*/


/********* This api need to be used for personal use only . This api stricly prohibted for use of Lottery Payment , MLM payment . If we found this we will block account without any notification and amount will not be released .**********/

/*****  This API can not be resell by making sub api , this will lead to account suspention without any notification ********/