Free for 4 days: connect your Google Business Profile and get every Pro feature. No payment needed.
Chamko AI
Business growth

Marketing Webhook Delivery, Retry Logic, and Duplicate Event Controls

Webhooks connect marketing tools to the events that matter: a purchase, a form submission, a subscription change, or a referral reward. Delivery is not…

By Chamko Research Team Updated 5 min read

Quick answer

Webhooks connect marketing tools to the events that matter: a purchase, a form submission, a subscription change, or a referral reward. Delivery is not always exactly once.

Introduction

Webhooks connect marketing tools to the events that matter: a purchase, a form submission, a subscription change, or a referral reward. Delivery is not always exactly once. A receiver may complete the action but time out before responding, causing the sender to retry. If the receiver cannot recognize a repeated event, one real-world action can create duplicate emails, records, or rewards.

Give each event a stable identity

An event should have an identifier that remains the same across delivery retries. A timestamp alone is a weak substitute because clocks can differ and two legitimate events may occur close together. The receiver should store enough processing history to determine whether an event has already produced its business effect.

Design idempotent handlers

Idempotency means that processing the same event again does not repeat the intended side effect. For example, a second delivery of the same order-paid event should not send another reward. Store the event ID and processing result atomically with the action where the architecture allows it. If the action crosses systems, define how partial completion is detected and reconciled.

Use bounded retries with backoff

Transient network failures may recover after a short delay, but retrying continuously can overload a struggling receiver. Use bounded attempts, increasing delays, and jitter where appropriate. Classify errors: a timeout may be retryable, while an invalid payload or rejected signature usually needs correction rather than endless repetition.

Do not confuse acceptance with completion

An HTTP success response may mean the receiver accepted the event into a queue, not that a CRM update or campaign action finished. Document the acknowledgement contract and monitor the downstream processing stage. If a sender assumes end-to-end completion from a simple acknowledgement, failed work can disappear from view.

Build a dead-letter and replay process

After retry limits are reached, retain the event in a visible dead-letter queue with a failure reason and owner. Replay tools should show the event age, current eligibility, previous attempts, and expected side effects. Replaying an old event after a policy change may not be safe; some event types need the original decision context while others must re-evaluate current rules.

Handle ordering explicitly

Events can arrive out of order. A subscription cancellation may be delivered before an older subscription-created event, or a refund may arrive before a delayed purchase notification. Use event versions or authoritative state reads when ordering matters. Do not assume that delivery order always matches business chronology.

Protect the endpoint

Verify webhook signatures or other documented authentication, validate payload schemas, and limit what data is accepted. Rotate credentials according to the integration's requirements and prevent secrets from appearing in logs. A valid signature proves something about the sender, but it does not remove the need to validate the event's content and business eligibility.

Example: the double reward

A purchase event reaches the reward service. The service grants points, but the response is lost. The sender retries. A receiver that uses the stable event ID recognizes the retry and returns the stored result without granting points again. Monitoring should record a retry while the duplicate-side-effect metric remains zero.

Monitor the whole business path

Track delivery success, processing lag, duplicate side effects, dead-letter age, and recovery time. Alert on sustained backlog growth or a sharp change in event volume. During an incident, pause dangerous downstream actions if necessary, preserve event evidence, and replay only after the cause is understood. A queue that eventually drains is not proof that it produced the right business outcome.

Conclusion

Webhook reliability depends on event identity, idempotent processing, bounded retries, clear acknowledgement semantics, and a safe replay path. Test timeouts after successful processing, duplicated delivery, delayed events, malformed payloads, and receiver outages. The goal is not to pretend delivery is perfect; it is to make failure observable and repeated delivery safe.

Frequently asked questions

Do webhooks guarantee exactly-once delivery?

Do not assume so. Design consumers to handle repeated delivery safely and monitor the business outcome.

When should a failed event be replayed?

After the cause is understood and the replay is checked for current eligibility, duplicate effects, and ordering implications.

Practical next step

For the next integration test, simulate a receiver timeout after the business action has already completed. Retry the same event ID and confirm that the second delivery produces no duplicate side effect.

Additional implementation details

Choose event contracts deliberately

Document whether an event represents an attempted action, a confirmed business result, or a state change. For example, checkout_started and payment_succeeded must not be treated as interchangeable triggers for a reward. Include schema version, event ID, occurrence time, and producer identity, and define how consumers should behave when a new optional field appears.

Protect against partial side effects

A consumer may write to its database and then fail before sending a message to another service. A retry can repeat the first write or skip the second action unless the workflow records its progress. Use a transactional outbox, idempotency key, or reconciliation job where appropriate to make partial completion discoverable and safe to resume.

Make replay auditable

A replay interface should show who initiated it, why the event failed, what changed since the original attempt, and whether a business action may already have occurred. Require stronger review for bulk replay or events that can grant money, points, or customer entitlements. After replay, confirm both queue clearance and the final business state.

Operational checklist

  • Confirm stable event identity.
  • Simulate a timeout after successful processing.
  • Check that a retry causes no duplicate effect.
  • Review dead-letter handling and replay permissions.

Event schema evolution

A webhook contract should explain how consumers handle unknown fields, missing optional values, and breaking changes. Versioning should not be used as a substitute for communication: notify dependent teams before removing or changing a field that controls eligibility or customer communication. Test the old and new payloads during rollout and retain a rollback path if the receiver begins rejecting valid events.

Operational ownership during an outage

Name an integration owner who can decide whether to pause event production, disable a downstream campaign, or begin controlled replay. The incident record should include the start time, affected event types, last known good processing point, and any customer-facing side effects. After recovery, reconcile source counts against processed business actions. Do not close the incident merely because the queue is empty if events were dropped, duplicated, or processed under outdated eligibility rules.

Keep reading