Skip to main content
Communication between Opal and your app is handled through a consistent, mode-aware event system. Events are emitted throughout the user session to indicate progress, completion, errors, and important milestones.

Listening to Events

We strongly recommend using one of the Opal SDKs to receive typed events and lifecycle callbacks. The SDKs provide onEvent, onOpen, and onExit handlers and expose a small enum of well-known events under OpalEventType for convenience (e.g., SESSION_STARTED, SESSION_COMPLETED). Each Opal mode (identity_verification, connect, card_connect, account_verification, transactions) emits a set of mode‑specific events in addition to default session events. See below for structure, a complete list, and examples.

Event Structure

All Opal events follow a consistent structure:

Event fields

Possible flows:

  • identity_verification
  • connect
  • account_verification
  • transactions

Sample Events

opal.session.started

opal.session.errored

connect.flow.completed

Event Categories

Default session events (always available)

  • opal.session.started - Opal UI opened and session began
  • opal.session.completed - User completed the flow successfully
  • opal.session.errored - A recoverable or terminal error occurred
  • opal.session.exited - User exited or dismissed Opal

Generic flow and step events

Emitted in addition to the default session events. These mirror the active mode‑specific events but are prefixed with opal and can be emitted for any mode.

Flow

  • opal.flow.started - A sub‑flow of Opal started (e.g., identity verification, account selection, verification).
  • opal.flow.completed - A sub‑flow of Opal completed. This does not always signify the end of the session; use opal.session.completed to detect when Opal is fully completed.

Step

  • opal.step.started - A new step started (e.g., phone input, card selection, CVV input).
  • opal.step.completed - A step completed and the next page is opening.
Notes:
  • Additional mode-specific events may be introduced over time. Your handler should use the OpalEventType enum to handle the specific cases you need.

All Event Types

The following table lists all currently supported event types with their OpalEventType mapping, and when they are typically emitted.

Data Payloads

The following events always include a non-null event.data payload:
  • identity_verification.identity.completed
  • connect.accounts.selected
  • account_verification.card.verified
  • transactions.accounts.linked
Use these payloads to retrieve context such as selected accounts, verification results, or linkage details.

Enhanced Event Handling

Using the JavaScript SDK

PostMessage Communication

For applications not using the Opal SDKs, you can listen to events via PostMessage:

Setup PostMessage Listener

Best Practices

Event Handling

  • Always verify event origins for security
  • Use event filtering to reduce noise
  • Implement proper error handling for all events
  • Log events for debugging and analytics

Security

  • Validate all event data before processing
  • Never trust client-side events for critical business logic