Bill fetch API for electricity, postpaid and FASTag
Fetch the amount due, due date and customer name before the customer pays, using one consistent JSON shape for every biller type.
A bill fetch API looks up a pending bill from a consumer number so you can show the exact amount before payment. A1 Plan API offers electricity board, postpaid mobile and FASTag lookups that return the customer name, due amount, due date and bill number in the same structure.
What you can call
Electricity Bill Fetch
Consumer / bill number per board. Some boards also need a DOB or district code as an optional field.
Postpaid Bill Fetch
Postpaid mobile dues by operator code and mobile number.
FASTag Bill Fetch
FASTag issuer dues by vehicle number.
Operator code list
Board, postpaid and issuer codes you can pass as operatorcode.
Billed per successful fetch
Bill fetches are charged from your wallet and never use your daily plan hits.
Safe by design
Whitelisted IPs and a unique login per account.
Fetch a postpaid bill
The same request in four languages. Replace the placeholders with your username and password from the dashboard.
curl -s "https://a1planapi.com/planapi/postpaidBillFetch?username=YOUR_USERNAME&pwd=YOUR_PASSWORD&operatorcode=PAT&mobileno=9876543210"<?php
$url = 'https://a1planapi.com/planapi/postpaidBillFetch?' . http_build_query(array(
'username' => 'YOUR_USERNAME',
'pwd' => 'YOUR_PASSWORD',
'operatorcode' => 'PAT',
'mobileno' => '9876543210',
));
$ch = curl_init($url);
curl_setopt_array($ch, array(CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 15));
$body = curl_exec($ch);
curl_close($ch);
$data = json_decode($body, true);
if (isset($data['ERROR']) && $data['ERROR'] === '0') {
print_r($data);
} else {
echo $data['Message'] ?? 'Request failed';
}import requests
params = {
'username': 'YOUR_USERNAME',
'pwd': 'YOUR_PASSWORD',
'operatorcode': 'PAT',
'mobileno': '9876543210',
}
r = requests.get('https://a1planapi.com/planapi/postpaidBillFetch', params=params, timeout=15)
data = r.json()
if data.get('ERROR') == '0':
print(data)
else:
print(data.get('Message', 'Request failed'))const params = new URLSearchParams({
username: 'YOUR_USERNAME',
pwd: 'YOUR_PASSWORD',
operatorcode: 'PAT',
mobileno: '9876543210',
});
const res = await fetch('https://a1planapi.com/planapi/postpaidBillFetch?' + params, { signal: AbortSignal.timeout(15000) });
const data = await res.json();
if (data.ERROR === '0') {
console.log(data);
} else {
console.log(data.Message || 'Request failed');
}A successful response looks like this (sample values):
{
"ERROR": "0",
"STATUS": "1",
"BILLDEATILS": {
"Name": "Dummy Name",
"DueAmount": "470.46",
"DueDate": "2026-11-22",
"BillNumber": "9XXXXXXXX9",
"BillDate": "01 Nov 2026"
},
"MESSAGE": "Bill Fetch Processed"
}From signup to first response
Choose the operatorcode
Take the biller code from the operator list, for example PAT for Airtel postpaid.
Send the identifier
Pass the mobile number, consumer number or vehicle number the biller expects.
Read BILLDEATILS
Show Name, DueAmount and DueDate. Note the key is spelled BILLDEATILS in the live response, so match it exactly.
Questions developers ask
Which bills can I fetch?
Electricity boards, postpaid mobile and FASTag. Each has its own endpoint and operator codes.
Why is the key called BILLDEATILS?
That is how the live response spells it, so parse it exactly as BILLDEATILS rather than correcting the spelling in your code.
What if my electricity board needs extra details?
Some boards ask for a date of birth or district code. Send it in the optional1 and optional2 parameters described in the electricity bill documentation.
Does fetching a bill pay it?
No. It only returns what is due. Payment is handled by your own platform.
What happens when the wallet balance is low?
The API returns ERROR 1 with a message such as Insufficient wallet balance. Show a friendly retry message and top up.
Related guides
Show the bill before they pay
Electricity, postpaid and FASTag lookups with one login.
