← Quiz: API Design: all 15 questions
Quiz: API Design · Question 5 of 15
The payment request succeeded but the response was lost, and the app retries with the same idempotency key. What should…
The payment request succeeded but the response was lost, and the app retries with the same idempotency key. What should the server do?
- A.Charge again, because it is a new request
- B.Return 500 so the user tries later
- C.Return the saved result of the first request without charging again
- D.Delete the first payment and charge again
Answer & explanation
Correct answer: Return the saved result of the first request without charging again
The key identifies the attempt; a repeat gets the stored response.
Can you get the rest right without peeking?
Take the timed Quiz: API Design quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →