← Back to problems

49. Idempotent Payment Charge API

MEDIUM
SecuritySystem Design

Design a payments REST contract that's safe to retry after a timeout - no double-charging a customer.

Design the REST API for a payment charging service. Clients sometimes lose the response to a request (network timeout, dropped connection) and retry - the API must be safe to retry without ever charging a customer twice. No architecture diagram or database schema required - focus entirely on the API contract.
Log in to submit a solution

Comments

Log into join the discussion.