Zerodha Payment System Design: Why You Cant Withdraw Today @KGPTalkie
Zerodha Payment System Design: Why You Cant Withdraw Today  @KGPTalkie
Uploaded November 2026 | Updated November 2026, 2 days ago
My Latest Udemy Courses for 2027:
Google Antigravity: kgptalkie.com/antigravity
Claude Code: kgptalkie.com/claude-code
OpenAI Codex: kgptalkie.com/openai-codex
Decision AI LLM Fine-Tuning: kgptalkie.com/decision-ai-llm-fine-tuning
---------------

You sell shares for one lakh rupees. That same day, you can trade with every rupee. But try to withdraw it to your bank, and you can't. Not today. Same money, two different answers. In a System Design Interview, you get exactly this question: Design Zerodha Payment System.

Most candidates say "one balance column per user". One number can't separate money you own, money locked in an order, and money the market still owes you.

- Fix 1: money in. UPI, only from your registered bank account. The gateway's callback can arrive twice, so the payment ID is an idempotency key
- Fix 2: a ledger, not a balance. Append-only entries in buckets: settled, blocked, unsettled. Your balance is just a sum
- Fix 3: margin blocking. SEBI has required upfront margin since 2020, so money is checked before the order leaves, and blocked in one atomic step
- Fix 4: T+1 settlement. The clearing corporation becomes the counterparty to every member and nets them. Clients bought ₹10 crore and sold ₹8 crore? You pay in just ₹2 crore
- Fix 5: money out. Only settled money, only to your registered bank. Requested, sent, confirmed, and the bank's reference stops a double send
- The follow-up: where does client money sleep tonight? In 2023, SEBI banned Karvy Stock Broking for seven years. Today no client funds stay with a broker at end of day. So add an end-of-day sweep, and reconcile your ledger, the bank statement and the clearing file every night

Comment and tell me: how long did your last withdrawal take?

This is a standard interview design, not a description of Zerodha's real architecture. The rupee amounts are examples.

kgptalkie.com

#shorts #SystemDesign #SystemDesignInterview #Zerodha #PaymentSystem #T1Settlement #StockMarket #Fintech #LedgerDesign #BackendInterview #InterviewPrep #KGPTalkie
Zerodha Payment System Design: Why You Cant Withdraw TodayRun Claude Code Free on Your Own GPU with a Local Model on Ollama4-Bit KV Cache: 1.4 GB Less VRAM and 10% Faster on Qwen 3.8 27BWhy MTP Made Ornith 35B Slower on Essays #shortsStock Exchange System Design: How Orders Get MatchedSystem Design Interview Concepts 012: Hashing and Base62 IDsLLM Interview 004: Why Hindi Costs More in LLM APIsClaude Usage Tracker System Design: 5-Hour + Weekly LimitsLLM Interview Concepts 006: Tokenizer Quirks in LLMsLLM Interview Concepts 003: Vocabulary Size vs Context WindowQwen 3.8 on Ollama vs Muse Glimmer vs Gemma 4 - Local LLM Coding Test on OllamaLLM Interview Questions: New LLMs and Transformers Course
Laxmi Kant | KGP Talkie |

Zerodha Payment System Design: Why You Can't Withdraw Today

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER