Link callbacks
Guide to using Link callbacks in your integration
After integrating Identity Verification using Link, you can use Link’s client-side callbacks to see how your users are progressing through the flow. Note that you will not be able to access these if you use the Plaid-hosted flow with shareable links.
onSuccess
will fire when a user has successfully completed the Link flow. The link_session_id
returned by onSuccess
can be passed to /identity_verification/get
in the identity_verification_id
field to retrieve data on the verification. Note that receiving onSuccess
simply means that the user completed the Identity Verification flow, not that their identity was verified. A completed session in which a user fails Identity Verification will still result in onSuccess
.
onExit
will fire when a user exits a session without finishing all required steps. If you receive this event, you may want to provide an option for the user to restart the Link flow, and/or provide guidance on manually performing KYC.
onEvent
will fire at certain points throughout the IDV flow with updates on the user’s progress at each point. For each step, Plaid will send an IDENTITY_VERIFICATION_START_STEP
event as well as a IDENTITY_VERIFICATION_PASS_STEP
or IDENTITY_VERIFICATION_FAIL_STEP
event based on the outcome of the step. Each step will also have an associated view_name
. The possible view names include:
ACCEPT_TOS
, VERIFY_SMS
,KYC_CHECK
, DOCUMENTARY_VERIFICATION
, RISK_CHECK
, and SELFIE_CHECK
.
For each session, Plaid will also inform you of the outcome of the session by sending an IDENTITY_VERIFICATION_PASS_SESSION
or IDENTITY_VERIFICATION_FAIL_SESSION
event based on the outcome of the session.
Note that, aside from IDENTITY_VERIFICATION_PASS_SESSION
and IDENTITY_VERIFICATION_FAIL_SESSION
, the sequence of view names and onEvent
events are subject to change without notice, as Plaid adds additional functionality and makes improvements to flows. You should treat view names as informational and not rely on them for critical business logic.