The screen waits while the kitchen has the order
A customer submits an order, but the connection drops before confirmation appears. Unsure of the outcome, the customer tries again. Behind the screen, the first request may already have created an order and sent instructions to the kitchen. A second attempt can produce another order if the system treats it as a new purchase.
This problem precedes payment reconciliation after a transaction. The earlier design decision concerns how an application recognises one business intention when messages arrive repeatedly. Unreliable connectivity needs to be part of the normal operating design.
Separate the business operation from delivery attempts
Idempotency means repeating the same operation does not add a business effect that should occur only once. One operation identity survives across retries. An attempt number may change for monitoring, while the identity representing the customer's intention stays the same.
AWS documentation describes using a caller-provided request identifier to distinguish that intention. Two requests with identical contents are not necessarily duplicates: a customer may genuinely want two identical purchases. Matching baskets or closely spaced timestamps therefore cannot, on their own, establish that an order should be removed.
The product team must define when one intention ends and another begins. Reloading after a timeout differs from deliberately buying again after seeing a successful order. The interface, server, and customer-support process need to share that distinction.
Keys have a scope and a lifespan
Stripe API v1 provides one implementation example. Its documentation states that an initial result is stored after execution starts, with retries using the same key returning that saved result, including certain errors. Keys may be removed after at least 24 hours; reuse following removal can create a new request.
Those are product- and version-specific terms, rather than universal guarantees for payment APIs. Adyen documents key retention of at least seven days. Integration teams must read the contract of the provider actually used and align retry timing with it, including work delayed in queues.
A key also needs an appropriate owner and operation scope. A customer number alone should not identify every purchase that customer makes. Identifiers without personal data help limit sensitive information appearing in integration logs and operational traces.
Protect the entire chain of effects
Preventing duplicate orders is insufficient if stock deductions or production instructions still repeat. Map the effects following order creation: inventory reservations, payments, printed tickets, notifications, and accounting entries. Define how each part recognises work already received or completed.
Recording the identity and making the main change must remain consistent. If an order is stored but its processing record is lost, a retry can create the order again. Application and data teams need to assess transaction and messaging design together; temporarily disabling a button cannot provide the complete protection.
Provider messages can also arrive repeatedly or late. Keep event identities and establish clear rules for status changes. A delayed confirmation should not arbitrarily overwrite a final state already established through another process.
Introduce uncertainty deliberately in testing
Disconnect the client after the server saves an order but before its response arrives. Send simultaneous retries, repeat provider messages, and replay an old job after the retention period expires. Examine the final effects, including stock and payments, rather than counting successful responses alone.
Also test a genuinely new purchase with identical contents, so duplicate protection does not block legitimate business. Agree the expected outcome for every scenario before running it. This creates more useful acceptance evidence than a demonstration of the uninterrupted journey.
Explain uncertainty without inventing an outcome
When the result is unknown, say that the order is being checked and provide a way to inspect the same operation's status. Avoid immediately reporting failure when the server has not established failure. Support staff should be able to trace an operation identifier without telling the customer to pay again indiscriminately.
Monitor prevented duplicates, unresolved operations, and the time needed to establish an outcome. Those measures reveal where the journey still burdens customers. The objective is one traceable order for one purchase intention, even when the network requires several delivery attempts.
Provide a manual resolution route for operations still uncertain after the retry limit. Staff should check evidence in the source system before cancelling, repeating, or confirming them. Record that decision so a late automated job does not repeat the manual action.
- AWS Builders’ Library — Making retries safe with idempotent APIs: intention identifiers and operation consistency.
- Stripe — Idempotent requests: API v1 behaviour and retention, distinguished from API v2.
- Adyen — API idempotency: a contrasting provider contract. Research cutoff: 30 November 2026; retention figures are technical terms, not Indonesian incident statistics.
Published: December 1, 2026




