Eko Platform Services Logo

UPI Cash Withdrawal

Generate a single-use UPI QR for the withdrawal amount, show it to the customer, then poll the status API on the returned schedule — hand over cash only when `tx_status` is "0".

Product & pricing: UPI Cash Withdrawal

  1. 1

    Validate the amount first (₹100–₹5,000, multiples of ₹100, no paise), then send it with the retailer's live GPS fix. Render `qr_string` as `data:image/png;base64,…` for the customer to scan from a second device, and persist `tid`. A QR means no money has moved yet. Never show a QR twice or re-initiate against the same `tid`. On a timeout with no `tid`, the customer never saw a QR: wait out its ~60 s validity and start a new transaction.

    If response_type_id is 99012 — skip to step 2, UPI Cash Withdrawal Status. QR issued — wait `status_check_start_in` seconds, then poll.

    If response_type_id is 99014 — the flow is complete. Initiation failed — stop, do not dispense. Log and show `data.description`.

    If response_type_id is 99015 — the flow is complete. Invalid amount — stop, fix the amount; nothing to poll.

    If response_type_id is 99016 — the flow is complete. Not enabled for this retailer — stop; a provisioning task, retrying won't help.

  2. 2

    Poll by `tid` every `status_check_gap` seconds, at most `status_check_attempts` times. Compare `data.tx_status` to the string "0"; anything else — "1", "2", an unknown value, a timeout — is NOT paid. Pending `response_type_id` (99019) after the last scheduled poll: stop, treat as not paid, re-query once after a few minutes, and escalate to Eko support with `tid` if still pending after ~30 minutes.

    If response_type_id is 99013 — the flow is complete. Paid — dispense the cash and store `bank_ref_num`.

    If response_type_id is 99018 — the flow is complete. Failed — nothing debited; do not dispense.

Flow at a glance

response_type_id 99012on type 99012response_type_id 99014on type 99014response_type_id 99015on type 99015response_type_id 99016on type 99016response_type_id 99013on type 99013response_type_id 99018on type 990181. POST Generate UPI QR for Cash WithdrawalPOSTGenerate UPI QR for Cash Withdrawal2. POST UPI Cash Withdrawal StatusPOSTUPI Cash Withdrawal Statusdone
on type N — the response's response_type_id is N