Payments Engineering in India — From UPI to Ledgers
A practical course for engineers who build payment systems in India. Learn how UPI and cards really work, integrate a payment gateway the right way, handle pending payments and webhooks, design a double-entry ledger, do reconciliation, and stay safe with fraud and RBI rules.

Every app in India takes payments now. Food delivery, ed-tech, D2C brands, SaaS tools, even your society maintenance app. And almost every team I have worked with learnt payments the hard way: a customer gets charged twice, money gets debited but the order shows “failed”, the finance team finds a ₹3 lakh gap at month end and nobody knows where it went.
The payment gateway’s docs tell you which API to call. They don’t tell you what to do when the webhook comes 40 minutes late, how to store money in your database, or how to explain a ₹12,000 mismatch to your CFO. This course covers that part.
What This Course Covers
| # | Lesson | What you will learn |
|---|---|---|
| 1 | How Money Moves in India | The players, the payment rails, and the difference between authorisation and settlement |
| 2 | UPI for Engineers | Intent, QR, collect, AutoPay, and how to handle pending and failed payments |
| 3 | Card Payments Explained | Authorisation, capture, 3D Secure, tokenisation, and why you can’t store card numbers |
| 4 | Integrating a Payment Gateway the Right Way | Orders, checkout, signature checks, and a flow that does not lose payments |
| 5 | Idempotency, Retries and Webhooks | How to make sure nobody gets charged twice, and nothing gets missed |
| 6 | The Payment State Machine | Modelling payment status properly, and handling “pending” without upsetting customers |
| 7 | Designing a Double-Entry Ledger | How to store money so every paisa can be explained |
| 8 | Refunds, Chargebacks and Disputes | Full and partial refunds, card chargebacks, UPI disputes |
| 9 | Settlement and Reconciliation | Matching your records, the gateway’s records and the bank’s records |
| 10 | Recurring Payments and Mandates | Subscriptions with UPI AutoPay and e-mandates, under RBI rules |
| 11 | Fraud, Security and Compliance | PCI DSS, data localisation, fraud patterns, and risk rules |
| 12 | Capstone: Payments for a Real Product | A full design for a D2C brand, plus a launch checklist |
Who Is This For?
- Backend engineers who have to add payments to a product
- Engineers who already have payments live and keep getting “money debited, order not placed” tickets
- Tech leads and architects designing a payments or wallet system
- Anyone preparing for fintech interviews
Prerequisites
- Comfortable with one backend language. Code examples are in Python, but they are simple and easy to port
- Basic SQL and REST APIs
- No finance background needed. I will explain every term (MDR, settlement, chargeback, nodal account) when it first comes up
A Small Note on Rules
Payments in India are regulated by RBI and NPCI, and the rules change every few months: limits, timelines, fee rules, mandate rules. I have tried to explain the why behind each rule, because that lasts longer. But for exact numbers and dates, always check the latest RBI and NPCI circulars and your payment gateway’s documentation before you go live. Treat the numbers in this course as examples, not legal advice.
Let’s start with the basics: who is involved when a customer pays you ₹499.