Developers
Recharge API
Sell QR recharges from your own app or website — any language that can make an HTTPS request. Each recharge is debited from your prepaid wallet at the pack price minus your commission.
1. Get started
- Sign up as a partner. Our team enables API access and sets your commission.
- Add money to your wallet (bank transfer for now — the team credits it).
- Create a sandbox key (
qrk_test_…) in Partner portal → API. Sandbox calls never charge or recharge. - Switch to a live key (
qrk_live_…) when ready. Keys are shown once — store them on your server, never in an app.
2. Authentication
Send the key in every request. Base URL:
https://digitalauthor.in/api/public/v1 Authorization: Bearer qrk_live_XXXXXXXX
Optional IP allow-list per key. Default limit: 60 requests per minute per key. Amounts are in paise (minor units).
3. Endpoints
/packsPacks you can sell, with your price, commission and wallet debit./qr/{code}Check a QR: exists, activated, masked name and current balance./rechargeRecharge a QR. Body: code, pack_id, partner_txn_id. Applies instantly./recharge/{partner_txn_id}Status of a recharge — use for retries and reconciliation./balanceYour prepaid wallet balance and commission rate.4. Recharge a QR
partner_txn_id is your own unique order ID. Sending the same ID again returns the original result and never charges twice — safe to retry on timeouts.
curl -X POST "https://digitalauthor.in/api/public/v1/recharge" \
-H "Authorization: Bearer qrk_live_XXXXXXXX" \
-H "Content-Type: application/json" \
-d '{"code":"QR-XVVN4SYK","pack_id":"<pack uuid>","partner_txn_id":"ORDER-10001"}'Success (201, or 200 for a repeated partner_txn_id)
{
"status": "success",
"data": {
"id": "6f1c…",
"partner_txn_id": "ORDER-10001",
"state": "success",
"duplicate": false,
"sandbox": false,
"price_minor": 19900,
"commission_minor": 995,
"wallet_debit_minor": 18905,
"wallet_balance_minor": 481095,
"recharge_id": "a2b9…"
}
}Error format
{ "status": "error", "error": { "code": "INSUFFICIENT_BALANCE", "message": "Your wallet balance is too low for this recharge." } }5. Error codes
| HTTP | Code | Meaning |
|---|---|---|
| 400 | INVALID_INPUT / INVALID_CODE | A field is missing or in the wrong format. |
| 401 | UNAUTHORIZED | Key missing, wrong or revoked. |
| 402 | INSUFFICIENT_BALANCE | Wallet too low — top up and retry. |
| 403 | API_DISABLED / IP_NOT_ALLOWED | Access not enabled, or your IP is not on the allow-list. |
| 404 | QR_NOT_FOUND / TXN_NOT_FOUND | No such QR or transaction. |
| 409 | QR_NOT_ACTIVATED | QR exists but the owner hasn't activated it. |
| 422 | PACK_NOT_ALLOWED | This pack isn't enabled for your account. |
| 429 | RATE_LIMITED | Too many requests per minute. |
| 500 | SERVER_ERROR | Retry with the same partner_txn_id — it never charges twice. |
6. Commission & wallet
Example: pack price ₹199, your commission 5% → your wallet is debited ₹189.05 and you keep ₹9.95 from what your customer paid you. Check /balance before peak hours; recharges stop with INSUFFICIENT_BALANCE when the wallet runs low.