Dev

Webhooks

Receive real-time notifications when events happen in your CloudCart store.

Webhooks let you subscribe to store events and receive HTTP POST callbacks when they occur.

Supported Events

EventDescription
order.createdNew order placed
order.updatedOrder status changed
order.cancelledOrder cancelled
product.createdNew product added
product.updatedProduct modified
product.deletedProduct removed
customer.createdNew customer registered

Webhook Payload

{
  "event": "order.created",
  "timestamp": "2026-03-14T12:00:00Z",
  "data": {
    "id": 12345,
    "total": "99.99",
    "currency": "BGN",
    "status": "pending"
  }
}

Verification

Each webhook includes an X-CloudCart-Signature header. Verify it using HMAC-SHA256:

const crypto = require('crypto');

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

Retry Policy

Failed deliveries (non-2xx response) are retried up to 5 times with exponential backoff.

On this page