The happy path works. What if payment fails?

Answer it out loud before you open anything. The value of the flags below is in comparing them to what you actually said — including whether you asked who uses it before naming what you would build it with.

The situation behind the question

A candidate has just walked through checkout for the online store: cart → create order → charge card → mark paid → send email. The interviewer says "good — now the card is declined. Then the provider times out. Then the customer double-clicks Pay."

What it is really testing

Whether the candidate models failure after the happy path rather than skipping it, and whether they distinguish a failure the system knows about (declined) from one it does not (timeout) and from a repeated request (double-click) — three different problems that a single "handle errors" does not cover.

Where the move is taught