Tech article

Why Pressing the Button Twice Shouldn't Double Your Bill: Understanding Idempotency

Community description: Have you ever clicked a "Submit Payment" button on an online shop, watched the page freeze, and felt...

Dev.to | Sep 13, 2026 | Saurav Pandey

Automated excerpt

If you get impatient and press that same button ten more times, the system does not dispatch ten separate elevators, nor does it charge the building's electrical system ten times over. The elevator button is an everyday example of an idempotent interface. Without idempotency, the payment gateway would treat each retry as a brand-new transaction, charging your credit card multiple times for a single order.

Selected automatically from source text; not independently written or fact-checked. Read the original for full context.

Read the original article

More tech news