Glossary

Idempotency key

An idempotency key is a unique value a client sends with a request so the server can recognise a retry of the same work and not do it twice.

Last checked

Why it matters for a B2B SaaS product

Networks fail and workers restart, so any call that records usage or moves money will sometimes be sent twice. Without a key, a retry double counts.

The key should name the unit of work, for example a job or request id, so every retry of that work carries the same value.

How TenancyEngine handles it

Usage calls accept an idempotency key. A repeat with the same key is recognised as a replay and is not counted again. The metering guide shows how to choose the key.

Sources

More terms