A customer pays for an order. The payment provider sends a webhook, your handler validates it, and the payment is committed to the database. The order is ready to ship.
Then the connection drops. Your 200 OK never reaches the provider.
Your application knows the payment was recorded. The provider has no way to tell. If it supports retries, it will send the same event again. Without protection against duplicates, your handler might award loyalty points twice or queue a second shipment.
It is tempting to blame the retry. But remove it, and the next connection failure could leave you with a payment event that never reaches the store at all.
This is where at-least-once delivery matters. To see what it takes in practice, we will follow one payment webhook through a lost response, a retry, and a process restart—and look at what each part of the integration needs to preserve.
One payment, two delivery attempts
Suppose the provider assigns the event ID evt_7421. The identifier and order number below are illustrative; actual event formats depend on the provider.
Event evt_7421: order 1842 has been paid
Attempt 1 → store records payment → response is lost
Attempt 2 → store receives evt_7421 again
The second request reports the same payment. The provider is trying again because it never received confirmation of the first attempt.
A timeout leaves several possibilities open. The request might never have reached the store. The handler might have crashed before writing to the database. Or it might have committed the payment and lost the connection before returning a response. From the sender's perspective, those outcomes can look identical.
That uncertainty is the reason for the retry. A failed delivery attempt does not prove that the recipient did nothing.
Duplicates are therefore an expected part of recovering from failures. A production handler needs to account for them even when every component is behaving as designed.
What “at least once” commits to
At-least-once delivery means a message reaches its recipient one or more times under the system's stated operating assumptions. Receiving the same message again is allowed.
Our store cannot assume that each incoming HTTP request represents a new payment. It may be another attempt to report a payment the store already knows about.
The operating assumptions matter. The message must be accepted and retained, the recipient must become available, and the delivery system must be able to keep making progress. Real services also have retry limits and retention periods. Three or ten attempts alone do not establish an unconditional at-least-once guarantee: if the store stays down until the attempts run out, automatic delivery can end in failure.
When evaluating a delivery guarantee, ask where responsibility begins. What has been saved when the sender receives an acknowledgment? What survives a restart? How are retries scheduled, and what happens when they stop?
By comparison, at-most-once delivery allows a message to be lost while avoiding repeat delivery. Stop after the uncertain first attempt at evt_7421, and there will be no second delivery. The store may also never learn about the payment.
For payments, orders, and other events that affect business state, another chance to deliver is valuable. The recipient needs to make that chance safe.
Make the second attempt safe
When evt_7421 arrives again, the store should recognize the payment it has already recorded and acknowledge the request without awarding more points or creating another shipment job.
That is the purpose of idempotent processing: handling the same event again produces no additional business effect.
A stable event ID from the provider is often a suitable starting point. Scope it to the relevant source and account; identical ID strings from separate integrations may refer to different events. An ID generated afresh for each incoming request will not help, because a retry gets a different one.
Comparing payloads is unreliable, too. Two separate payments can share an amount, currency, and list of items. The handler needs to establish which event it is processing.
Even with a stable key, a simple “check whether this ID exists” leaves a race. Two attempts can arrive together, both find no record, and both proceed. The decision needs atomic enforcement, such as a database uniqueness constraint.
For work contained in one database, the store can register the event, record the payment, and persist any follow-up job in a single transaction. If the transaction rolls back, another attempt can do the work. If it commits, the next attempt finds the event already accepted.
Keeping those writes together matters. Mark the event as processed first and update the order in a separate step, and a crash between them can leave an unpaid order attached to a “processed” event. Every later retry skips the very work it was supposed to recover.
External effects need their own protection. A transaction in the store's database cannot, by itself, ensure that a shipping provider creates a shipment only once. That step needs a recovery mechanism as well: for example, a persisted job and a stable operation key supported by the shipping API. Follow the duplicate protection through to the action the webhook is meant to trigger.
We cover event keys and duplicate handling in more detail in Why webhooks need idempotent processing. For delivery, the relationship is straightforward: retries provide another opportunity to deliver an event; idempotency makes that opportunity safe for the application.
What survives an acknowledgment?
Now change the first attempt. The store receives evt_7421, returns 200 OK, and hands processing to a background task held in memory. A second later, the process restarts.
The provider received its acknowledgment and considers delivery complete. The payment has not reached the database. The background task disappeared with the process.
Duplicate handling cannot recover this event. The missing property is durability: accepted events and their processing state must survive the failures the architecture is designed to tolerate.
An acknowledgment should follow a durable handoff. That might be a committed transaction containing the event and its pending work, or a confirmed write to a queue with the required persistence guarantees. The handler can defer slow processing, provided the data and a way to resume the work are already in place.
Validate → durably save the event and pending work → return 2xx
↓
continue processing separately
Writing a log line or starting a background function does not establish that handoff. Calling something a queue is not enough, either. Its persistence settings and the meaning of its acknowledgment determine what has actually been protected.
Durability has defined limits. It does not imply indefinite storage or survival of every possible failure. You need to know which failures the storage handles, how processing resumes, and how long the data remains available.
For evt_7421, the practical question is simple: after acknowledging the request and restarting, can the system find the event and finish the work without asking the payment provider to send it again?
Give retries room to work
Suppose the store is unavailable before the request arrives. A deployment is in progress, the database is restarting, or the server cannot be reached. The delivery system has retained the event and is waiting to try again.
Sending requests continuously rarely helps. If the database needs several minutes to recover, hundreds of attempts per second will not bring it back sooner. The extra load can make recovery harder.
A useful retry policy spaces out attempts, controls delivery volume, and exposes the final outcome. If the attempts run out, the team needs to know and be able to reconcile the event against the store's records and the provider's data. Quietly abandoning delivery leaves the paid order unresolved.
Retries do not establish event order, either. While the payment event waits for another attempt, a later event may arrive first. Order updates need to respect valid state transitions and the provider's event semantics.
The store also needs to remember processed event IDs for as long as duplicates may reasonably return, including during recovery procedures. Forget evt_7421 too soon, and the next copy can look new. Where appropriate, protect the business operation itself as well—for example, by enforcing uniqueness for a particular payment record.
Where Adal Cloud fits
With Inbound, a public Server in Adal Cloud receives the webhook independently of the store's handler. Delivery then follows the configured route:
Payment provider → Server in Adal Cloud → delivery → store handler
The receipt and attempt history remain available when the store is down. Open the request details to inspect a recipient's HTTP status and error. A successful delivery result does not establish that the business operation completed.
The current retry policy allows up to ten HTTP attempts, including the first, with pauses after failures. Exhausting the attempts ends delivery unsuccessfully. A prolonged outage can exceed that recovery window.
Set Add an idempotency key to Yes in the Endpoint settings, and CLI and Direct include an Idempotency-Key header containing the request_id. This identifies attempts for one accepted Request. A provider resending the same event can create another Request, so the store still needs the provider's event ID or an agreed business key to recognize that duplicate.
HTTP data is retained for 90 days from receipt. Retries do not extend retention, and retention does not mean automatic attempts continue for 90 days. The store remains responsible for its long-term payment and processed-event records.
Back to the second delivery
The store has committed the payment, but the response was lost. evt_7421 arrives again.
The handler verifies the request's authenticity, recognizes the accepted event, and confirms that either its result or the work needed to complete it has been durably saved. It can then acknowledge the duplicate without awarding more points or creating a second shipment job.
If the first attempt failed before a durable write, the retry gives the store another opportunity to accept and process the event. That distinction is what makes retries useful: they recover missing work while preserving work already done.
When reviewing an integration, walk through both a crash before commit and a lost response after commit. Then consider concurrent duplicates and a restart after acknowledgment. In each case, you should be able to identify where the event lives, which component resumes the work, and what prevents a repeated business effect.
That is the practical value of at-least-once delivery. An uncertain attempt can be retried, an accepted event survives a restart, and the store can recover without recording the payment or scheduling its shipment twice.