# Adyen KYC Components (Onboarding Components)

`adyen-kyc-components` provides the required pieces to build an onboarding flow based on a legal entity. To onboard and verify users, you need to create a user interface (UI) to collect user data. To speed up building your integration, Adyen offers onboarding components. You can integrate these components into your UI to let your users enter their data. The component then uses the entered data to create the relevant resource. This means you don't need to implement the API call to create the resource yourself.

## Setup

1. Install and import the npm package

   - Install the node package

   ```
    npm install @adyen/kyc-components --save
   ```

   - Import the package and the style sheet in your application

   ```
    import AdyenKyc from '@adyen/kyc-components';
    import '@adyen/kyc-components/styles.css';
   ```

2. Initializing the sdk

   ```js
   const adyenKycHandler = new AdyenKyc({
     locale: 'en-US',
     country: 'US',
     environment: 'https://test.adyen.com',
     sdkToken: token,
     getSdkToken,
   });
   ```

3. Including createTransferInstrument component

   ```js
   const createTransferInstrumentComponent = adyenKycHandler
     .create('createTransferInstrumentComponent', {
       legalEntityId,
       transferInstrumentId, // Optional
       openBankingPartnerConfigId: 'YourBrandOBConfigId',
       settings: {
         allowIntraRegionCrossBorderPayout: true, // Optional
         allowBankAccountFormatSelection: true, // Optional
       },
       onSubmitSuccess: (submittedData) => {},
     })
     .mount('#create-transfer-instrument-container'); // Mount to the container you created
   ```

See our [Onboarding components documentation](https://docs.adyen.com/platforms/onboard-users/onboarding-components/) for more details.

## Supported countries/regions

You can use the Onboarding components to onboard users operating in countries listed [here](https://docs.adyen.com/platforms/onboard-users/onboarding-components/#supported-countries-regions).

## Supported languages

You can localize the Onboarding components by setting `locale` parameter to one of the supported languages listed [here](https://docs.adyen.com/platforms/onboard-users/onboarding-components/#supported-languages).
