Skip to main content
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.
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:
window.addEventListener('FortePaymentsWidgetLoaded', () => {
  window.initFortePaymentsWidget({
    containerId: 'forte-payments-widget-container',
    data
  })
});
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.
LEVEL02 06 Sv
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.
This event is emitted upon the user closing the widget from the following screen, after a successful verification for the desired access level.
LEVEL02 10 Sv
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!”).
window.addEventListener('ForteKYCSuccess', function(event) {
		console.log("User completed the verification flow and closed widget!");
		// Implement post-(successful)-verification flow as desired
	}
);