---
answer: direct
beat: backend-engineering
source: 1 article · updated: November 15, 2026
---

How does an Idempotency-Key header protect payment endpoints from double-charging?

When a client initiates a POST mutation, it passes a unique UUID in the Idempotency-Key header. The server acquires an atomic lock in Redis, stores the result, and if the client retries due to a network timeout, the server returns the cached response without re-executing the charge.

Answered in

Modern REST API Design: Noun-Based Resources, Idempotency Keys, Cursor Pagination, and Security Hardening

An architectural guide to designing production REST APIs: idempotent mutations, cursor pagination, status code precision, and zero-trust security.

Crashtech Editorial November 15, 2026 Backend Engineering

Read the full analysis

Other questions this article answers

More backend engineering questions

Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the Backend Engineering beat.