All challenges
Multiple ChoiceIntermediate 45s

Idempotency key design

An API charges a credit card. To make retries safe, what should the client send?
Options
  1. 1A server-assigned ID returned in the response, which the client echoes back on the next retry attempt
  2. 2A unique idempotency key per logical operation, which the server records to dedupe retries
  3. 3The client's IP address, which the server hashes to detect a retry and skips a second charge
  4. 4A random key regenerated on every retry, so each attempt looks distinct and is charged once

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle