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](https://plaid.com/docs/link/web/index.html.md#link-web-create-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](https://plaid.com/docs/api/products/identity-verification/index.html.md#identity_verificationget) 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](https://plaid.com/docs/link/web/index.html.md#link-web-create-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](https://plaid.com/docs/link/web/index.html.md#link-web-create-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](https://plaid.com/docs/link/web/index.html.md#link-web-onevent-eventName-IDENTITY-VERIFICATION-START-STEP) event as well as a [IDENTITY\_VERIFICATION\_PASS\_STEP](https://plaid.com/docs/link/web/index.html.md#link-web-onevent-eventName-IDENTITY-VERIFICATION-PASS-STEP) or [IDENTITY\_VERIFICATION\_FAIL\_STEP](https://plaid.com/docs/link/web/index.html.md#link-web-onevent-eventName-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](https://plaid.com/docs/link/web/index.html.md#link-web-onevent-metadata-view-name-ACCEPT-TOS) , [VERIFY\_SMS](https://plaid.com/docs/link/web/index.html.md#link-web-onevent-metadata-view-name-VERIFY-SMS) ,[KYC\_CHECK](https://plaid.com/docs/link/web/index.html.md#link-web-onevent-metadata-view-name-KYC-CHECK) , [DOCUMENTARY\_VERIFICATION](https://plaid.com/docs/link/web/index.html.md#link-web-onevent-metadata-view-name-DOCUMENTARY-VERIFICATION) , [RISK\_CHECK](https://plaid.com/docs/link/web/index.html.md#link-web-onevent-metadata-view-name-RISK-CHECK) , and [SELFIE\_CHECK](https://plaid.com/docs/link/web/index.html.md#link-web-onevent-metadata-view-name-SELFIE-CHECK) .

For each session, Plaid will also inform you of the outcome of the session by sending an [IDENTITY\_VERIFICATION\_PASS\_SESSION](https://plaid.com/docs/link/web/index.html.md#link-web-onevent-eventName-IDENTITY-VERIFICATION-PASS-SESSION) or [IDENTITY\_VERIFICATION\_FAIL\_SESSION](https://plaid.com/docs/link/web/index.html.md#link-web-onevent-eventName-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.