API Design · Middle · Question 40 of 75
Why should webhook handlers be idempotent?
- 1Webhooks are always delivered exactly once
- 2Idempotency makes webhooks faster
- ✓Correct answer: Providers retry on timeouts and errors, so the same event can arrive several times; handlers should dedupe by event ID
Explanation
Store processed event IDs, or make the effect naturally idempotent (e.g. set status rather than increment).