hardStudy question · answer published in REST API interview questions, so no pointsapi-designreliability
Preventing double charges on retry
The checkout page sends POST /api/payments. The request times out on a slow network, the client retries, and the customer is charged twice. What is the most robust fix?
Discussion 0
Join free to post in the discussion.
Related questions
- Status code after creating a resourceFull Stack Developer
- Which method is idempotentFull Stack Developer
- PATCH vs PUT for one fieldFull Stack Developer
- Posts vanish from GET linksFull Stack Developer
- URL for a user’s ordersFull Stack Developer
- Dates sent through JSONFull Stack Developer
- Response for an empty listFull Stack Developer
- Offset vs cursor paginationFull Stack Developer