Skip to content

SYSTEM Cited by 1 source

Stripe API

What it is

The Stripe API is a public REST API for payment processing. Beyond its product role, it is widely cited in API-design literature as a canonical reference implementation of several API patterns — in particular the Idempotency-Key header contract for safely retrying non-idempotent writes.

Why it shows up in retry / idempotency guidance

Zalando's timeouts post links directly to Stripe's public documentation as a canonical reference for the idempotency-key pattern:

"For safely retrying requests without accidentally performing the same operation twice, consider supporting additional Idempotency-Key header in your API. … You can read more about this idempotency pattern here Idempotent Requests by Stripe …" (Source: sources/2023-07-25-zalando-all-you-need-to-know-about-timeouts)

Key idempotency properties

From Stripe's documentation:

  • Clients supply Idempotency-Key: <value> on any POST request.
  • Stripe caches (key, request_hash, response) and deduplicates replays with the same key.
  • Retention window: 24 hours. After 24 hours the key may be recycled.
  • Mismatched request body with the same key produces an error rather than a silent second execution.
  • The key is scoped per Stripe account / API key.

Stripe also publishes a companion article, Designing robust and predictable APIs with idempotency, that walks through the engineering behind their implementation (atomic operation-phase tracking, recovery-point-based retry-on-crash safety).

Seen in

Last updated · 550 distilled / 1,221 read