Docs / API reference

API reference 5 endpoints INR / paise

Wallet and UPI payments API

Read your workspace wallet balance and transactions, add demo credits in demo workspaces, create UPI QR payment requests and submit UTRs.

Wallet

GET /api/wallet Session required · 200 OK

Returns the current wallet balance in paise and the 20 most recent transactions.

{
  "balance_paise": 476000,
  "currency": "INR",
  "transactions": [
    {
      "id": "wallet-topup-1",
      "kind": "credit",
      "amount_paise": 100000,
      "description": "Demo top-up",
      "reference": "DEMO-TOPUP-1",
      "created_at": "2026-12-01T18:00:00+00:00"
    }
  ]
}
POST /api/wallet/topups Demo workspace only · 201 Created

Adds sample credit (`10000` to `10000000` paise) inside a demo workspace. Passing an optional request_id ensures retries are idempotent. Business accounts receive 403 and use UPI payments instead.

curl -s -b cookies.txt -X POST https://dhvani.aware.co.in/api/wallet/topups \
  -H "Content-Type: application/json" \
  -d '{"amount_paise":100000,"request_id":"req_001"}'

UPI payments

GET /api/payments Session required · 200 OK

Returns whether UPI payments are active (`upi_ready`), payee display name and the workspace's payment requests. Open or rejected payments include upi_link, qr_svg, payee_name and vpa.

POST /api/payments Business account · 201 Created

Creates a UPI payment request (`amount_paise` 10,000 to 10,000,000) with a unique payment reference, UPI deep link and SVG QR code. Returns 403 for demo workspaces, 503 if UPI checkout is not enabled, and 429 if 5 unpaid requests are already open.

curl -s -b cookies.txt -X POST https://dhvani.aware.co.in/api/payments \
  -H "Content-Type: application/json" \
  -d '{"amount_paise":50000}'
POST /api/payments/{payment_id}/utr Business account · 200 OK

Submits the 12-digit UTR from your UPI app for a payment in awaiting_payment or rejected status, moving it to submitted for verification. Rejects duplicate or invalid UTRs with 422.

curl -s -b cookies.txt -X POST https://dhvani.aware.co.in/api/payments/pay-123/utr \
  -H "Content-Type: application/json" \
  -d '{"utr":"412345678901"}'