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
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_idis99012— skip to step 2, UPI Cash Withdrawal Status. QR issued — wait `status_check_start_in` seconds, then poll.If
response_type_idis99014— the flow is complete. Initiation failed — stop, do not dispense. Log and show `data.description`.If
response_type_idis99015— the flow is complete. Invalid amount — stop, fix the amount; nothing to poll.If
response_type_idis99016— the flow is complete. Not enabled for this retailer — stop; a provisioning task, retrying won't help. - 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_idis99013— the flow is complete. Paid — dispense the cash and store `bank_ref_num`.If
response_type_idis99018— the flow is complete. Failed — nothing debited; do not dispense.
Flow at a glance
on type N — the response's response_type_id is N