When using the onEvent callback, it will be called for every event available on the widget. The callback should be defined as follows:

function onEvent(eventName, metadata) {
    // use eventName and metadata
}

Here, eventName is a string that states the event that triggered the callback, and the metadata attribute is an object containing relevant information about the event that triggered the callback. It may be possible for some of the metadata attributes to be null.

Parameter

Description

timestamp

Moment in time in which the event was triggered

🚧

The metadata object may include more fields over time, so you shouldn't assume its fields are just the one documented today.

List of events

The events available on the widget are the ones documented on the table below:

Event Name

Description

opened

Triggers when the widget is opened

on_terms_and_conditions

Triggers when the user visits the terms and conditions

on_available_institutions

Triggers when the user enters the view to select the financial institution

on_authentication_form

Triggers when the user enters the view to authenticate with its financial institution

creating_link

Triggers when the financial institution is verifying the credentials and Fintoc is connecting the account

link_created

Triggers when the financial institution approves the credentials and a Link gets created in Fintoc

selecting_account

Triggers when the user enters the view to select an account

creating_subscription

Triggers when the user starts trying to create a subscription

app_authentication_required

Triggers when the financial entity needs a second factor via application to authenticate

device_authentication_required

Triggers when the financial entity needs a second factor via physical device to authenticate

card_authentication_required

Triggers when the financial entity needs a second factor via coordinate card to authenticate

sms_authentication_required

Triggers when the financial entity needs a second factor via SMS to authenticate

validating_second_factor

Triggers when the financial entity is validating the second factor introduced by the user

subscription_created

Triggers when a subscription is created correctly

closed

Triggers when the user closes the widget

on_error

Triggers when an error occurrs on the flow


Did this page help you?