> 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/best-practices/webhooks.md).

# Webhooks

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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
