Promptles
Backend & APIs

Idempotency

advanced

Definition

A safety property that means doing the same action twice has the same effect as doing it once. It matters when networks are flaky and the app might accidentally repeat a request: without idempotency, you might end up charged twice for the same thing.

In the wild

You tap 'Pay Now' on a checkout page, the screen freezes, and you tap it again. A well-designed payment system recognizes the second tap as a repeat and quietly ignores it. You only get charged once, no matter how many times you tap.

More from Backend & APIs