WidgetsBooking widgetCallbacks

Callbacks and events

How the widget notifies your page about bookings, errors, and closes.

init() (and open()) accept three callbacks. Each one covers a different moment, and none of them is a general event stream:

CallbackWhen it fires
onSuccess(result)Once per completed booking, on the confirmation screen.
onError(error)When the widget can't start. In-flow failures show the widget's own error UI without calling it.
onClose()When the modal is dismissed — by the patient, by your close() call, or by the auto-close after a booking. Modal mode only.

There are no step-level events

The widget doesn't emit "reached the calendar", "sent a code", or "picked a slot". If you need funnel instrumentation at that granularity, talk to the platform team.