惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
MyScale Blog
MyScale Blog
Recent Announcements
Recent Announcements
N
Netflix TechBlog - Medium
GbyAI
GbyAI
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
Martin Fowler
Martin Fowler
腾讯CDC
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
WordPress大学
WordPress大学
P
Proofpoint News Feed
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
System Design: How Does a UPI Payment Reach the Chai Wala...
Khushi Patel · 2026-06-17 · via DEV Community

Imagine this.

You buy a ₹20 chai from your local chai wala.

You open Paytm, scan his QR code, and make the payment.

But here's the interesting part:

  • Your Paytm is linked to HDFC Bank
  • The chai wala's Paytm is linked to SBI
  • The money moves between two completely different banks

And yet...

Within 2-3 seconds both of you receive a notification.

How does this happen so fast?

Let's follow the journey of that ₹20.


Step 1: You Scan the QR Code

The QR code doesn't contain money.

It usually contains information like:

UPI ID: chaiwala@sbi
Merchant Details

When you enter ₹20 and click Pay, Paytm creates a payment request.


Step 2: Paytm Doesn't Transfer Money

Many people think Paytm sends the money.

It doesn't.

Paytm is simply acting as an interface.

The actual money movement happens between banks through UPI.

So the flow looks like:

You
 ↓
Paytm
 ↓
UPI Network
 ↓
Banks


Step 3: Request Goes To NPCI

The payment request is sent to the UPI infrastructure operated by the National Payments Corporation of India.

Think of NPCI as the traffic controller of India's UPI system.

It knows:

  • Which bank owns your account
  • Which bank owns the chai wala's account
  • Where the request should be routed

Step 4: Your Bank Verifies Everything

NPCI forwards the request to your bank.

Your bank checks:

  • Is the account active?
  • Is there enough balance?
  • Is the UPI PIN correct?
  • Is the transaction suspicious?

If everything is valid, the bank approves the debit.

Account Balance = ₹1000
Payment = ₹20

Approved ✅


Step 5: Chai Wala's Bank Gets The Credit Request

Now NPCI forwards the request to the chai wala's bank.

His bank verifies the account and credits ₹20.

Chai Wala Balance
₹500
   ↓
₹520


Step 6: Success Message Everywhere

Once both banks confirm:

  • NPCI marks transaction successful
  • Paytm receives success response
  • Chai wala's Paytm receives success response

Within seconds:

You: Payment Successful ✅

Chai Wala: ₹20 Received ✅


But Wait... Did The Money Actually Move?

This is where things get interesting.

Millions of UPI transactions happen every minute.

Banks don't physically transfer money one-by-one for every chai, samosa, or grocery purchase.

Instead, they maintain settlement records.

Throughout the day:

HDFC owes SBI
SBI owes ICICI
ICICI owes Axis

NPCI keeps track of these obligations.

Later, settlement happens through the banking system in bulk.

This is much faster than moving actual money for every transaction individually.


Why Is It So Fast?

Several engineering decisions make this possible:

Parallel Processing

Banks verify requests simultaneously.

High-Speed Network

NPCI operates highly optimized payment infrastructure.

Lightweight Messages

Only transaction information is exchanged, not huge amounts of data.

Deferred Settlement

Banks settle balances later rather than moving money instantly every time.


Simplified Architecture

You
 │
 ▼
Paytm App
 │
 ▼
NPCI UPI Switch
 │
 ├─────────────► Your Bank
 │                    │
 │                    ▼
 │              Debit Money
 │
 ▼
Chai Wala Bank
 │
 ▼
Credit Money
 │
 ▼
Success Response

All of this happens in just a few seconds.


Key Takeaway

When you pay ₹20 to a chai wala:

  • Paytm is only the interface.
  • NPCI acts as the traffic controller.
  • Your bank debits the amount.
  • The merchant's bank credits the amount.
  • Settlement between banks happens later.
  • Optimized infrastructure allows the entire process to complete in seconds.

The next time you hear that familiar "Payment Received" sound from the chai wala's phone, remember:

Behind that simple beep, multiple systems, banks, servers, and networks coordinated in real time to move money across the country.