Recharge API Integration
Integrate mobile recharge, DTH, postpaid, and utility bill payment services with our robust API. Support for all major operators across India with instant processing.
- GST registered company
- Direct operator connectivity
- Phone & WhatsApp support
Integrate the recharge API in 4 steps
Everything a developer needs on one page: endpoints, parameters, responses, callback, codes and ready-to-run samples.
- 1
Get API credentials
Choose a plan and complete KYC; you receive your API username and password.
- 2
Whitelist & configure
Share your server IP and callback URL with our team.
- 3
Test with small amounts
Send a ₹10 recharge, read the JSON response and check the status API.
- 4
Go live
Load your wallet and start sending recharges from your app or website.
API Documentation
Complete guide to integrate our recharge and bill payment API
Recharge API Endpoint
GET/POST https://business.a1topup.com/recharge/apiRequest Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
username | Yes | Your API username | YOUR_USERNAME |
pwd | Yes | Your API password | YOUR_PASSWORD |
circlecode | No | Circle code for the mobile number | 2 (West Bengal) |
operatorcode | Yes | Operator code (see operator list below) | A (Airtel) |
number | Yes | Mobile number or consumer number | 980000000 |
amount | Yes | Recharge amount | 10 |
orderid | Yes | Your unique order ID | 485668 |
format | Yes | Response format (csv, json, xml) | json |
Sample Request
https://business.a1topup.com/recharge/api?username=YOUR_USERNAME&pwd=YOUR_PASSWORD&circlecode=2&operatorcode=A&number=980000000&amount=10&orderid=485668&format=jsonResponse Formats
CSV Format (Default)
1225,Success,WB22565584,980000000,10,485668CSV Response Parameters:
- txid - Transaction ID
- status - Success/Failure
- opid - Operator ID
- number - Recharge number
- amount - Recharge amount
- orderid - Your order ID
JSON Format
{
"txid": "5804",
"status": "Success",
"opid": "RJ0317161622000269New",
"number": "980000000",
"amount": "10",
"orderid": "485668"
}XML Format
<response>
<txid>5804</txid>
<status>Success</status>
<opid>RJ0317161622000269New</opid>
<number>9134350662</number>
<amount>10</amount>
<orderid>485668</orderid>
</response>Balance API Endpoint
GET/POST https://business.a1topup.com/recharge/balanceRequest Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
username | Yes | Your API username | YOUR_USERNAME |
pwd | Yes | Your API password | YOUR_PASSWORD |
format | Yes | Response format (csv, json, xml) | json |
Sample Request
https://business.a1topup.com/recharge/balance?username=YOUR_USERNAME&pwd=YOUR_PASSWORD&format=jsonSample Response
{
"status": "success",
"balance": "1542.50",
"currency": "INR"
}Status API Endpoint
GET/POST https://business.a1topup.com/recharge/statusRequest Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
username | Yes | Your API username | YOUR_USERNAME |
pwd | Yes | Your API password | YOUR_PASSWORD |
orderid | Yes | Your unique order ID | 485668 |
format | Yes | Response format (csv, json, xml) | json |
Sample Request
https://business.a1topup.com/recharge/status?username=YOUR_USERNAME&pwd=YOUR_PASSWORD&orderid=485668&format=jsonSample Response
{
"status": "Success",
"txid": "5804",
"opid": "RJ0317161622000269New",
"number": "980000000",
"amount": "10",
"orderid": "485668",
"timestamp": "2023-12-15 10:30:05"
}Callback URL Configuration
With the callback URL, you will receive automatic status updates for your transactions.
Callback URL Format
www.yourdomain.com/yourfile?txid=YOUR_ORDER_ID&status=Success/Failure&opid=OPERATOR_IDCallback Parameters
| Parameter | Description |
|---|---|
txid | Unique recharge ID provided by you |
status | Success or Failure |
opid | Operator ID from the operator |
Recharge API integration in PHP, Node.js, Python and cURL
Copy, add your credentials and test with a ₹10 recharge. Use a new order id for every request.
PHP (cURL)
<?php
$params = array(
'username' => 'YOUR_USERNAME',
'pwd' => 'YOUR_PASSWORD',
'circlecode' => '2', // circle code (list below)
'operatorcode' => 'RC', // RC = Jio, A = Airtel, V = Vodafone (list below)
'number' => '9800000000',
'amount' => '10',
'orderid' => 'ORD' . time(), // unique for every request
'format' => 'json',
);
$ch = curl_init('https://business.a1topup.com/recharge/api?' . http_build_query($params));
curl_setopt_array($ch, array(CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 60));
$res = json_decode(curl_exec($ch), true);
curl_close($ch);
if ($res && $res['status'] === 'Success') { /* mark order successful, save $res['opid'] */ }
elseif ($res && $res['status'] === 'Failure') { /* refund your customer */ }
else { /* pending: wait for the callback or call the status API */ }Node.js
const params = new URLSearchParams({
username: 'YOUR_USERNAME', pwd: 'YOUR_PASSWORD',
circlecode: '2', operatorcode: 'RC', number: '9800000000',
amount: '10', orderid: 'ORD' + Date.now(), format: 'json'
});
const res = await fetch('https://business.a1topup.com/recharge/api?' + params);
const data = await res.json(); // { txid, status, opid, number, amount, orderid }
console.log(data.status);Python
import requests, time
params = {"username": "YOUR_USERNAME", "pwd": "YOUR_PASSWORD", "circlecode": "2",
"operatorcode": "RC", "number": "9800000000", "amount": "10",
"orderid": f"ORD{int(time.time())}", "format": "json"}
data = requests.get("https://business.a1topup.com/recharge/api", params=params, timeout=60).json()
print(data["status"], data.get("opid"))cURL
curl "https://business.a1topup.com/recharge/api?username=YOUR_USERNAME&pwd=YOUR_PASSWORD&circlecode=2&operatorcode=RC&number=9800000000&amount=10&orderid=ORD1001&format=json"Status and balance API
// Status API (use the same order id you sent with the recharge)
https://business.a1topup.com/recharge/status?username=YOUR_USERNAME&pwd=YOUR_PASSWORD&orderid=ORD1001&format=json
// Balance API
https://business.a1topup.com/recharge/balance?username=YOUR_USERNAME&pwd=YOUR_PASSWORD&format=jsonHandling responses and pending recharges
| Status | Meaning | What your system should do |
|---|---|---|
| Success | The operator confirmed the recharge | Mark the order successful and store opid |
| Failure | The recharge was rejected | Refund your customer |
| Pending | Final status not received yet | Do not resend. Wait for the callback, or call the status API with the same order id |
- Every request needs a unique order id; reuse it only to check status.
- Keep a 60-second timeout; a timeout is treated as pending, not failed.
- Log every request and response with the order id for reconciliation.
Recharge API callback URL: automatic status updates
When a pending or disputed transaction gets its final status, A1Topup calls your URL with the order id, status and operator id.
<?php
// callback.php - A1Topup calls: https://yourdomain.com/callback.php?txid=ORDER_ID&status=Success&opid=OPERATOR_ID
$orderId = isset($_GET['txid']) ? $_GET['txid'] : ''; // your order id
$status = isset($_GET['status']) ? $_GET['status'] : ''; // Success or Failure
$opid = isset($_GET['opid']) ? $_GET['opid'] : ''; // operator reference
// 1. find the order by $orderId 2. update it only if it is still pending
// 3. if Failure: refund the customer's wallet 4. respond with HTTP 200
http_response_code(200); echo 'OK';Extra parameters for landline, gas, electricity and insurance
Same recharge endpoint; pass the extra values in value1 and value2.
| Biller | number | value1 | value2 |
|---|---|---|---|
| Airtel Landline | Landline number | STD code | - |
| BSNL Landline | Landline number | STD code | Account number |
| MTNL Delhi Landline | Landline number | CA number | - |
| Mahanagar Gas | Customer account number | Bill group number | - |
| MSEDC - Maharashtra | Consumer number | Billing unit | Processing cycle |
| Reliance Energy - Mumbai | Account number | Cycle number | - |
| Insurance | Policy number | Date of birth (DD-MM-YYYY) | - |
Fetch the bill amount first with the bill fetch API, detect operators with the operator detection API, and show live plans with the recharge plan API.
Operator Code List
All supported operators with their codes and service types
| Operator Name | Operator Code | Service Type |
|---|---|---|
| Airtel | A | Mobile |
| Vodafone | V | Mobile |
| BSNL - TOPUP | BT | Mobile |
| RELIANCE - JIO | RC | Mobile |
| Idea | I | Mobile |
| BSNL - STV | BR | Mobile |
| Airtel Digital DTH TV | ATV | DTH |
| SUNDIRECT DTH TV | STV | DTH |
| TATASKY DTH TV | TTV | DTH |
| VIDEOCON DTH TV | VTV | DTH |
| DISH TV | DTV | DTH |
| Airtel Postpaid | PAT | PostPaid |
| Idea Postpaid | IP | PostPaid |
| Vodafone Postpaid | VP | PostPaid |
| JIO PostPaid | JPP | PostPaid |
| BSNL PostPaid | BP | PostPaid |
| Tata Docomo Postpaid | DP | Postpaid |
| BSNL Landline | LBS | PostPaid |
| MTNL Delhi Landline | LMT | PostPaid |
| Airtel Landline | LAT | PostPaid |
| North Bihar Electricity | NBE | Electricity |
| JBVNL - Jharkhand | JBVNL | Electricity |
| Assam Power Distribution Company Ltd (RAPDR) | APDCLR | Electricity |
| Mangalore Electricity Supply Co. Ltd (MESCOM) - RAPDR | MESCOMR | Electricity |
| APDCL (Non-RAPDR) - Assam | APDCLN | Electricity |
| Mangalore Electricity Supply Co. Ltd (Non-RAPDR) | MESCOMNR | Electricity |
| BSES Rajdhani Power Limited - Delhi | BSES | Electricity |
| BSES Yamuna Power Limited - Delhi | BSESY | Electricity |
| Tata Power Delhi Limited - Delhi | TPD | Electricity |
| Tata Power - Mumbai | TPDM | Electricity |
| Hubli Electricity Supply Company Ltd. (HESCOM) | HESCOM | Electricity |
| South Bihar Electricity | SBE | Electricity |
| BEST Mumbai | BEST | Electricity |
| Ajmer Vidyut Vitran Nigam - Rajasthan | AJV | Electricity |
| Bangalore Electricity Supply Company (BESCOM) | BESCOM | Electricity |
| CESC - West Bengal | CESC | Electricity |
| Jaipur Vidyut Vitran Nigam - Rajasthan | JVV | Electricity |
| Jodhpur Vidyut Vitran Nigam - Rajasthan | JDVV | Electricity |
| MP Madhya Kshetra Vidyut Vitaran - Urban | MKV | Electricity |
| MSEDC - Maharashtra | MSEDC | Electricity |
| Noida Power - Noida | NP | Electricity |
| Paschim Kshetra Vitaran - Madhya Pradesh | PKV | Electricity |
| Southern Power - Andhra Pradesh | SPA | Electricity |
| Southern Power - Telangana | SPT | Electricity |
| Torrent Power Agra | TRP | Electricity |
| Central Power Distribution Company of Andhra Pradesh Ltd | APCPDCL | Electricity |
| Department of Power Arunachal Pradesh | ARPDOP | Electricity |
| Western Electricity Supply Co. of Orissa Ltd. | WESCO | Electricity |
| Paschim Gujarat Vij Company Ltd | PGVCL | Electricity |
| Bharatpur Electricity Services Ltd | BHES | Electricity |
| Muzaffarpur Vidyut Vitran | MVV | Electricity |
| Madhya Gujarat Vij Company Ltd | MGVCL | Electricity |
| Meghalaya Power Distribution (MEPDCL) | MEPDCL | Electricity |
| KEDL - Kota | KEDL | Electricity |
| Dakshin Gujarat Vij Company Ltd | DGVCL | Electricity |
| WBSEDCL - West Bengal | WBSEDCL | Electricity |
| SNDL Power - Nagpur | SNDL | Electricity |
| Bikaner Electricity Supply Limited | BESL | Electricity |
| India Power - West Bengal | IPWB | Electricity |
| Brihanmumbai Electric Supply & Transport (BEST) | BMESTU | Electricity |
| APEPDCL - Andhra Pradesh | APEPDCL | Electricity |
| TNEB - Tamil Nadu | TNEB | Electricity |
| UPPCL (Urban) - Uttar Pradesh | UPPCLU | Electricity |
| UPPCL (Rural) - Uttar Pradesh | UPPCLR | Electricity |
| Dakshin Haryana Bijli Vitran Nigam | DHBVN | Electricity |
| TSNPDCL - Telangana Northern Power | TSNPDCL | Electricity |
| Dadra & Nagar Haveli Power Distribution (DDCL) | DDCL | Electricity |
| Gulbarga Electricity Supply Company Ltd (GESCL) | GESCL | Electricity |
| India Power Corporation Limited | IPCL | Electricity |
| Jamshedpur Utilities and Services Company | JUSCL | Electricity |
| Chhattisgarh State Power Distribution Company Ltd | CSPDCL | Electricity |
| Goa Electricity | GOAELC | Electricity |
| Uttar Gujarat Vij Company Ltd | UGVCL | Electricity |
| Torrent Power Surat | TORRENTSUR | Electricity |
| Torrent Power Ahmedabad | TORRENTAHM | Electricity |
| Gift Power Company Limited | GPCL | Electricity |
| Himachal Pradesh State Electricity Board Ltd | HPSEBL | Electricity |
| Jammu & Kashmir Power Development Department | JKPDD | Electricity |
| Chamundeshwari Electricity Supply Corporation (CESC Mysore) | CESCOM | Electricity |
| North Delhi Power Limited | NDPL | Electricity |
| Municipal Corporation of Gurugram | MCG | Electricity |
| Punjab State Power Corporation Limited | PSPCL | Electricity |
| Tripura State Electricity Corporation Ltd | TSECL | Electricity |
| Uttar Haryana Bijli Vitran Nigam | UHBV | Electricity |
| Uttarakhand Power Corporation Limited | UKPCL | Electricity |
| Kerala State Electricity Board Ltd | KSEB | Electricity |
| Kannan Devan Hills Power | KDHPCPL | Electricity |
| Lakshadweep Electricity Department | LED | Electricity |
| MP Poorv Kshetra Vidyut Vitaran - Jabalpur | MPPKVVCLPU | Electricity |
| MP Poorv Kshetra Vidyut Vitaran - Rural | MPPKVVCLMR | Electricity |
| MP Poorv Kshetra Vidyut Vitaran - Urban | MPPKVVCL | Electricity |
| Reliance Energy | RELIANCE | Electricity |
| Torrent Power Shil | TORRENTSHI | Electricity |
| Torrent Power Bhivandi | TORRENTBHI | Electricity |
| Adani Power | AEML | Electricity |
| Manipur State Power Distribution Company Ltd (Prepaid) | MSPDCLPR | Electricity |
| Power & Electricity Department - Mizoram | MPED | Electricity |
| Department of Power - Nagaland | NDOP | Electricity |
| New Delhi Municipal Council (NDMC) - Electricity | NDMC | Electricity |
| NESCO Odisha | NESCO | Electricity |
| SOUTHCO Odisha | SOUTHCO | Electricity |
| TP Central Odisha Distribution Ltd | TPCODL | Electricity |
| Puducherry Electricity Department | PGPED | Electricity |
| TP Ajmer Distribution Ltd | TPADL | Electricity |
| Sikkim Power Rural | SPR | Electricity |
| Sikkim Power Urban | SPU | Electricity |
| Kanpur Electricity Supply Company (KESCO) | KESCO | Electricity |
| Torrent Power Dahej | TORRENTDAH | Electricity |
| Mahanagar Gas | MG | Gas |
| Adani Gas | AG | Gas |
| Gujarat Gas | GG | Gas |
| Indraprastha Gas | IG | Gas |
| HPCL Gas | HPCLGC | Gas |
| ICICI Prudential Insurance | ICP | Insurance |
| Tata AIA Insurance | TAI | Insurance |
| Jammu & Kashmir Bank FASTag | JKF | FASTag |
| Kotak Mahindra Bank FASTag | KMF | FASTag |
| IndusInd Bank FASTag | INDF | FASTag |
| Indian Highways Management Company Ltd FASTag | IHMCF | FASTag |
| IDFC First Bank FASTag | IFF | FASTag |
| ICICI Bank FASTag | ICF | FASTag |
| HDFC Bank FASTag | HDF | FASTag |
| Equitas Bank FASTag | EFF | FASTag |
| Bank of Baroda FASTag | BBF | FASTag |
| Axis Bank FASTag | AXF | FASTag |
| Federal Bank FASTag | FDF | FASTag |
| Paytm Payments Bank FASTag | PTF | FASTag |
| Airtel Payments Bank FASTag | APB | FASTag |
| IDBI Bank FASTag | IBF | FASTag |
| SBI Bank FASTag | SBF | FASTag |
| Google Play Gift Card | GLF | Voucher |
Circle Code List
Telecom circle codes for different states and regions
| State | Circle Code |
|---|---|
| Andhra Pradesh | 13 |
| Assam | 24 |
| Bihar | 17 |
| Chhattisgarh | 27 |
| Gujarat | 12 |
| Haryana | 20 |
| Himachal Pradesh | 21 |
| Jammu and Kashmir | 25 |
| Jharkhand | 22 |
| Karnataka | 9 |
| Kerala | 14 |
| Madhya Pradesh | 16 |
| Maharashtra | 4 |
| Orissa | 23 |
| Punjab | 1 |
| Rajasthan | 18 |
| Tamil Nadu | 8 |
| Uttar Pradesh East | 10 |
| Uttar Pradesh West | 11 |
| West Bengal | 2 |
| Mumbai | 3 |
| Delhi | 5 |
| Chennai | 7 |
| North East | 26 |
| Kolkata | 6 |
What our customers say
Retailers, distributors and businesses that run on A1Topup every day.
Test the API in Postman
Import the collection, set username and pwd, and run the recharge, balance and status requests.
Recharge API integration questions
Where is the A1Topup recharge API documentation?
On this page: the recharge, balance and status API, response formats, callback URL, operator and circle codes, code samples and a Postman collection.
How do I integrate a mobile recharge API in PHP?
Send a GET or POST request to the recharge endpoint with your username, password, circle code, operator code, number, amount and a unique order id, then read the JSON response. A complete PHP cURL example is on this page.
How do I check the status of a pending recharge?
Call the status API with the same order id you sent with the recharge. Do not send the recharge again while it is pending; set a callback URL to receive the final status automatically.
What is the callback URL in a recharge API?
A URL on your server that A1Topup calls with the order id, final status (Success or Failure) and operator id, so your system updates pending and reversed transactions without manual checks.
Which response formats does the API support?
CSV (default), JSON with format=json and XML with format=xml.
Is the A1Topup recharge API free?
The API is available on a one-time plan, and you earn commission on every successful recharge. Plans and operator-wise commission are listed on the Recharge API commission page.
Does the same API work for DTH, postpaid and electricity bills?
Yes. Use the operator code of the service. Landline, gas, electricity and insurance billers need extra values in value1 and value2, as listed on this page.
What if the operator or circle is detected wrongly?
This usually happens with ported (MNP) numbers. Use the operator detection API to get the current operator and circle, let the user correct it if needed, and send the corrected operator code and circle code with the recharge.
Ready to Get Started?
Sign up today and get your API credentials to start integrating recharge services into your application.
Rated 4.9/5 from 310 Google reviews by businesses.
- GST registeredGSTIN 36AAWCA0064F1ZN
- Since 2016In the recharge business
- 10,000+ partnersAcross India
- Real peoplePhone & WhatsApp support