Skip to main content
Eaglecart can send real-time HTTP notifications to your server whenever events occur in your store. Instead of polling the API for changes, you register a webhook endpoint and Eaglecart pushes a JSON payload to your URL the moment an event fires — keeping your integrations fast, reliable, and up to date.

Registering a Webhook

1

Open the Webhooks settings

In your Eaglecart admin, navigate to Settings → Developer → Webhooks.
2

Add a new webhook

Click Add webhook to open the creation form.
3

Enter your endpoint URL

Provide the full URL of your server endpoint. The URL must use HTTPS — Eaglecart rejects plain HTTP endpoints to protect payload integrity in transit.
4

Select event topics

Choose one or more event topics you want to subscribe to (for example, order.created or inventory.low_stock). You can subscribe to multiple topics on a single endpoint.
5

Save and verify

Click Save. Eaglecart immediately sends a test ping to your endpoint. Confirm your server responds with a 200 OK before the dialog closes.
During development, use a tunnelling tool like ngrok to expose your local server to the internet with a temporary HTTPS URL. Run ngrok http 3000 and paste the generated URL into the endpoint field.

Webhook Request Format

Every webhook delivery is an HTTP POST request sent to your registered endpoint. The request contains the following headers and a JSON body.

Headers

Example request

Your endpoint must return a 2xx HTTP response within 5 seconds of receiving a delivery. If your handler takes longer than 5 seconds or returns a non-2xx status, Eaglecart marks the delivery as failed and begins the retry sequence. Offload any heavy processing to a background queue and acknowledge the webhook immediately.

Verifying Signatures

Every webhook delivery includes an X-Eaglecart-Signature header so you can confirm the request genuinely came from Eaglecart and that the payload was not tampered with in transit. Eaglecart computes the signature by taking the HMAC-SHA256 of the raw request body using your webhook’s secret key, then base64-encoding the result and prepending sha256=. To verify the signature in your handler:
  1. Retrieve the raw, unparsed request body as bytes.
  2. Compute HMAC-SHA256(body, webhookSecret) and base64-encode the digest.
  3. Prefix the result with sha256=.
  4. Compare your computed value against the X-Eaglecart-Signature header using a constant-time comparison function to prevent timing attacks.
Node.js — signature verification
Find your webhook secret key on the webhook detail page in Settings → Developer → Webhooks. Rotate it at any time — Eaglecart will begin signing with the new secret immediately, so update your server before rotating.

Retries

If your endpoint fails to respond with a 2xx status within 5 seconds, Eaglecart automatically retries the delivery up to 5 times using exponential backoff. Retry attempts are spaced over a 24-hour window: After the fifth failed attempt, Eaglecart marks the delivery as permanently failed. You can view the delivery history and manually replay any failed delivery from Settings → Developer → Webhooks → [your webhook] → Delivery log.