Payment cascading without double charge
Design a payment-routing layer that, on a soft decline from one PSP, cascades the same charge to a second (and third) PSP to recover the sale — 'decline recovery / payment cascading' — while guaranteeing the customer is charged at most once even though the same payment is attempted across multiple processors. ~5,000 charges/sec, each potentially hitting 1–3 PSPs. The danger: PSP A times out (you don't know if it charged), you cascade to PSP B which succeeds, and later PSP A's charge also lands — double charge. How do you cascade safely?
What a strong answer looks like
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.
Clarify5:00 left
Estimate5:00 planned
Design15:00 planned
Deep dive12:00 planned
Failure8:00 planned
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.