Skip to content
العربية

Webhooks

Subscribe an https endpoint with POST /webhook-endpoints. razza sends each event as a POST with the record as GET returns it. Each event needs the permission that reads its record.

EventSent whenNeeds
booking.cancelledA booking was cancelled.view_calendar
booking.completedA booking was completed or checked out.view_calendar
booking.createdA booking was made, from any source.view_calendar
booking.no_showA booking was marked as a no-show.view_calendar
booking.updatedA booking's day, time, services, team members, customer or notes changed.view_calendar
customer.createdA customer newer than your endpoint was added to the business's list.No restrict_customer_list
customer.updatedA customer's details changed.No restrict_customer_list
invoice.createdAn invoice or credit note was issued.view_reconciliation
payment.createdA payment, deposit or refund was recorded.view_reconciliation
{
"id": "4b7f6c1e-2a9d-4f0b-9c3e-8d5a1f2e6b70",
"type": "booking.updated",
"created_at": "2026-12-01T10:15:02+03:00",
"data": { "id": "BK-000123", "status": "booked" }
}

Each delivery carries Razza-Signature: t=<unix time>,v1=<signature>. The signature is the hex HMAC-SHA256 of <t>.<raw body>, keyed with the signing secret you got when you subscribed. Check it against the raw body, before parsing, and refuse old timestamps.

Python
import hashlib
import hmac
import time
def verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:
parts = dict(item.split("=", 1) for item in header.split(","))
timestamp = int(parts["t"])
if abs(time.time() - timestamp) > tolerance:
return False
signed = f"{timestamp}.".encode() + body
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts.get("v1", ""))
Node.js
const crypto = require("crypto");
function verify(secret, header, rawBody, tolerance = 300) {
const parts = Object.fromEntries(
header.split(",").map((item) => item.split("=", 2))
);
const timestamp = Number(parts.t);
if (Math.abs(Date.now() / 1000 - timestamp) > tolerance) return false;
const expected = crypto
.createHmac("sha256", secret)
.update(`${timestamp}.${rawBody}`)
.digest("hex");
const sent = Buffer.from(parts.v1 || "");
return (
sent.length === expected.length &&
crypto.timingSafeEqual(sent, Buffer.from(expected))
);
}
  • Answer with any 2xx within 10 seconds. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h, then marked failed.
  • An event can arrive more than once. Ignore an id you have already handled.
  • Events can arrive out of order. Compare updated_at and keep the newest.
  • Treat customer.created and customer.updated as upserts by id. customer.created goes out for customers whose record is newer than your endpoint.
  • When the app loses a permission, events already queued drop the fields it no longer may see.
  • A delivery stops, marked failed, when its endpoint is removed, the business loses the API, or the app loses the permission its event needs. Its attempts counts only the sends made.
  • GET /webhook-endpoints/{endpoint_id}/deliveries lists the last 30 days of deliveries with their status.