hard20 pts · first answer countsapi-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?