BBPS Bill Payment API 20000 billers NPCI aligned
| | |

How to Integrate BBPS API for Bill Payments

If you want to offer digital bill payment services, learning how to integrate BBPS API for bill payments is essential.

The BBPS API allows businesses to provide services like electricity bills, DTH recharge, mobile bills, gas payments, and more through a single platform.

With the growing demand for digital payments in India, businesses that integrate BBPS API for bill payments can generate consistent revenue and expand their fintech services.

Start BBPS services: https://nxtbanking.com/bbps-api

What is BBPS API?

BBPS API (Bharat Bill Payment System API) is a centralized platform that allows businesses to integrate multiple bill payment services into their system.

It is managed by National Payments Corporation of India and ensures standardized, secure, and real-time payments.

Official info: https://www.npci.org.in/what-we-do/bbps/product-overview

Why Integrate BBPS API for Bill Payments?

Businesses choose to integrate BBPS API for bill payments because:

  • Offer multiple bill services in one platform
  • Increase customer engagement
  • Earn commission on every transaction
  • Provide real-time payments
  • Build scalable fintech solution

Requirements Before Integration

Before you integrate BBPS API for bill payments, you need:

1. Business Registration

Valid business and KYC

2. BBPS API Provider

➡️ https://nxtbanking.com/bbps-api

3. Developer Support

Technical team for integration

4. Secure System

Backend + database setup

5. Internet Connectivity

Stable connection required

Step-by-Step Process to Integrate BBPS API for Bill Payments

Step 1: Choose BBPS API Provider

Select a reliable provider with:

  • High uptime
  • Good support
  • Secure API

Step 2: Get API Credentials

You will receive:

  • API key
  • Client ID
  • Secret key
  • API endpoints

Step 3: Study API Documentation

Understand:

  • Request/response format
  • Authentication
  • Error codes
  • Bill fetch & payment APIs

Step 4: Setup Development Environment

Prepare:

  • Backend system
  • UI for bill payment
  • API request handling

Step 5: Integrate BBPS APIs

Key APIs include:

  • Bill fetch API
  • Payment API
  • Transaction status API

Step 6: Test in Sandbox

Check:

  • Bill fetch accuracy
  • Payment processing
  • Error handling
  • Response time

Step 7: Go Live

After approval:

  • Switch to live environment
  • Start accepting payments

Features You Get After Integration

When you integrate BBPS API for bill payments, you can offer:

  • Electricity bills
  • Mobile recharge
  • DTH recharge
  • Gas payments
  • Water bills
  • Insurance payments

Explore more APIs:
https://nxtbanking.com/aeps-api-provider
https://nxtbanking.com/dmt-api

Security & Compliance

BBPS ensures:

  • Secure transactions
  • NPCI regulation
  • Data encryption

Learn more: https://uidai.gov.in/en/

Common Integration Challenges

  • API errors
  • Incorrect bill fetch
  • Network issues
  • Payment failure handling
  • Compliance delays

Solution: Choose reliable provider + test properly

Benefits for Businesses

  • Recurring income
  • Customer retention
  • High demand service
  • Easy scalability
  • Low operational cost

FAQs

How long does BBPS API integration take?

Usually a few days to weeks depending on provider.

Do I need technical knowledge?

Yes, or you need a developer team.

Is BBPS API profitable?

Yes, businesses earn commission per transaction.

Conclusion

Learning how to integrate BBPS API for bill payments is a powerful step toward building a successful fintech business.

With proper integration, security, and provider selection, you can offer reliable bill payment services and generate consistent revenue.

Get started today: https://nxtbanking.com/bbps-api


Code Samples: Integrating NxtBanking BBPS API End-to-End

Every code block below is a working call against the NxtBanking BBPS sandbox. Swap YOUR_API_KEY with the key you receive after sandbox sign-up, and YOUR_WEBHOOK_SECRET with the HMAC secret from your dashboard. All timestamps are UNIX epoch seconds.

1. Authenticate and fetch the biller catalogue

BBPS bill payments begin with a biller lookup. The biller catalogue lists every biller (by category), its customer parameters (e.g. consumer number, mobile), and its current status (ACTIVE, BLOCKED). Cache this response in Redis for at least 6 hours — it rarely changes.

# cURL — list all ACTIVE electricity billers
curl -X GET "https://sandbox.nxtbanking.com/v1/bbps/billers?category=Electricity&status=ACTIVE" 
 -H "Authorization: Bearer YOUR_API_KEY" 
 -H "X-Client-Ref: nxtb-$(date +%s)-$RANDOM" 
 -H "Content-Type: application/json"
<?php
// PHP 8.x — fetch billers via Guzzle
$client = new GuzzleHttpClient([
 'base_uri' => 'https://sandbox.nxtbanking.com/v1/',
 'timeout' => 10,
 'headers' => [
 'Authorization' => 'Bearer ' . getenv('NXTB_API_KEY'),
 'X-Client-Ref' => 'nxtb-' . time() . '-' . bin2hex(random_bytes(4)),
 ],
]);

$response = $client->get('bbps/billers', [
 'query' => ['category' => 'Electricity', 'status' => 'ACTIVE'],
]);

$billers = json_decode($response->getBody()->getContents(), true)['data'];
foreach ($billers as $b) {
 echo "{$b['billerId']} {$b['name']} ({$b['customerParams'][0]['name']})n";
}
# Python 3.10+
import os, time, uuid, requests

resp = requests.get(
 "https://sandbox.nxtbanking.com/v1/bbps/billers",
 params={"category": "Electricity", "status": "ACTIVE"},
 headers={
 "Authorization": f"Bearer {os.environ['NXTB_API_KEY']}",
 "X-Client-Ref": f"nxtb-{int(time.time())}-{uuid.uuid4().hex[:8]}",
 },
 timeout=10,
)
resp.raise_for_status()
for b in resp.json()["data"]:
 print(b["billerId"], b["name"], b["customerParams"][0]["name"])
// Node.js 18+ (native fetch)
const ref = `nxtb-${Date.now()}-${Math.random().toString(36).slice(2,10)}`;
const res = await fetch(
 'https://sandbox.nxtbanking.com/v1/bbps/billers?category=Electricity&status=ACTIVE',
 { headers: {
 Authorization: `Bearer ${process.env.NXTB_API_KEY}`,
 'X-Client-Ref': ref,
 } }
);
const { data: billers } = await res.json();
billers.forEach(b => console.log(b.billerId, b.name));

2. Fetch the current bill amount

The bill-fetch call takes the biller ID and the customer parameters (from the catalogue), and returns the current outstanding bill. Store the billFetchRef — you pass it into the payment call so BBPS can track the fetch-pay pair.

# cURL — bill fetch for an MSEDCL customer
curl -X POST "https://sandbox.nxtbanking.com/v1/bbps/bill/fetch" 
 -H "Authorization: Bearer YOUR_API_KEY" 
 -H "Content-Type: application/json" 
 -d '{
 "billerId": "MSEDCL00NAT01",
 "customerParams": [
 {"name": "Consumer Number", "value": "123456789"}
 ],
 "amountOptions": "EXACT"
 }'
{
 "status": "SUCCESS",
 "billFetchRef": "BF5c3b7d2a9e41",
 "bill": {
 "customerName": "Ramesh Sharma",
 "billDate": "2026-03-28",
 "billNumber": "INV-2026-0300451",
 "dueDate": "2026-04-15",
 "billAmount": 234500,
 "billAmountCurrency": "INR_PAISE"
 }
}

Tip:billAmount is always in paise (₹1 = 100 paise) to avoid floating-point rounding errors. Divide by 100 only at the display layer.

3. Pay the bill

// PHP — pay the bill we just fetched
$payment = $client->post('bbps/bill/pay', [
 'json' => [
 'billFetchRef' => 'BF5c3b7d2a9e41',
 'amount' => 234500, // paise
 'paymentMode' => 'ACCOUNT', // or UPI | CARD | WALLET
 'paymentRef' => 'PAY-' . uniqid(),
 'remitter' => [
 'name' => 'Ramesh Sharma',
 'mobile' => '9900112233',
 ],
 ],
]);
$result = json_decode($payment->getBody(), true);
if ($result['status'] === 'SUCCESS') {
 // Store $result['txnRefId'] against your order.
 // A webhook (see below) will fire the terminal status async.
}

4. Verify webhook signatures

NxtBanking signs every webhook with HMAC-SHA256 over the raw request body. Reject any request whose signature doesn’t match — this is the single most common integration bug.

// PHP webhook verifier — put this ahead of any JSON decode.
$raw = file_get_contents('php://input');
$header = $_SERVER['HTTP_X_NXTB_SIGNATURE'] ?? '';
$mac = hash_hmac('sha256', $raw, getenv('NXTB_WEBHOOK_SECRET'));
if ( ! hash_equals($mac, $header) ) {
 http_response_code(401);
 exit('invalid signature');
}
$event = json_decode($raw, true);
// event.type ∈ { bill.paid, bill.failed, bill.pending }
// event.data.txnRefId, event.data.billerRefId, event.data.amount
# FastAPI webhook handler
import hashlib, hmac, os
from fastapi import FastAPI, Request, HTTPException

app = FastAPI()
SECRET = os.environ["NXTB_WEBHOOK_SECRET"].encode()

@app.post("/webhooks/bbps")
async def bbps_webhook(req: Request):
 body = await req.body()
 sig = req.headers.get("x-nxtb-signature", "")
 want = hmac.new(SECRET, body, hashlib.sha256).hexdigest()
 if not hmac.compare_digest(sig, want):
 raise HTTPException(401, "invalid signature")
 evt = await req.json()
 # dispatch based on evt["type"]
 return {"ok": True}

5. BBPS response codes you must handle

CodeMeaningTypical causeRetry?
00SUCCESSHappy path
BFR-ERR-0001Biller unavailableBiller system downYes, after 30 s
BFR-ERR-0003Invalid customer paramsWrong consumer number / plateNo — surface to user
BPR-ERR-0018Bill already paidIdempotency conflictNo — treat as success
BPR-ERR-0200Partial payment not allowedBiller requires EXACTNo — surface
TXN-PENDPending at billerBiller slowNo — wait for webhook

6. Reconciliation — daily MIS

# Pull yesterday's settlement MIS as CSV
curl -X GET "https://sandbox.nxtbanking.com/v1/bbps/reports/settlement?date=2026-04-22" 
 -H "Authorization: Bearer YOUR_API_KEY" 
 -H "Accept: text/csv" 
 -o bbps-settlement-2026-04-22.csv

Reconcile the CSV against your internal ledger daily. The bbpsTxnId column is the NPCI-blessed transaction ID, and settlementStatus is one of SETTLED, PENDING, REVERSED. Any PENDING row older than T+2 is an ops alert.

Next steps

About This Topic

Bharat Bill Payment System (BBPS) is NPCI's standardised bill payment network connecting customers with 20,000+ billers across electricity, gas, water, telecom, insurance, and more. NxtBanking's BBPS API enables two-step bill fetch and payment flows with per-transaction BBPS reference numbers, daily MIS reconciliation, dispute management tooling, and a sandbox environment for testing. Integrating BBPS through NxtBanking gives your product access to India's complete utility payment ecosystem under one contract.

Quick Answers

What is BBPS and what does it cover?

BBPS (Bharat Bill Payment System) is NPCI's standardised bill payment network with 20,000+ registered billers spanning electricity, gas, water, telecom, DTH, insurance, education, and municipal services — enabling one-stop bill payment for consumers and businesses alike.

How does BBPS API integration work?

BBPS API integration involves two sequential REST calls: Bill Fetch (retrieve current due amount using the customer's consumer number) and Bill Payment (debit the customer and confirm payment to the biller). Each transaction receives a unique BBPS transaction reference number for traceability.

Is NxtBanking RBI-compliant for payment APIs?

Yes. NxtBanking operates through RBI-licensed partner banks for all payment services (IMPS, NEFT, RTGS, UPI) and is NPCI-certified for BBPS, AEPS, and UPI flows. All APIs follow RBI's Master Directions on payment aggregators, KYC, and PMLA obligations. We maintain audit logs, data localisation, and consent frameworks compliant with the DPDP Act 2023.

How does NxtBanking handle API downtime and failover?

NxtBanking uses a connected-banking architecture that links a single API credential to multiple RBI-licensed partner banks. When one bank's rails experience degradation or maintenance, the API automatically routes to the next available bank — with no code change required on the client side. This multi-bank failover is what delivers 99%+ transaction success rates and 99.9% API uptime SLA for enterprise clients.

What does it cost to integrate NxtBanking APIs?

NxtBanking offers pay-as-you-go pricing with no setup fees and no minimum commitment for most APIs. Typical pricing: IMPS/UPI payout ₹3–₹8 per transaction, NEFT ₹1–₹3, BBPS bill payment ₹0.50–₹3, AEPS cash withdrawal ₹2–₹5. Enterprise clients on committed volumes negotiate flat-rate pricing. Sandbox access is free and unlimited. Contact sales for a custom quote based on your expected transaction volume.

Key Terms

BBPS
Bharat Bill Payment System — an NPCI-regulated interoperable bill payment network covering 20,000+ billers across electricity, gas, telecom, insurance, and more.
API
Application Programming Interface — a structured software interface that lets applications communicate with each other over the internet using defined endpoints, authentication, and data formats.

NxtBanking is India's AI-powered fintech API platform trusted by hundreds of fintechs, BC networks, NBFCs, and enterprise companies. Our unified API marketplace covers payout (IMPS, NEFT, RTGS, UPI), BBPS bill payment with 20,000+ billers, AEPS biometric banking, KYC and identity verification (Aadhaar, PAN, Bank, Driving Licence, Voter ID, RC), UPI collection and QR codes, domestic money transfer (DMT), mobile and DTH recharge, Micro-ATM, and travel APIs — all under one master agreement, one set of credentials, and one consolidated monthly invoice.

Every NxtBanking API is backed by a 99.9% uptime SLA, real-time webhook delivery, a full-featured sandbox environment with simulated error scenarios, comprehensive API documentation with Postman collections and code samples in multiple languages, and dedicated technical onboarding support. Production go-live for most APIs is achievable within 7–15 business days after KYC and compliance review. For enterprise clients requiring custom SLAs, dedicated infrastructure, or white-label platform builds, NxtBanking offers tailored commercial terms with no minimum volume commitment at the pilot stage.

Book a free demo · Explore API marketplace · Contact us

Know More