Skip to main content
Login

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
Recharge API Integration
Quick start

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. 1

    Get API credentials

    Choose a plan and complete KYC; you receive your API username and password.

  2. 2

    Whitelist & configure

    Share your server IP and callback URL with our team.

  3. 3

    Test with small amounts

    Send a ₹10 recharge, read the JSON response and check the status API.

  4. 4

    Go live

    Load your wallet and start sending recharges from your app or website.

For developers

API Documentation

Complete guide to integrate our recharge and bill payment API

Recharge API Endpoint

GET/POST https://business.a1topup.com/recharge/api

Request Parameters

ParameterRequiredDescriptionExample
usernameYesYour API usernameYOUR_USERNAME
pwdYesYour API passwordYOUR_PASSWORD
circlecodeNoCircle code for the mobile number2 (West Bengal)
operatorcodeYesOperator code (see operator list below)A (Airtel)
numberYesMobile number or consumer number980000000
amountYesRecharge amount10
orderidYesYour unique order ID485668
formatYesResponse 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=json

Response Formats

CSV Format (Default)

1225,Success,WB22565584,980000000,10,485668

CSV Response Parameters:

  1. txid - Transaction ID
  2. status - Success/Failure
  3. opid - Operator ID
  4. number - Recharge number
  5. amount - Recharge amount
  6. 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>
Code samples

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=json
Responses

Handling responses and pending recharges

StatusMeaningWhat your system should do
SuccessThe operator confirmed the rechargeMark the order successful and store opid
FailureThe recharge was rejectedRefund your customer
PendingFinal status not received yetDo 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.
Callback URL

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';
Bills & landline

Extra parameters for landline, gas, electricity and insurance

Same recharge endpoint; pass the extra values in value1 and value2.

Billernumbervalue1value2
Airtel LandlineLandline numberSTD code-
BSNL LandlineLandline numberSTD codeAccount number
MTNL Delhi LandlineLandline numberCA number-
Mahanagar GasCustomer account numberBill group number-
MSEDC - MaharashtraConsumer numberBilling unitProcessing cycle
Reliance Energy - MumbaiAccount numberCycle number-
InsurancePolicy numberDate 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.

Services

Operator Code List

All supported operators with their codes and service types

Operator NameOperator CodeService Type
AirtelAMobile
VodafoneVMobile
BSNL - TOPUPBTMobile
RELIANCE - JIORCMobile
IdeaIMobile
BSNL - STVBRMobile
Airtel Digital DTH TVATVDTH
SUNDIRECT DTH TVSTVDTH
TATASKY DTH TVTTVDTH
VIDEOCON DTH TVVTVDTH
DISH TVDTVDTH
Airtel PostpaidPATPostPaid
Idea PostpaidIPPostPaid
Vodafone PostpaidVPPostPaid
JIO PostPaidJPPPostPaid
BSNL PostPaidBPPostPaid
Tata Docomo PostpaidDPPostpaid
BSNL LandlineLBSPostPaid
MTNL Delhi LandlineLMTPostPaid
Airtel LandlineLATPostPaid
North Bihar ElectricityNBEElectricity
JBVNL - JharkhandJBVNLElectricity
Assam Power Distribution Company Ltd (RAPDR)APDCLRElectricity
Mangalore Electricity Supply Co. Ltd (MESCOM) - RAPDRMESCOMRElectricity
APDCL (Non-RAPDR) - AssamAPDCLNElectricity
Mangalore Electricity Supply Co. Ltd (Non-RAPDR)MESCOMNRElectricity
BSES Rajdhani Power Limited - DelhiBSESElectricity
BSES Yamuna Power Limited - DelhiBSESYElectricity
Tata Power Delhi Limited - DelhiTPDElectricity
Tata Power - MumbaiTPDMElectricity
Hubli Electricity Supply Company Ltd. (HESCOM)HESCOMElectricity
South Bihar ElectricitySBEElectricity
BEST MumbaiBESTElectricity
Ajmer Vidyut Vitran Nigam - RajasthanAJVElectricity
Bangalore Electricity Supply Company (BESCOM)BESCOMElectricity
CESC - West BengalCESCElectricity
Jaipur Vidyut Vitran Nigam - RajasthanJVVElectricity
Jodhpur Vidyut Vitran Nigam - RajasthanJDVVElectricity
MP Madhya Kshetra Vidyut Vitaran - UrbanMKVElectricity
MSEDC - MaharashtraMSEDCElectricity
Noida Power - NoidaNPElectricity
Paschim Kshetra Vitaran - Madhya PradeshPKVElectricity
Southern Power - Andhra PradeshSPAElectricity
Southern Power - TelanganaSPTElectricity
Torrent Power AgraTRPElectricity
Central Power Distribution Company of Andhra Pradesh LtdAPCPDCLElectricity
Department of Power Arunachal PradeshARPDOPElectricity
Western Electricity Supply Co. of Orissa Ltd.WESCOElectricity
Paschim Gujarat Vij Company LtdPGVCLElectricity
Bharatpur Electricity Services LtdBHESElectricity
Muzaffarpur Vidyut VitranMVVElectricity
Madhya Gujarat Vij Company LtdMGVCLElectricity
Meghalaya Power Distribution (MEPDCL)MEPDCLElectricity
KEDL - KotaKEDLElectricity
Dakshin Gujarat Vij Company LtdDGVCLElectricity
WBSEDCL - West BengalWBSEDCLElectricity
SNDL Power - NagpurSNDLElectricity
Bikaner Electricity Supply LimitedBESLElectricity
India Power - West BengalIPWBElectricity
Brihanmumbai Electric Supply & Transport (BEST)BMESTUElectricity
APEPDCL - Andhra PradeshAPEPDCLElectricity
TNEB - Tamil NaduTNEBElectricity
UPPCL (Urban) - Uttar PradeshUPPCLUElectricity
UPPCL (Rural) - Uttar PradeshUPPCLRElectricity
Dakshin Haryana Bijli Vitran NigamDHBVNElectricity
TSNPDCL - Telangana Northern PowerTSNPDCLElectricity
Dadra & Nagar Haveli Power Distribution (DDCL)DDCLElectricity
Gulbarga Electricity Supply Company Ltd (GESCL)GESCLElectricity
India Power Corporation LimitedIPCLElectricity
Jamshedpur Utilities and Services CompanyJUSCLElectricity
Chhattisgarh State Power Distribution Company LtdCSPDCLElectricity
Goa ElectricityGOAELCElectricity
Uttar Gujarat Vij Company LtdUGVCLElectricity
Torrent Power SuratTORRENTSURElectricity
Torrent Power AhmedabadTORRENTAHMElectricity
Gift Power Company LimitedGPCLElectricity
Himachal Pradesh State Electricity Board LtdHPSEBLElectricity
Jammu & Kashmir Power Development DepartmentJKPDDElectricity
Chamundeshwari Electricity Supply Corporation (CESC Mysore)CESCOMElectricity
North Delhi Power LimitedNDPLElectricity
Municipal Corporation of GurugramMCGElectricity
Punjab State Power Corporation LimitedPSPCLElectricity
Tripura State Electricity Corporation LtdTSECLElectricity
Uttar Haryana Bijli Vitran NigamUHBVElectricity
Uttarakhand Power Corporation LimitedUKPCLElectricity
Kerala State Electricity Board LtdKSEBElectricity
Kannan Devan Hills PowerKDHPCPLElectricity
Lakshadweep Electricity DepartmentLEDElectricity
MP Poorv Kshetra Vidyut Vitaran - JabalpurMPPKVVCLPUElectricity
MP Poorv Kshetra Vidyut Vitaran - RuralMPPKVVCLMRElectricity
MP Poorv Kshetra Vidyut Vitaran - UrbanMPPKVVCLElectricity
Reliance EnergyRELIANCEElectricity
Torrent Power ShilTORRENTSHIElectricity
Torrent Power BhivandiTORRENTBHIElectricity
Adani PowerAEMLElectricity
Manipur State Power Distribution Company Ltd (Prepaid)MSPDCLPRElectricity
Power & Electricity Department - MizoramMPEDElectricity
Department of Power - NagalandNDOPElectricity
New Delhi Municipal Council (NDMC) - ElectricityNDMCElectricity
NESCO OdishaNESCOElectricity
SOUTHCO OdishaSOUTHCOElectricity
TP Central Odisha Distribution LtdTPCODLElectricity
Puducherry Electricity DepartmentPGPEDElectricity
TP Ajmer Distribution LtdTPADLElectricity
Sikkim Power RuralSPRElectricity
Sikkim Power UrbanSPUElectricity
Kanpur Electricity Supply Company (KESCO)KESCOElectricity
Torrent Power DahejTORRENTDAHElectricity
Mahanagar GasMGGas
Adani GasAGGas
Gujarat GasGGGas
Indraprastha GasIGGas
HPCL GasHPCLGCGas
ICICI Prudential InsuranceICPInsurance
Tata AIA InsuranceTAIInsurance
Jammu & Kashmir Bank FASTagJKFFASTag
Kotak Mahindra Bank FASTagKMFFASTag
IndusInd Bank FASTagINDFFASTag
Indian Highways Management Company Ltd FASTagIHMCFFASTag
IDFC First Bank FASTagIFFFASTag
ICICI Bank FASTagICFFASTag
HDFC Bank FASTagHDFFASTag
Equitas Bank FASTagEFFFASTag
Bank of Baroda FASTagBBFFASTag
Axis Bank FASTagAXFFASTag
Federal Bank FASTagFDFFASTag
Paytm Payments Bank FASTagPTFFASTag
Airtel Payments Bank FASTagAPBFASTag
IDBI Bank FASTagIBFFASTag
SBI Bank FASTagSBFFASTag
Google Play Gift CardGLFVoucher

Circle Code List

Telecom circle codes for different states and regions

StateCircle Code
Andhra Pradesh13
Assam24
Bihar17
Chhattisgarh27
Gujarat12
Haryana20
Himachal Pradesh21
Jammu and Kashmir25
Jharkhand22
Karnataka9
Kerala14
Madhya Pradesh16
Maharashtra4
Orissa23
Punjab1
Rajasthan18
Tamil Nadu8
Uttar Pradesh East10
Uttar Pradesh West11
West Bengal2
Mumbai3
Delhi5
Chennai7
North East26
Kolkata6
Customer reviews

What our customers say

Retailers, distributors and businesses that run on A1Topup every day.

4.9 / 5 from 310 Google reviews

The recharge software from A1Topup helped me start my business within days. The white-label solution is perfect and the commissions are the best in the market.

Rajesh Kumar Rajesh KumarMumbai

Excellent software with all the features I needed. The admin dashboard is very intuitive and the support team is always available to help.

Priya Singh Priya SinghDelhi

I've been using this software for 6 months now and it's been a game-changer for my business. The multi-tier commission system helps me manage my resellers easily.

Vikram Patel Vikram PatelAhmedabad

The API integration was seamless and the documentation was excellent. My developers had no issues implementing it into our existing system. Highly recommended!

Amit Sharma Amit SharmaBangalore

The reporting features have given me valuable insights into my business. I can now track sales, commissions, and customer behaviour all in one place.

Venket Reddy Venket ReddyHyderabad

The mobile app works flawlessly. My customers love the convenience of recharging on the go. The transaction success rate is impressive compared to other providers.

Rahul Mehta Rahul MehtaChennai
Postman

Test the API in Postman

Import the collection, set username and pwd, and run the recharge, balance and status requests.

FAQ

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.

Get in touch

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

We respect your privacy. Your details are only used to contact you about A1Topup.

WhatsApp