JustFlows

Bookings / Integrations

Events and contracts for plugins

Other plugins can follow bookings through versioned events. Every payload is { version: 1, eventKey, occurredAt, … } with identifiers, times, and states only, never names, contact details, notes, answers, or amounts. A failing listener never undoes the change.

EventWhen
justflows.bookings.booking.<kind>A booking changed: created, confirmed, approved, paid, rescheduled, reassigned, cancelled, checked_in, completed, no_show, failed, restored, retried, or paid_late.
justflows.bookings.hold.created / .expiredA visitor held a time, or a hold lapsed.
justflows.bookings.payment.linked / .appliedA commerce plugin started payment, or a payment outcome was applied.
justflows.bookings.credits.<kind>A credits message was applied: grant, pause, resume, end, or revoke.

Two filters let plugins provide what Bookings does not: justflows.bookings.commerce.providers adds a commerce provider that sells services, and justflows.bookings.calendar.adapters adds a calendar provider. A provider reports payment outcomes and credits to the plugin-only routes POST /api/bookings/v1/linked/payment and POST /api/bookings/v1/linked/credits through ctx.plugins.call, only for itself and only from credit plans it owns, and Bookings applies each once. Shop's arrive from Shop's own order and subscription events instead. Payloads and examples are in the developer guides.