This question evaluates a candidate's ability to design concurrency controls, idempotency handling, transactional guarantees, retry and failure semantics, and observability for a payments API to ensure correctness and durability under high concurrency and failures.
You are designing a payments service where multiple clients may initiate payments at the same time against a shared account. The system must maintain a correct balance and prevent double-spending even under failures, retries, and high concurrency.
Design the API and backend to ensure correctness and durability. Cover:
Assume a typical service + database architecture. You may make minimal, explicit assumptions as needed.
Login required