Official multi-language code samples for the KwikAPI v3.0.1 platform by Yoflic India Pvt Ltd.
Instantly integrate India's bill payments, prepaid/DTH recharges, BBPS utility payments, payouts, and penny-drop verification and more.
π API Reference MD Β Β·Β Recharge Flow Β Β·Β BBPS Payment Flow
π API Reference HTML Β Β·Β Recharge Flow Β Β·Β BBPS Payment Flow
- Register and get your API key
- Clone this repo
- Pick your language folder under
code-samples/ - Replace
YOUR_API_KEYin any file with your actual key - All samples point to the UAT environment by default β switch
BASE_URLtohttps://www.kwikapi.comfor production
| Environment | Base URL |
|---|---|
| UAT / Testing | https://uat.kwikapi.com |
| Production | https://www.kwikapi.com |
Always develop and test against UAT first. One-line switch to go live. Single key works for both enviroments.
All APIs (except IP Detect) require an api_key:
| Method | How to pass api_key |
|---|---|
| POST | form-data body field |
| GET | query string parameter |
| API | Default Limit |
|---|---|
| Service Category List | 10 / day |
| Biller List | 20 / day |
| Biller Details | 20 / day |
| Circle Codes | 2 / day |
| Wallet Balance | 48 / day |
| Transaction Status | 100 / day |
| Last 100 Transactions | 48 / day |
| All others | Per account (contact support) |
Limits for Balance and Status can be increased based on account performance. Subject to approval.
| File | Endpoint | Method | Description |
|---|---|---|---|
service-category-list |
/api/v2/Service-Category-List.php |
POST | All active service categories with operator counts |
biller-list |
/api/v2/operator_codes.php |
GET | Paginated biller list with codes, status, and amount ranges |
biller-details |
/api/v2/operatorFetch.php |
POST | Full biller details; supports batch lookup (53#54#55) |
circle-codes |
/api/v2/circle_codes.php |
GET | All India telecom circle codes (cache locally) |
bill-fetch |
/api/v2/bills/validation.php |
GET | Fetch outstanding bill/due amount from a BBPS biller |
wallet-balance |
/api/v2/balance.php |
GET | Current KwikAPI wallet balance |
transaction-status |
/api/v2/status.php |
GET | Real-time status of a transaction by order_id |
last-transactions |
/api/v2/transactions.php |
GET | Latest 100 transactions for the account |
operator-circle-detect |
/api/v2/operator_fetch_v2.php |
POST | Detect operator & circle for any mobile number (MNP-aware) |
mobile-recharge-plans |
/api/v2/recharge_plans.php |
POST | All prepaid plans for an operator + circle |
dth-recharge-plans |
/api/v2/DTH_plans.php |
POST | All DTH packs for a given operator |
r-offer-check |
/api/v2/R-OFFER_check.php |
POST | Active R-Offers for a mobile number (Airtel & VI only) |
| File | Endpoint | Method | Description |
|---|---|---|---|
prepaid-dth-recharge |
/api/v2/recharge.php |
GET | Prepaid mobile / DTH / Datacard recharge |
utility-payments |
/api/v2/bills/payments.php |
GET | All BBPS utility bill payments |
payout |
/api/v2/payments/index.php |
POST | Bank account payout via IMPS/NEFT |
| File | Endpoint | Method | Description |
|---|---|---|---|
bank-account-verify |
/api/v2/dmt/account_validate_route2 |
POST | Real-time penny-drop bank account verification |
| File | Endpoint | Method | Description |
|---|---|---|---|
ip-detect |
/api/v2/ip_detect.php |
GET | Returns your server's public IP β no auth required |
code-samples/
βββ php/ # PHP 8+ with cURL β SDK-style functions
β βββ service-category-list.php
β βββ biller-list.php
β βββ biller-details.php
β βββ circle-codes.php
β βββ bill-fetch.php
β βββ wallet-balance.php
β βββ transaction-status.php
β βββ last-transactions.php
β βββ operator-circle-detect.php
β βββ mobile-recharge-plans.php
β βββ dth-recharge-plans.php
β βββ r-offer-check.php
β βββ prepaid-dth-recharge.php
β βββ utility-payments.php
β βββ payout.php
β βββ bank-account-verify.php
β βββ ip-detect.php
β
βββ javascript-fetch/ # Browser Fetch API β async/await ES modules
β βββ *.js
β
βββ curl/ # Shell scripts β bash functions with error handling
β βββ *.sh
β
βββ jquery/ # jQuery 3.x AJAX β promise-based
β βββ *.js
β
βββ axios/ # Node.js + Axios β async/await CommonJS modules
β βββ *.js
β
βββ python/ # Python 3.10+ β SDK class with requests library
βββ *.py
Every sample follows these conventions for drop-in SDK use:
- Single function per file β named after the endpoint (e.g.
kwik_wallet_balance(),walletBalance()) - UAT URL by default β change
BASE_URL/KWIKAPI_BASE_URLconstant to switch to production - Structured error handling β raises/throws on HTTP errors and API-level errors (
success: false) - No silent failures β all errors surface with clear, actionable messages
- Typed return values β functions return the full parsed JSON response directly
- Exportable β Axios and Python samples export the function for use as a library module
- Zero extra dependencies β PHP uses built-in cURL, JS Fetch is native browser API
1. operator-circle-detect β get opid + state_code for mobile number
2. mobile-recharge-plans β show plans to user
3. wallet-balance β verify sufficient balance
4. prepaid-dth-recharge β initiate recharge
5. transaction-status β ALWAYS verify final status by order_id
1. biller-details β confirm bill-fetch support + required params
2. bill-fetch β fetch outstanding due amount
3. wallet-balance β verify sufficient balance
4. utility-payments β process payment (opt8 = "Bills")
5. transaction-status β ALWAYS verify final status
1. ip-detect β find your server's public IP
2. [Whitelist IP] β add IP in your KwikAPI dashboard
3. bank-account-verify β penny-drop verify beneficiary
4. payout β initiate transfer
5. transaction-status β verify final status
All API responses return JSON. A successful response always has "success": true.
{
"success": true,
"status": "SUCCESS",
"message": "Transaction successful",
"data": { ... }
}On failure:
{
"success": false,
"status": "FAILED",
"message": "Descriptive error message"
}| Error Message | Cause |
|---|---|
Invalid API Key |
Wrong or inactive API key |
Rate limit exceeded |
Too many requests in the allowed window |
Insufficient balance |
Wallet balance too low for the transaction |
Order ID already exists |
Duplicate order_id β must be unique per transaction |
IP not whitelisted |
Server IP not added to whitelist (Payout API) |
β οΈ Prepaid/DTH Recharge & Utility Payments:
- Always call Transaction Status after every payment, regardless of response
order_idmust be globally unique per transaction β never reuse
β οΈ Payout API:
- Requires IP whitelisting β use
ip-detectfirst, then whitelist in dashboard- Always verify beneficiary with
bank-account-verifybefore every payout
| Channel | Details |
|---|---|
| Website | kwikapi.com |
| Register | Get API Key |
| support@kwikapi.com | |
| Toll Free | 18008890016 |
| +91-7070300613 |
See CHANGELOG.md for a detailed history of changes.
KwikAPI v3.0.1 β by Yoflic India Pvt Ltd. Last updated: May 2026.