Fraud Detection
Rule: technically valid is not the same as trustworthy, and blocking too much costs more than
Whole-domain designs where the invariants are the hard part.
View all tagsRule: technically valid is not the same as trustworthy, and blocking too much costs more than
Rule: money moved and the order updated are two facts in two places, and no transaction spans
Rule: payment status says whether a transaction succeeded; only a ledger says where the money
Rule: a provider response and a webhook are external signals, not truth. The only source of
Rule: a payment is a state machine with an idempotency key, never a boolean. paid = true
Rule: reconciliation is a legitimate source of change, not a silent patch. Every repair it
Rule: a refund is a new transaction, not an undo. It has its own state machine, its own
Rule: "payment succeeded" is an intention; settlement is when the money actually arrives.
Open-ended by construction: "design Twitter" has no correct answer, and the interviewer is not