How a bank or payment app can use AI to handle failed and disputed UPI payments faster, without letting a language model decide anyone’s money.
Complexity: MediumPattern: Agentic workflow + RAGHuman-in-the-loop: YesUpdated: Dec 2026
Architect’s summary: the assistant listens, checks the real transaction status through the bank’s systems and NPCI’s dispute APIs, explains the rules in plain language and drafts the next action. Deterministic rules calculate timelines and compensation; the LLM only explains and drafts; a human approves anything outside the standard path. That split is what makes it safe enough for payments.
Reference architecture. Solid arrows show the request path; the rules engine, not the model, decides timelines and compensation.
1Business problem & KPIs
A customer pays ₹2,400 at a pharmacy. The app shows “pending”, money leaves the account, the merchant says it never arrived. The customer calls the bank, gets transferred twice and is told to “wait 2–3 days”. Multiply that by thousands of cases a day and you have a cost problem, a trust problem and a regulatory problem.
Most of these cases are not complex. They need the same three things: the true status of the transaction, the rule that applies, and a clear next step. That is exactly the work an AI assistant can take off human agents, while people handle the genuinely disputed cases.
KPIs to track
KPI
Why it matters
Share of “where is my money?” queries resolved without an agent
The main cost lever
Average handling time for agent-handled disputes
Agents start from a prepared case, not from scratch
Cases breaching the regulatory turnaround time
Breaches mean compensation and regulator attention
Escalations to the RBI Ombudsman
A lagging signal of failed redressal
Wrong-answer rate on audited conversations
Trust: an AI that misstates rules is worse than none
Customer satisfaction after resolution
Confirms speed did not come at the cost of clarity
2Users & channels
Customers: in the bank or UPI app chat, WhatsApp, and IVR with speech, in English and major Indian languages.
Customer-care agents: a copilot panel inside the existing CRM, showing status, applicable rule, draft reply and recommended action.
Disputes / operations team: queues for cases that need investigation, chargeback or merchant follow-up.
Compliance & audit: read-only access to decisions, explanations and evidence trails.
3Data, sensitivity & regulation
Data
Source
Sensitivity
Transaction details and status
Bank UPI switch, core banking, NPCI dispute APIs
High: financial + personal
Customer identity and contact
CRM / customer master
High: personal data
Complaint history
Case management system
Medium–high
Rules, timelines, SOPs
RBI/NPCI circulars, internal policy
Low (but must be current)
Rules the design must respect
Turnaround time and compensation: RBI’s 2019 circular on harmonised TAT sets outer limits for failed transactions. For UPI, where the account is debited but the beneficiary is not credited, the beneficiary bank must reverse by T+1, with ₹100 per day compensation beyond that, credited without the customer having to claim it.
Online dispute resolution: RBI’s August 2020 circular asked payment system operators and participants to offer online dispute resolution for digital payments.
NPCI UDIR: NPCI’s Unified Dispute and Issue Resolution lets banks and apps check transaction status and raise or track disputes through APIs; this is the assistant’s main integration point.
Escalation: customers not redressed within the TAT can complain under the RBI Integrated Ombudsman Scheme, 2021.
Personal data: design for India’s Digital Personal Data Protection Act, 2023: collect only what each step needs, keep data in approved locations, and log access.
Architect’s rule: regulations change. Store rules as versioned, dated configuration owned by compliance, not inside prompts, and cite the rule version in every decision record.
4Capability view (Architecture Building Blocks)
Capability
What it does
Omnichannel conversation
Chat, WhatsApp and voice in multiple languages, one conversation state
Identity & consent
Authenticate the customer, confirm consent to look up transactions
Conversation orchestration
Understand intent, collect missing details, call tools in the right order
Transaction status integration
Query switch, core banking and UDIR for the real status
Policy knowledge (RAG)
Retrieve the applicable rule and SOP text with citations
Decision rules engine
Compute TAT, eligibility and compensation deterministically
Case management
Create, update and route cases; human approval queue
Traces, quality scoring, decision logs for compliance
5Solution view (Solution Building Blocks)
One open-source and one managed option per capability. Pick per your bank’s platform standards; the architecture does not depend on any single vendor.
Capability
Open-source option
Managed option
Orchestration
LangGraph or a similar state-machine agent framework
Your cloud provider’s agent / workflow service
Language model
Open-weight model hosted in an approved region
Hosted LLM API with India data residency and enterprise terms
Policy retrieval
PostgreSQL + pgvector with hybrid search
Managed search / vector service
Rules engine
Drools or a versioned rules table in the bank’s own service
Commercial business-rules management system
PII protection
Microsoft Presidio for detection and masking
Cloud data loss prevention service
Guardrails
NVIDIA NeMo Guardrails or Guardrails AI
Cloud content-safety / guardrail service
Observability
OpenTelemetry + Langfuse
Managed LLM observability platform
Speech (IVR)
Open speech models fine-tuned for Indian languages
Cloud speech-to-text / text-to-speech with Indian language support
6End-to-end flow
CustomerApp chat, WhatsApp or IVR: “₹2,400 debited, merchant didn’t get it”
OrchestratorAuthenticates, identifies the transaction (UTR / RRN, date, amount)
Status toolsSwitch + core banking + NPCI UDIR status check
Rules + policyRules engine computes TAT and compensation; RAG fetches the rule text
ActionExplain, raise or track dispute, notify; exceptions go to a human queue
Across every step: PII masking · prompt-injection defence · rule-versioned decision log · traces & quality scoring
Request path in detail
Customer authenticates in the channel; the assistant confirms consent to look up their transactions.
The orchestrator extracts the transaction reference, or lists recent UPI transactions for the customer to pick from.
Status tools return the authoritative state: success, failed, pending, reversed, or already in dispute.
The rules engine decides what applies: within TAT (inform and set a reminder), auto-reversal due (track), or breached (compensation and escalation).
The LLM writes a short, plain-language explanation using only the tool results and the retrieved rule text, with the rule cited.
If a dispute is needed, the assistant raises it through UDIR with the customer’s confirmation and shares the reference number.
Anything outside standard paths (fraud claims, merchant disputes, mismatched data) becomes a prepared case for a human agent.
Every step writes to the decision log: inputs, tool results, rule version, output and who approved.
Design choice: the LLM never sees a “refund” tool. Money-moving actions stay in core systems, triggered by rules or by a human, never by a model’s judgement.
7Non-functional design
Latency: status lookups in parallel; target a first useful reply within a few seconds in chat and stream the explanation. Voice needs tighter budgets and short answers.
Scale: UPI volumes spike at month-end, salary days and festival sales. Autoscale the orchestrator, cache policy retrieval, and protect core systems with rate limits.
Availability: if the LLM is down, fall back to a menu-driven status flow; status checks and dispute raising must still work.
Security: least-privilege service accounts per tool, read-only by default; secrets in a vault; no customer data in prompts beyond what the step needs.
Audit: immutable decision records retained per the bank’s record-keeping policy, searchable by case and by rule version.
Languages: test each supported language with real customer phrasing, including Hinglish and code-mixed speech.
8Risks & failure modes
Risk
How it shows up
Mitigation & detection
Wrong rule stated
Assistant quotes an outdated timeline
Rules as dated config; answers must cite rule version; weekly audit sample
Hallucinated status
“Your refund is processed” when it is not
Status text only from tool results; output check blocks status claims without a tool call
Prompt injection
Merchant name or remarks field contains instructions
Treat transaction text as data; strip and escape; no write tools exposed to the model
Social engineering
Fraudster tries to get details of someone else’s payment
Strong authentication; only the customer’s own transactions; refuse and log
Over-automation
Genuine fraud claims handled as routine failures
Fraud keywords and patterns route to humans; never auto-close fraud
Core-system overload
Spikes cause timeouts and retries
Caching, circuit breakers, queue-based retries, status of the status service on a dashboard
9Phased rollout
Phase 1 · Agent copilot (6–8 weeks)Inside the CRM only. Status lookup, rule explanation, draft replies. Agents send everything. Build the evaluation set from real cases.
Phase 2 · Customer self-serviceChat in the app for status and “where is my money” queries, in English and 2–3 languages. Disputes raised with confirmation. Human hand-off one tap away.
Phase 3 · Proactive & voiceNotify customers before they ask when a failure is detected; IVR in more languages; analytics on root causes shared with operations and partner banks.
Gate each phase on measured quality: wrong-answer rate, escalation accuracy and TAT breaches must stay at or better than the human-only baseline.
10Build vs buy
Buy the commodity layers: speech, channel connectors, observability, and possibly the LLM API under enterprise terms.
Build what is specific to you: the rules configuration, integrations with your switch and core banking, the evaluation set, and the agent’s tool layer. This is where your compliance knowledge lives.
Watch out for “dispute bot” products that bundle their own rules: you still own regulatory accuracy, so insist on configurable, auditable rules and full decision logs.
Sources for the regulatory facts
RBI circular RBI/2019-20/67, “Harmonisation of Turn Around Time (TAT) and customer compensation for failed transactions using authorised Payment Systems”, Sept 20, 2019 (rbi.org.in).
RBI circular on Online Dispute Resolution (ODR) System for Digital Payments, Aug 6, 2020, as referenced in NPCI circulars (npci.org.in).
NPCI Unified Dispute and Issue Resolution (UDIR) circulars and API documentation (npci.org.in).
The Reserve Bank – Integrated Ombudsman Scheme, 2021 (rbi.org.in).
Digital Personal Data Protection Act, 2023 (meity.gov.in).
This blueprint is an educational reference architecture, not legal or compliance advice. Always confirm current rules with your compliance team.