Skip to content
Hard Design: Payment System (Stripe/PayPal)

Two concurrent requests with the same idempotency key arrive simultaneously. How do you handle this?

— Tests your understanding of this concept.

Answer Options

A Process both, take the first result
B Use Redis SETNX to acquire a lock — only one request processes, the other waits and returns the cached result
C Return error to both
D Process both and reconcile later

Want to see the correct answer?

Get the answer with a detailed explanation, plus practice 22+ more Design: Payment System (Stripe/PayPal) questions with adaptive quizzes and timed interviews.

See the Answer on Guru Sishya →

This question is from the Design: Payment System (Stripe/PayPal) topic (System Design Cases).

More Design: Payment System (Stripe/PayPal) Questions