Onboard users with Layer 
=========================

#### A guide to integrating Layer with Plaid Check 

#### Overview 

This guide will walk you through how to onboard users to Plaid Check with Layer. This process involves creating a user, onboarding the user with Layer, and retrieving the user's Plaid Check data.

#### Integration steps 

##### Create a user 

1.  Create a `user_id` using the [/user/create](https://plaid.com/docs/api/users/index.html.md#usercreate) endpoint. At this stage, the `identity` field is optional.

##### Onboard the user with Layer 

1.  Onboard the user by following Layer's [Integration Overview steps](https://plaid.com/docs/layer/index.html.md#integration-overview) .  
    When creating the Link token via [/session/token/create](https://plaid.com/docs/api/products/layer/index.html.md#sessiontokencreate) , pass in the `user_id` you created in the top-level `user_id` field and be sure the template used has CRA products enabled.
    
    If you are using Transactions in conjunction with both CRA products and Layer, then when calling [/link/token/create](https://plaid.com/docs/api/link/index.html.md#linktokencreate) , provide `transactions` in the `additional_consented_products` array (rather than the `products` array) and call [/transactions/sync](https://plaid.com/docs/api/products/transactions/index.html.md#transactionssync) only _after_ receiving the `USER_CHECK_REPORT_READY` webhook. This is necessary to avoid a known issue with Chase Bank Items in which CRA reports may fail to generate for Layer sessions if a Transactions extraction is triggered before the CRA report generation is complete.
    
2.  Call [/user\_account/session/get](https://plaid.com/docs/api/products/layer/index.html.md#user_accountsessionget) to retrieve user-permissioned identity information.
    
3.  After processing the identity information, update the Plaid user record by calling the [/user/update](https://plaid.com/docs/api/users/index.html.md#userupdate) endpoint. Populate the `identity` field with the relevant information. At minimum, the following fields must be provided and non-empty: `name`, `date_of_birth`, `emails`, `phone_numbers`, and `addresses` (with at least one email address, phone number, and address designated as `primary`). Providing at least a partial SSN via the `id_numbers` field is highly recommended, since it improves the accuracy of matching user records during compliance processes such as file disclosure, dispute, or security freeze requests.
    

##### Retrieve the user's Plaid Check data 

1.  Now that the identity information has been added to the user record, you can generate a Consumer Report by calling [/cra/check\_report/create](https://plaid.com/docs/api/products/check/index.html.md#cracheck_reportcreate) .
    
2.  Once the Consumer Report has been generated (indicated by a `USER_CHECK_REPORT_READY` webhook), retrieve the report by calling [/cra/check\_report/base\_report/get](https://plaid.com/docs/api/products/check/index.html.md#cracheck_reportbase_reportget) , [/cra/check\_report/income\_insights/get](https://plaid.com/docs/api/products/check/index.html.md#cracheck_reportincome_insightsget) , [/cra/check\_report/partner\_insights/get](https://plaid.com/docs/api/products/check/index.html.md#cracheck_reportpartner_insightsget) , or [/cra/check\_report/pdf/get](https://plaid.com/docs/api/products/check/index.html.md#cracheck_reportpdfget) .