Firmware should react to the typed events it receives. It should not expose internal broker topics, raw device secrets, or backend-only identifiers to end users.
Payment events
ThePayments object handles both pending and successful payment events. Use it to update a display, unlock a device after payment, or log order information locally.
Verification events
TheVerifications object handles PIN display and verification result events. Use it when a customer must enter a PIN or pass a precondition before using the device.
Device state
TheDeviceStates object helps firmware react to state changes such as idle, pending payment, expired payment, successful payment, maintenance, or active service.
Init flow
TheInits object provides the initial device configuration after connection. It can include entity configuration, merchant status, active order ID, verification flags, and business mode (service or vending).
Vending dispense
When the device business mode is vending, a successful prepaid payment delivers catalog SKUs to dispense. Use the typedDispenses object (or ON_DISPENSES) to drive motors or servos.
isValid(), itemCount(), skuAt(i), metadata().
Vending checkout requires prepaid catalog items. Postpaid items are not available in vending mode.
Active session end
TheActiveSession callback lets firmware end an active paid session from the device when local rules are met. This is useful for usage limits, sensor thresholds, or device-side safety rules.