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.

Get API keys

1. Get started

  1. Sign up as a partner. Our team enables API access and sets your commission.
  2. Add money to your wallet (bank transfer for now — the team credits it).
  3. Create a sandbox key (qrk_test_…) in Partner portal → API. Sandbox calls never charge or recharge.
  4. 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

GET/packsPacks you can sell, with your price, commission and wallet debit.
GET/qr/{code}Check a QR: exists, activated, masked name and current balance.
POST/rechargeRecharge a QR. Body: code, pack_id, partner_txn_id. Applies instantly.
GET/recharge/{partner_txn_id}Status of a recharge — use for retries and reconciliation.
GET/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

HTTPCodeMeaning
400INVALID_INPUT / INVALID_CODEA field is missing or in the wrong format.
401UNAUTHORIZEDKey missing, wrong or revoked.
402INSUFFICIENT_BALANCEWallet too low — top up and retry.
403API_DISABLED / IP_NOT_ALLOWEDAccess not enabled, or your IP is not on the allow-list.
404QR_NOT_FOUND / TXN_NOT_FOUNDNo such QR or transaction.
409QR_NOT_ACTIVATEDQR exists but the owner hasn't activated it.
422PACK_NOT_ALLOWEDThis pack isn't enabled for your account.
429RATE_LIMITEDToo many requests per minute.
500SERVER_ERRORRetry 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.