System Design Lab / Workbench / Challenges

Payments & commerce · Beginner · about 3 min

Stop a duplicate payment

A customer tapped Pay ₹500 once, but ₹500 was taken twice. Can you stop the second one?

Start the challenge →

What breaks

  1. Customer taps Pay ₹500
  2. Bank takes ₹500 (receipt #1)
  3. The "paid" reply is lost on the way back
  4. The app hears nothing and tries again
  5. Bank takes ₹500 again (receipt #2) ✗

Your job: keep the automatic retry (it helps when the signal drops), but make sure a repeat does not take the money again.

What you do

  1. Press Run and watch the money get taken twice.
  2. Tell the bank how to spot a repeat of the same payment.
  3. Run again: the money should be taken once, and the customer still sees "paid".
  4. Pass the hidden checks too: a new payment still works, two quick taps pay once, and a repeat with a changed amount is refused.

Runs in your browser. No sign-up needed. Made-up IDs; you can share a link that replays your attempt.