The happy path is the minority feature
An approved, undisputed, settled payment needs almost no engineering attention. The failure paths are where the work lives, and there are exactly three families of them.
- The payment never happens: declines, at authorization time.
- The payment is challenged before it happens: authentication, where a suspicious transaction is forced through an extra identity check.
- The payment happens and is then unwound: disputes and chargebacks, up to months later.
Each family has its own machinery, its own economics, and its own rulebook, and they trade off against each other. Decline more and you lose real sales along with the fraud. Authenticate more and you add friction that kills conversion. Accept more and the chargebacks arrive later with fees attached.
A payments team is permanently tuning the three dials against each other, and everything in this lesson is the mechanics behind one of the dials.

