~learn.
0:00 / 1:43
Side quest 1 · UPI

Your bank took the money. Then the other bank timed out.

transcript

Your bank just took 500 rupees. The other bank isn't answering. So where is your money right now?

Alice pays Bob 500 rupees. The switch asks her bank to debit. The money leaves her account. Then the credit goes to Bob's bank. And the call times out. Maybe his bank is slow. Maybe it worked, and only the reply got lost.

Your instinct says fix it now. Every obvious fix is a guess. Retry the credit? If it already landed, money moves twice. Refund Alice? If it landed, they both have it. Money from nothing. Two-phase commit across both banks? Banks can't hold locks for you.

So UPI doesn't guess. It writes the doubt down. The payment moves to a state called deemed success. Debit done. Credit unknown.

The fast way: a status check to Bob's bank. Same transaction ID. The certain way: the settlement file. Each bank checks its real credits. Credit found? Completed. Paid once, nothing moved twice. Never landed? Alice's debit is reversed automatically.

Meanwhile, Alice's screen says pending. An honest screen for an honest state. Most of these resolve within hours. Credit never landed? The RBI says reverse it by the end of T plus one. Miss that, and the bank owes her 100 rupees a day.

Two exits. Only two. Completed, or reversed. Your money always ends up in exactly one place. Uncertainty isn't an error. It's a state.

Full breakdown in the lecture.