Listen to Widget events

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.

ParameterDescription
timestampMoment 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 NameDescription
openedTriggers when the widget is opened
on_terms_and_conditionsTriggers when the user visits the terms and conditions
on_available_institutionsTriggers when the user enters the view to select the financial institution
on_request_bankTriggers when the user enters the view to request a new bank
on_authentication_formTriggers when the user enters the view to authenticate with its financial institution
creating_linkTriggers when the financial institution is verifying the credentials and Fintoc is connecting the account
link_createdTriggers when the financial institution approves the credentials and a Link gets created in Fintoc
selecting_accountTriggers when the user enters the view to select an account
payment_intent_confirmation_requiredTriggers when the user enters the view to select an account
creating_subscriptionTriggers when the user starts trying to create a subscription
app_authentication_requiredTriggers when the financial entity needs a second factor via application to authenticate
device_authentication_requiredTriggers when the financial entity needs a second factor via physical device to authenticate
card_authentication_requiredTriggers when the financial entity needs a second factor via coordinate card to authenticate
sms_authentication_requiredTriggers when the financial entity needs a second factor via SMS to authenticate
email_authentication_requiredTriggers when the financial entity needs a second factor via email to authenticate
captcha_authentication_requiredTriggers when the financial entity needs a second factor via captcha to authenticate
validating_second_factorTriggers when the financial entity is validating the second factor introduced by the user
subscription_createdTriggers when a subscription is created correctly
subscription_abortedTriggers when a constraint prevents Fintoc from completing the subscription. This could happen, for example, if the same subscription has already been completed before
payment_createdTriggers when a payment is successful
payment_errorTrigger when a payment fails
payment_selecting_authTriggers when the user is selecting a second factor method to authenticate
validating_paymentTriggers when Fintoc is validating the payment
closedTriggers when the user closes the widget
on_errorTriggers when an error occurrs on the flow