Webhook Events

Receive real-time notifications when important events occur

How it Works

POST https://your-app.com/webhooks/fez
Content-Type: application/json
X-Fez-Signature: sha256=<HMAC-SHA256>
X-Fez-Event: order.created

{
  "event": "order.created",
  "timestamp": "2026-02-27T01:00:00Z",
  "storeId": "store_abc123",
  "data": {
    "id": "order_xyz",
    "total": 299.00,
    "items": [...]
  }
}

Signature Verification

const crypto = require("crypto");

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac("sha256", secret)
    .update(payload)
    .digest("hex");
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

Event Catalog

EventRequired ScopeDescription
order.createdread_ordersNew order placed
order.updatedread_ordersOrder details changed
order.cancelledread_ordersOrder cancelled
order.fulfilledread_ordersOrder shipped/delivered
product.createdread_productsNew product added
product.updatedread_productsProduct details changed
product.deletedread_productsProduct removed
inventory.lowread_productsStock below threshold
inventory.outread_productsOut of stock
customer.createdread_customersNew customer registered
customer.updatedread_customersCustomer profile updated

Circuit Breaker

After 5 consecutive failures, the endpoint is automatically disabled to protect the system.

You can manually re-enable it from the Partners Portal.

Retry Policy

The system retries 3 times with exponential backoff:

1st: 30s2nd: 5min3rd: 30min