> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/best-practices/webhooks.md).

# Webhooks

Webhook rules: HTTPS, validate event type and version, respond within 3 seconds.

Use these guidelines when you subscribe to ESW webhooks and implement the receiving endpoint.

### Endpoint requirements

* Subscriptions must point to an **HTTPS** endpoint. ESW rejects non-HTTPS endpoints.
* Webhook endpoints must be in the **same domain** as the origin checkout domain, or one of your registered domains.
* Keep SSL certificates valid and maintained. ESW will not deliver to endpoints with SSL issues (mismatch, untrusted cert, etc.).

### Event types and versions

* ESW supports multiple event types. Each event type can include multiple actions.
* Over time, ESW may add new event types, add actions to existing event types, or release new versions.
* Always check the **event type** and **event version** before processing.
* Use the `Esw-Event-Type` request header to identify the received event and route it correctly.
* Expect test events. Handle them safely.

### Acknowledge quickly

ESW expects a response within **3 seconds** of delivering the payload.

If your service takes longer, the connection is terminated and the payload is re-queued.

* Do lightweight validation first.
* Offload heavy work to a background job/queue.

### Delivery model and retention

Webhooks are delivered asynchronously. Delays can occur within the SLA, or longer in rare cases.

Do not use webhooks as a real-time event-sourcing mechanism.

ESW queues undelivered events. By default, queued events are stored for **24 hours**. After that, events are dropped.

{% hint style="info" %}
Design for retries, occasional duplicates, and out-of-order delivery. Keep handlers idempotent.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.esw.com/getting-started/get-started-with-esw/quick-start-guide/best-practices/webhooks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
