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.
| Event | Sent when | Needs |
|---|---|---|
booking.cancelled | A booking was cancelled. | view_calendar |
booking.completed | A booking was completed or checked out. | view_calendar |
booking.created | A booking was made, from any source. | view_calendar |
booking.no_show | A booking was marked as a no-show. | view_calendar |
booking.updated | A booking's day, time, services, team members, customer or notes changed. | view_calendar |
customer.created | A customer newer than your endpoint was added to the business's list. | No restrict_customer_list |
customer.updated | A customer's details changed. | No restrict_customer_list |
invoice.created | An invoice or credit note was issued. | view_reconciliation |
payment.created | A 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" }}Verify every delivery
Section titled “Verify every delivery”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.
import hashlibimport hmacimport 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", ""))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)) );}Delivery and retries
Section titled “Delivery and retries”- Answer with any
2xxwithin 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
idyou have already handled. - Events can arrive out of order. Compare
updated_atand keep the newest. - Treat
customer.createdandcustomer.updatedas upserts byid.customer.createdgoes 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
attemptscounts only the sends made. GET /webhook-endpoints/{endpoint_id}/deliverieslists the last 30 days of deliveries with their status.