Articles

Designing robust and predictable APIs with idempotency

Feb 22, 2017 Stripe System DesignArchitecture

The article that made idempotency keys a standard expectation for any payments-adjacent API: pass a client-generated key with a request, and retries — from a flaky network, a timeout, a naive retry loop — become safe instead of a double-charge waiting to happen. It's a deceptively simple pattern that solves a real and expensive class of production bugs, and this writeup is still one of the clearest explanations of why "just retry on failure" is dangerous without it. Essential if you're designing any API that touches money or triggers a side effect that can't be undone.

Read the full article ↗

← Back to all articles