Skip to content
TeachTrails
System DesignInterviews

Design a Payment System (UPI, Stripe): Idempotency and Ledgers

Design a payment system like Stripe, Razorpay or a UPI app: payment states, idempotency keys, double-entry ledgers, webhooks, retries and reconciliation.

Sudipta Biswas, AI Engineer

13 min read

Beginner friendly
DESIGN A PAYMENT SYSTEMNever charge twice, never lose a rupee, and prove it every day.1Create paymentidempotency key2Call providercard, UPI, wallet3Confirmwebhook / poll4Ledgerdebit = credit5Reconcilematch the bankStripe, Razorpay, PayPal, UPI apps, checkout at Amazon, Flipkart, Swiggy and Uber

Checking your access…