Developers

Events

Every event Zaher sends, when it fires, and what it contains.

Subscribe each endpoint to the events it needs. Full payload schemas and examples are in the Reference section of the sidebar.

Orders

data is the full order: status, totals, customer, billing and shipping addresses, and line items. Money values are decimal strings ("149.00") in the order's currency.

EventFires when
order.createdAn order is placed — including unpaid (pending) orders and orders created manually in the dashboard.
order.completedAn order is paid and completed.
order.status_changedAn order's status changes. data.previous_status holds the old value.
order.canceledAn order is canceled.
order.refundedAn order is refunded.

One change can produce several events. When an order goes from pending to completed you receive both order.status_changed and order.completed — subscribe to whichever fits your workflow.

Order statuses

draft, pending, pending_payment, captured, confirmed, completed, canceled, failed, refunded.

Refunds

EventFires when
refund.succeededA refund goes through — full or partial, made in Zaher or in the Stripe or Telr dashboard.

data is the refund (id, type, source, gateway, amount, currency, reason, succeeded_at) with the order after it in data.order. A partial refund leaves the order completed; when nothing is left to refund the order becomes refunded and order.refunded (plus order.status_changed) fires too.

Channels

data.channel tells you where the order came from: storefront, marketplace, zaher or dashboard (created by hand in the dashboard).

Bookings

data is the one-on-one booking: date, time and timezone, duration, meeting method and link, the related order and product, and the customer.

EventFires when
booking.createdA booking is created.
booking.acceptedA booking is accepted.
booking.canceledA booking is canceled.

Booking statuses

initiated, pending, accepted, canceled.

Subscriptions

data is the membership subscription: its status and kind, the product and plan, the billing cycle and price, the customer and their form answers, the trial and current period, the cancel details, and the latest paid order.

EventFires when
subscription.createdA subscription starts: its first payment went through or its free trial began. A checkout that is never paid sends nothing.
subscription.status_changedThe status changes after it started. data.previous_status holds the old one.
subscription.renewedA new billing period is paid: a renewal, a failed payment recovered, or a trial converting.
subscription.past_dueA renewal payment fails and is being retried. Once per failed period, not on every retry.
subscription.canceledThe subscription ends after a cancel.
subscription.expiredThe subscription ends because its payment retries or grace period ran out.

A cancel the customer schedules for the period end doesn't fire anything until the period ends (subscription.canceled); until then data.cancel_at_period_end is true on the next event.

Granting access in your own app

For a subscription of kind subscription (external digital access), give access on subscription.created and take it away on subscription.canceled and subscription.expired. While a payment is retried (past_due) the store's plan decides whether access continues.

Subscription statuses

trialing, active, past_due, paused, canceled, expired.

Customer data

Payloads include the customer's name, email, phone and addresses (and a subscription's form answers) so you can fulfil orders and sync your CRM. Treat them as personal data — see Security.

On this page