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.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
Verifying Signatures
Every webhook delivery includes anX-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:
- Retrieve the raw, unparsed request body as bytes.
- Compute
HMAC-SHA256(body, webhookSecret)and base64-encode the digest. - Prefix the result with
sha256=. - Compare your computed value against the
X-Eaglecart-Signatureheader 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.
