Engineering Hive
Course Home
🔌
Payment API Design & Integration - Quiz
Test your knowledge with 7 questions
Question 1 of 7
easy
A mobile app creates a $100 payment and the network times out before the response arrives. The user taps "Pay" again. How do you prevent a double charge?
A
Check the payment amount before processing
B
The client sends the same idempotency key on retry; the server returns the cached response without re-processing
C
Use a distributed lock on the user's account
D
Implement a 30-second cooldown between payments
← Previous
Check Answer