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
| Event | Description |
|---|---|
order.created | New order placed |
order.updated | Order status changed |
order.cancelled | Order cancelled |
product.created | New product added |
product.updated | Product modified |
product.deleted | Product removed |
customer.created | New 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.