Link Webview SDK
Reference for integrating with the Link Webview JavaScript SDK
Using webviews to present Link is deprecated. If you're currently integrating this way, we recommend migrating to Hosted Link or one Plaid's official SDKs for Android, iOS, and React Native.
All Webview-based integrations need to extend the Webview handler for redirects in order to support connections to Chase. This can be accomplished with code samples for iOS and Android. For more details, see Extending webview instances to support certain institutions in the OAuth Guide and the in-process Webview deprecation notice. Webview-based integrations that do not extend the Webview handler are not supported by Chase and may be blocked by Chase in the future.
If your integration does not connect to Chase (for example, because you use only Identity Verification, Document Income, or Payroll Income, or you do not support end users in the US) you may ignore this warning.
Overview
To integrate and use Plaid Link inside a Webview, we recommend starting with one of our sample Webview apps:
Each example app is runnable (on both simulators and devices) and includes code to initialize Link and process events sent from Link to your app via HTTP redirects.

Installation
Link is optimized to work within Webviews, including on iOS and Android. The Link initialization URL to use for Webviews is:
1https://cdn.plaid.com/link/v2/stable/link.htmlThe Link configuration options for a Webview integration are passed via querystring rather than via a client-side JavaScript call. See the create section below for details on the available initialization parameters.
Communication between Link and your app
Communication between the Webview and your app is handled by HTTP redirects rather than client-side JavaScript callbacks. These redirects should be intercepted by your app. The example apps include sample code to do this.
All redirect URLs have the scheme plaidlink. The event type is communicated via the URL host and data is passed via the querystring.
1plaidlink://There are three supported events, connected, exit, and event, which are documented below.
Create
Properties
isWebviewtrue, to trigger the Webview integration.tokenlink_token to authenticate your app with Link. This is a short lived, one-time use token that should be unique for each Link session. In addition to the primary flow, a link_token can be configured to launch Link in update mode. See the /link/token/create endpoint for a full list of configurations.receivedRedirectUrireceivedRedirectUri is required to support OAuth authentication flows when re-launching Link on a mobile device. Note that any unsafe ASCII characters in the receivedRedirectUri in the webview query string must be URL-encoded.keypublic_key is no longer used for new implementations of Link. If your integration is still using a public_key, please contact Plaid support or your account manager.1https://cdn.plaid.com/link/v2/stable/link.html2 ?isWebview=true3 &token="GENERATED_LINK_TOKEN"4 &receivedRedirectUri=connected
The connected event is analogous to the onSuccess callback in Link Web and is sent when a user successfully completes Link. The following information is available from the querystring event:
Properties
public_tokennull. If using Document Income or Payroll Income, the public_token will be returned, but is not used.institution_name'Wells Fargo'institution_idaccountsaccounts will only include selected accounts._idaccount_idtypesubtypeverification_statusverification_status. See Auth accounts for a full list of possible values.class_typebusiness or personal account.transfer_statusCOMPLETE– The transfer was completed.INCOMPLETE– The transfer could not be completed. For help, see Troubleshooting Transfer UI.
COMPLETE, INCOMPLETElink_session_id1plaidlink://connected2 ?public_token=public-sandbox-fb7cca4a-82e6-47073 &institution_id=ins_34 &institution_name=Chase5 &accounts='[{"_id":"QPO8Jo8vdDHMepg41PBwckXm4KdK1yUdmXOwK", "meta": {"name":"Plaid Savings", "number": "0000"}, "subtype": "checking", "type": "depository" }]'6 &link_session_id=79e772be-547d-4c9c-8b76-4ac4ed4c441a1"accounts": [2 {3 "_id": "ygPnJweommTWNr9doD6ZfGR6GGVQy7fyREmWy",4 "meta": {5 "name": "Plaid Checking",6 "number": "0000",7 },8 "type": "depository",9 "subtype": "checking",10 "verification_status": null11 },12 {13 "_id": "9ebEyJAl33FRrZNLBG8ECxD9xxpwWnuRNZ1V4",14 "meta": {15 "name": "Plaid Saving",16 "number": "1111"17 },18 "type": "depository",19 "subtype": "savings"20 }21 ...22]exit
The exit event is analogous to the onExit callback and is sent when a user exits Link without successfully linking an Item, or when an error occurs during Link initialization. Note that on Android devices, an exit event will not be sent if the user exits Link through a system action, such as hitting the browser back button. The following information is available from the querystring:
Properties
statusrequires_questionsrequires_selectionsrequires_codechoose_devicerequires_credentialsrequires_account _selectionrequires_oauthinstitution_not_foundinstitution_not _supportederror_typeerror_codeerror_type has a specific set of error_codes.error_messagedisplay_messagenull if the error is not related to user action. This may change over time and is not safe for programmatic use.institution_nameWells Fargoinstitution_idlink_session_idrequest_id1plaidlink://exit2 ?status=requires_credentials3 &error_type=ITEM_ERROR4 &error_code=ITEM_LOGIN_REQUIRED5 &error_display_message=The%20credentials%20were%20not%20correct.%20Please%20try%20again.6 &error_message=the%20credentials%20were%20not%20correct7 &institution_id=ins_38 &institution_name=Chase9 &link_session_id=79e772be-547d-4c9c-8b76-4ac4ed4c441a10 &request_id=m8MDnv9okwxFNBVevent
The event message is analogous to the Link Web onEvent callback and is called as the user moves through the Link flow. The querystring will always contain all possible keys, though not all keys will have values. The event_name will dictate which keys are populated.
Properties
event_nameAUTO_SUBMIT_PHONE/link/token/create call and the user has previously consented to receive OTP codes from Plaid.BANK_INCOME_INSIGHTS _COMPLETEDCLOSE_OAUTHCONNECT_NEW _INSTITUTIONERRORerror_code metadata.FAIL_OAUTHHANDOFFIDENTITY_MATCH_FAILEDIDENTITY_MATCH_PASSEDINSTANT_MICRODEPOSIT _AUTHORIZEDMATCHED_SELECT _INSTITUTIONrouting_number was provided when calling /link/token/create. For details on which scenario is triggering the event, see metadata.matchReason.OPENOPEN_MY_PLAIDOPEN_OAUTHSAME_DAY_MICRODEPOSIT _AUTHORIZEDSEARCH_INSTITUTIONSELECT_BRANDSELECT_BRAND event is only emitted for large financial institutions with multiple online banking portals.SELECT_DEGRADED _INSTITUTIONDEGRADED health status and was shown a corresponding message.SELECT_DOWN _INSTITUTIONDOWN health status and was shown a corresponding message.SELECT_FILTERED _INSTITUTIONSELECT_INSTITUTIONSKIP_SUBMIT_PHONESUBMIT_ACCOUNT_NUMBERaccount_number_mask metadata to indicate the mask of the account number the user provided.SUBMIT_CREDENTIALSSUBMIT_DOCUMENTSSUBMIT_DOCUMENTS_ERRORSUBMIT_DOCUMENTS _SUCCESSSUBMIT_MFASUBMIT_OTPSUBMIT_PHONESUBMIT_ROUTING_NUMBERrouting_number metadata to indicate user's routing number.TRANSITION_VIEWTRANSITION_VIEW event indicates that the user has moved from one view to the next.VERIFY_PHONEVIEW_DATA_TYPESerror_typeERROR, EXIT.error_codeERROR, EXIT.error_messageERROR, EXIT.exit_statusEXITinstitution_idinstitution_nameinstitution_search _querySEARCH_INSTITUTION.is_update_modeOPEN.match_reasonreturning_user or routing_number if emitted by: MATCHED_SELECT_INSTITUTION.
Otherwise, this will be SAVED_INSTITUTION or AUTO_SELECT_SAVED_INSTITUTION if emitted by: SELECT_INSTITUTION.mfa_typecode, device, questions, selections. Emitted by: SUBMIT_MFA and TRANSITION_VIEW when view_name is MFAview_nameTRANSITION_VIEW.ACCEPT_TOSCONNECTEDCONSENTCREDENTIALDOCUMENTARY _VERIFICATIONERROREXITINSTANT_MICRODEPOSIT _AUTHORIZEDKYC_CHECKLOADINGMFANUMBERSOAUTHRECAPTCHARISK_CHECKSAME_DAY_MICRODEPOSIT _AUTHORIZEDSCREENINGSELECT_ACCOUNTSELECT_BRANDSELECT_INSTITUTIONSELECT_SAVED_ACCOUNTSELECT_SAVED _INSTITUTIONSELFIE_CHECKSUBMIT_PHONEVERIFY_PHONEVERIFY_SMSrequest_idlink_session_idlink_session_id is a unique identifier for a single session of Link. It's always available and will stay constant throughout the flow. Emitted by: all events.timestamp2017-09-14T14:42:19.350Z. Emitted by: all events.selectionflow_type_manual or flow_type_instant. Emitted by: SELECT_AUTH_TYPE.1plaidlink://event2 &event_name=SELECT_INSTITUTION3 ?error_type=ITEM_ERROR4 &error_code=ITEM_LOGIN_REQUIRED5 &error_message=the%20credentials%20were%20not%20correct6 &exit_status7 &institution_id=ins_558 &institution_name=HSBC9 &institution_search_query=h10 &mfa_type11 &view_name=ERROR12 &request_id13 &link_session_id=821f45a8-854a-4dbb-8e5f-73f75350e7e714 ×tamp=2018-10-05T15%3A22%3A50.542ZOAuth
Using Plaid Link with an OAuth flow requires some additional setup instructions. For details, see the OAuth Guide.
Supported platforms
Plaid officially supports WKWebView on iOS 10 or later and Chrome WebView on Android 4.4 or later.