Home
Idempotency

Idempotency

API Design

Definition

A property of an API operation where the result is the same whether you make the call once or multiple times.

Why It Matters

If a user clicks 'Pay' twice, you don't want to charge them twice. Idempotency ensures that the second request is recognized as a duplicate and ignored.

How It Works

  • 1

    The client sends a unique `Idempotency-Key` header with the request.

  • 2

    The server checks if it has seen this key before.

  • 3

    If yes, it returns the cached response.

  • 4

    If no, it processes the request and saves the key.

The NetForce Take

Mandatory for any financial or mission-critical system we build. We assume networks are unreliable and users will double-click.

Ready to build
real systems?

Book a discovery call. If we're a fit, we'll start your free Proof of Concept immediately.

Next.js • React • Node.js • Python • AWS • AZURE • Vercel