Home
Solutions
Pricing
Developers
Blog
Company
+91 91610 19161 WhatsApp
Create account Login
  1. Home
  2. Solutions
  3. Bill Fetch API

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.

Example

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"
}
How it works

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.

FAQ

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.

Show the bill before they pay

Electricity, postpaid and FASTag lookups with one login.