Build with the Pay2All API
Clean REST APIs for recharge, bill payment, AEPS, DMT, PAN and payouts — with Bearer authentication, a sandbox, webhooks and predictable JSON responses.
Introduction
The Pay2All API lets you add recharge, bill payment, banking and payout services to your own app or portal. All requests are made over HTTPS to the base URL below and return JSON.
Every transaction is funded from your single Pay2All e-wallet. Fund the wallet, call an endpoint, and the amount plus your commission is settled automatically.
Authentication
Authenticate every request with your secret API key as a Bearer token in the Authorization header. Keep your key secret — never expose it in client-side code.
curl https://api.pay2all.in/v1/wallet/balance \
-H "Authorization: Bearer YOUR_API_KEY"You get two keys: a test key for the sandbox and a live key for production. Requests without a valid key return 401 Unauthorized.
Wallet balance
Response
{
"balance": 4761.00,
"currency": "INR"
}Recharge
Process prepaid, postpaid, DTH and data-card recharges for any operator.
Parameters
| Field | Type | Description |
|---|---|---|
operator required | string | Operator code, e.g. JIO, AIRTEL. |
number required | string | Mobile / DTH / account number. |
amount required | number | Recharge amount in ₹. |
reference | string | Your unique reference (idempotency). |
Request
curl -X POST https://api.pay2all.in/v1/recharge \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operator": "JIO",
"number": "9876543210",
"amount": 239,
"reference": "TXN-1001"
}'Response
{
"status": "SUCCESS",
"txnId": "PAY2ALL-8827364",
"operatorRef": "JIO-99823",
"amount": 239,
"balance": 4522.00
}Bill Payment
Fetch a bill from any of 1000+ billers, then pay it. First fetch the live amount, then submit payment.
curl -X POST https://api.pay2all.in/v1/bbps/fetch-bill \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"billerId": "MSEB00000MUM01",
"params": { "consumerNumber": "1234567890" }
}'curl -X POST https://api.pay2all.in/v1/bbps/pay \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"billerId": "MSEB00000MUM01",
"amount": 540,
"params": { "consumerNumber": "1234567890" },
"reference": "BILL-2201"
}'Biller categories include electricity, water, gas, broadband, DTH, FASTag, loan EMI, insurance and more. Get the full biller list and each biller's required params from GET /bbps/billers.
AEPS & DMT
Offer Aadhaar-based banking (AEPS) and domestic money transfer (DMT) to your retailers.
AEPS requires a certified biometric device; DMT requires OTP-based remitter KYC and beneficiary account validation. See your dashboard for onboarding steps.
Payout
Send instant single or bulk payouts to any bank account or UPI ID via IMPS, NEFT, RTGS or UPI.
curl -X POST https://api.pay2all.in/v1/payout \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"mode": "IMPS",
"account": "1234567890",
"ifsc": "HDFC0000123",
"name": "Rahul Kumar",
"reference": "PO-5501"
}'Webhooks
Register a webhook URL in your dashboard to receive real-time transaction updates. We POST a JSON event to your URL whenever a transaction succeeds, fails or is refunded.
{
"event": "recharge.success",
"txnId": "PAY2ALL-8827364",
"status": "SUCCESS",
"amount": 239,
"reference": "TXN-1001",
"timestamp": "2026-07-29T10:24:11Z"
}Verify the X-Pay2All-Signature header (HMAC-SHA256 of the raw body using your webhook secret) to confirm authenticity. Respond with 200 OK within 5 seconds; we retry failed deliveries.
Errors
The API uses standard HTTP status codes. Errors return a JSON body with a code and message.
| Status | Meaning |
|---|---|
400 | Bad request — a required field is missing or invalid. |
401 | Unauthorized — missing or invalid API key. |
402 | Insufficient wallet balance. |
404 | Not found — unknown operator, biller or transaction. |
409 | Duplicate reference — this idempotency key was already used. |
429 | Too many requests — rate limit exceeded. |
5xx | Temporary server / upstream error — retry with the same reference. |
Going live
Ready to launch? Here's the path from sandbox to production:
- Register and complete your business KYC to unlock live keys.
- Test every flow in the sandbox with your
testkey. - Fund your e-wallet and switch to your
livekey. - Register your webhook URL and go live.