Design Idempotent Peer Payments for WhatsApp Pay on UPI

Last updated: November 29, 2026

Quick Overview

Design the backend for sending money between users in WhatsApp chats in India, where transfers settle through the UPI network via partner banks and responses can be slow, duplicated, or missing.

Meta
System Design
Software Engineer
Meta
November 29, 2026
Software Engineer
Technical Screen
System Design
Medium

0

0

0 solved


Design the backend for sending money between users in WhatsApp chats in India, where transfers settle through the UPI network via partner banks and responses can be slow, duplicated, or missing.

WhatsApp Pay runs on UPI through partner banks, so Meta is an orchestrator rather than the bank. Interviewers check idempotency end to end, a strict state machine, timeout handling with status checks, and keeping the chat experience consistent with the real money state.

What the Interviewer Expects
  • Model the payment state machine explicitly
  • Use client-generated idempotency keys and bank transaction IDs
  • Handle timeouts with status inquiries instead of retries
  • Keep chat messages in sync with payment state
  • Reconcile with partner bank reports
Key Topics to Cover
Payment state machine
Idempotency
Timeouts and status checks
Partner banks
Reconciliation
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • The user taps Pay twice on a slow network: what happens?
  • The bank returns success after your timeout: how does the UI recover?
  • How do you handle a refund if the receiver's bank fails?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: user selects a chat contact, enters amount and UPI PIN, sees pending then success or failure; receiver sees credit message; history view.

Non-functional: never double-charge; fina...

High-Level Design
  • Client creates a payment_id (UUID) before submission and sends it with every retry.
  • Payment service stores the payment with state INITIATED, calls the partner bank adapter to start...

Submit Your Answer
Markdown supported