Idempotency in Integrations
Idempotency is a useful word for a simple, important idea: doing the same thing twice should not cause a problem. In integrations this matters because messages occasionally arrive more than once, and you never want a customer charged twice or an order created in duplicate.
This article explains the concept and how we use it to keep your data safe.
Why It Matters
Networks are imperfect, so duplicate messages are a fact of life we plan around.
- A webhook might be delivered twice.
- A retry after a timeout could repeat an action.
- Without protection, that means double orders or charges.
- Idempotency makes the repeat harmless.
How We Achieve It
We give each action a fingerprint so we can recognise a repeat.
- Attach a unique key to each request.
- Record which keys have already been processed.
- Ignore any request whose key we have seen.
- Return the original result instead of repeating it.
Frequently Asked Questions
Is this only relevant to payments?
No. It matters anywhere a repeated action could cause harm, such as creating orders, sending emails or updating stock.
If you need a hand with any of this, your Progressive Robot delivery team is ready to help. Raise a ticket from the Support area of your client portal or speak to your account manager and we will guide you through the next steps.