Flinks Connect has events that can be used for tracing purposes, not only for successful connections, but also for sessions that weren't completed.

To enable the event listener you need to add the following block into the page that has Flinks Connect embedded:


<script> window.addEventListener('message', function(e) { console.log(e.data) }); </script>



The event will be returned in a JSON format, but if you require it as a string instead, you need to add the parameter stringify=true into the Flinks Connect iframe URL.


Here's an example of a step event:


{step: "REDIRECT", institution: "FlinksCapital", url: "https://example.com?loginId=77d2967c-627a-440f-be3….1529418524&tag=TestTag&institution=FlinksCapital"}


The event can also be a FlinksCode output:


{requestId: "3eb951d4-6d73-461c-8cd7-7896a0b8992e", flinksCode: "QUESTION_NOT_FOUND", institution: "FlinksCapital"}



The possible events are listed here:




Event

 Present field
Description

Event TyperequestIdloginidUrlaccountIdinstitution
COMPONENT_LOAD_INSTITUTION_SELECTORstep     Institution Selection page was loaded.
INSTITUTION_SELECTEDstep    TRUEThe Financial Institution was selected.
COMPONENT_LOAD_CREDENTIALstep    TRUEThe Credential Page was loaded.
SUBMIT_CREDENTIALstep    TRUEThe credential was submitted.
COMPONENT_LOAD_MFAstep    TRUEThe MFA page was loaded.
SUBMIT_MFAstep    TRUEThe MFA answer was submitted.
QUESTION_NOT_FOUNDflinkscodeTRUE   TRUEThe MFA answer was not previously saved in the connecting LoginId.
ACCOUNT_SELECTEDstep   TRUETRUEThe account was selected in the Account Selection page.
REDIRECTstep  TRUE TRUEAll information required from the end-user were entered and validated and the iframe was redirected.
COMPONENT_CLOSE_SESSIONstep    TRUEThe Flinks Connect Session is being closed.
AGGREGATION_ERRORflinkscodeTRUE   TRUEAn unexpected error occured during the request.
*flinkscodeTRUE   TRUEA Flinks Code was prompted from a request.
*flinkscodeTRUETRUE  TRUEA Flinks Code and a loginid was prompted from a request.