Python Client
One signed-request helper that serves every product.
One signed-request helper serves every product — only the base path changes.
import hashlib, hmac, json, time, requests
class Payonclick:
HOST = "https://payonclick.in"
def __init__(self, api_key):
self.api_key = api_key
def call(self, method, path, body=None):
"""path is the FULL path, e.g. /ext/v1/bbps/balance"""
raw = json.dumps(body).encode() if body is not None else b""
ts = str(int(time.time()))
msg = f"{method}\n{path}\n{ts}\n{hashlib.sha256(raw).hexdigest()}"
sig = hmac.new(self.api_key.encode(), msg.encode(), hashlib.sha256).hexdigest()
r = requests.request(
method, self.HOST + path, data=raw,
headers={
"Authorization": f"Bearer {self.api_key}",
"X-Timestamp": ts,
"X-Signature": sig,
"Content-Type": "application/json",
}, timeout=60)
return r.json()
# Usage
poc = Payonclick("poc_live_...")
print(poc.call("GET", "/ext/v1/bbps/balance"))
print(poc.call("GET", "/ext/v1/bbps/billers?category=electricity"))
bill = poc.call("POST", "/ext/v1/bbps/bill/fetch", {
"biller_id": "RELI00000MUM03",
"customer_params": [{"paramName": "Consumer number",
"paramValue": "123456789"}],
"mobile_number": "9876543210",
})
paid = poc.call("POST", "/ext/v1/bbps/bill/pay", {
"bill_token": bill["data"]["bill_token"],
"amount": bill["data"]["bill"]["bill_amount"],
"tpin": "1234",
"client_reference": "ORD-2026-000123",
})