Widget Events
Overview of client-side events emitted by the Widget on certain user actions.
The Forte Compliance widget will emit client-side events that provide information on when a user closes the widget. These events help you to handle post-verification flow UX as desired, based on the different Event Types listed below.
Event Types
The following Custom Events will be emitted by the Widget, and are available for you to attach listeners to on your client-side.
FortePaymentsWidgetLoaded
FortePaymentsWidgetLoaded
This event is emitted once the page is ready to initialize the Forte Widget for the user. One implementation can be wrapping the initalization inside this event as follows:
FortePaymentsWidgetClosed
FortePaymentsWidgetClosed
This event is emitted upon the user closing the widget prematurely, before finishing the verification flow.
For example, if the user closes the widget before submitting their name, the FortePaymentsWidgetClosed
event will be fired. Closing the widget from any other non-terminal page in the flow will result in the same.
Users will resume the flow from the last piece of information requested. Previously provided information will not need to be provided again within the widget.
ForteKYCSuccess
ForteKYCSuccess
This event is emitted upon the user closing the widget from the following screen, after a successful verification for the desired access level.
ForteKYCFailure
ForteKYCFailure
This event is emitted upon the user closing the widget from the following screen, after an unsuccessful verification for the desired access level.
Event Listener Snippet
Here is an example of how you can attach an event listener on your client-side, in this case allowing you to customize UX after a successful verification (eg. “Action Unlocked!”).