Skip to main content
The Custom Events System is client-side. It sends events from the native host app to the miniapp WebView and from the miniapp WebView back to the native host app. Boxo Event Bridge, further down this page, sends backend-to-backend notifications.
The Custom Events System lets the native host app send data to the miniapp WebView, and lets the miniapp WebView send events back to the native host app. Certain operations can also be implemented at the native app level.Custom events example
Boxo Event Bridge sends backend-to-backend notifications between a host app backend and a miniapp backend through the Boxo Platform.
Boxo Event Bridge is a backend-to-backend notification system. Host app and miniapp backends exchange events through the Boxo Platform.

Event Bridge flow

Here is a sequence flow for event communication process between a miniapp and a host app.
  1. An app (either hostapp or miniapp) creates an event with a specific event type and payload
  2. The app sends the event to the Boxo Platform via the Event Bridge API
  3. The Boxo Platform validates the event and authenticates the sender
  4. The Boxo Platform forwards the event to the recipient’s event receiver URL
  5. The recipient processes the event and returns a response
  6. The Boxo Platform captures the response and forwards it to the original sender
  7. The original sender receives the response and can take appropriate actions
*Note: Feature must be enabled in DashboardData formatJSON is used for data exchange. Event payloads can contain any valid JSON structure that both the sender and receiver agree upon.
This endpoint allows your app to receive events from the Boxo Platform.URL and METHOD:This endpoint must handle a HTTPS POST request URL to endpoint must be provided in DashboardHeaders:
  • Default <prefix>: Token. Access token prefix can be set in Boxo Connect.
  • hostapp_client_id and hostapp_secret_key must be provided in Dashboard
BodyResponse:
  • Response status must be 200 in all cases
  • Response body can contain any valid JSON that will be forwarded to the event sender
Request Example:
This endpoint allows your app to send events to miniapps through the Boxo Platform.URL and METHODThis is HTTPS POST /api/v1/events/hostapp/ endpointHeaders
  • Default <prefix>: Token. Access token prefix can be set in Boxo Connect.
  • hostapp_client_id and hostapp_secret_key must be provided in Dashboard
BodyResponse
  • Response status will be 200 if the event was delivered successfully
  • Response body will contain the response from the miniapp’s event receiver endpoint
Request Example
Some flows have a fixed contract shared by every miniapp, such as refunds. See Standard Events.
Here are some common event types that can be used for communication between host apps and miniapps:

Host App to Miniapp Events

Miniapp to Host App Events

If an error occurs during event processing, the Boxo Platform will return an appropriate error response:
  1. Event Types: Use consistent event types that clearly indicate the purpose of the event
  2. Minimal Payloads: Keep event payloads as small as possible, including only necessary information
  3. Error Handling: Implement proper error handling for event processing failures
  4. Idempotency: Design event handlers to be idempotent to handle potential duplicate events
  5. Timeouts: Implement reasonable timeouts for event processing to avoid blocking operations
By following these guidelines, you can create a robust event-driven communication system between your host app and miniapps using Boxo Event Bridge.