A customer is charged twice. The retry looked harmless in code review.
Context, code, logs and metrics, the same material you would have in production, with nobody pointing at the problem.
No multiple choice and no single right answer: you write what you think is happening, what you would do and what it costs.
The moment you submit, the written solution opens next to your answers, and stays open for you to reread whenever you want.
Checkout does not call the payment provider directly. When an order is confirmed, it publishes a payment.requested event to the Kafka topic payments.requested and returns. A separate service, payments-processor, consumes that topic, calls the PSP over HTTP and records the result in PostgreSQL.
checkout ──▶ payments.requested ──▶ payments-processor (4 instances)
│
├──▶ PSP POST /v1/charges
└──▶ postgres insert into paymentsThe PSP supports idempotency keys: send the same Idempotency-Key header twice and the second call returns the original charge instead of creating another. The team knew this and has used it since day one. The service has been in production for fourteen months.
> The code is in TypeScript because some language had to be picked. The same > handler in Java, Go or Python has the same bug, on the same line.
Locked
Opening a challenge costs 1 credit. A new account starts with 3, no card.