Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adyen/kyc-components

Package Overview
Dependencies
Maintainers
0
Versions
294
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adyen/kyc-components

Adyen Kyc-components provides the required forms/elements/dropins to build up an onboarding flow based on a legalentity.

  • 1.2.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

Adyen KYC Components

Adyen Kyc-components provides the required forms/elements/dropins to build up an onboarding flow based on a legalentity.

Setup

  1. Including the sdk

    • if using npm package
    import AdyenKyc from '@adyen/kyc-components';
    
    • if using umd format, include below in the html file
    <link href="/kycexternalapi/static/sdk/1.0.0/adyen-kyc-components.css" rel="stylesheet"/>
    <script src="/kycexternalapi/static/sdk/1.0.0/adyen-kyc-components.js"  type="text/javascript" ></script>
    
  2. Initializing the sdk

       const kyc = new AdyenKyc({
           countryCode: 'US',
           clientKey: '',
           environment: 'https://kyc-test.adyen.com/kyc' OR 'https://kyc-live.adyen.com/kyc'
       });
    
  3. Including form Components

        const form = kyc.create('personalDetails',{
            onChange: val => { console.log(val) }
        });
    
        form.mount('#container');
    

Configurations based on a country are underway, each form component will be capable of take in a country as prop based on which it will be rendered. If no country is provided the country value provided at initialization step will be used to configure.

Configuration

AdyenKyc(config: Config)

Config

KeyDefaultDescription
localeen-USthe locale country code
countryUSthe resident country code
clientKeythe client key to contact the KYC external API where the configuration API lives. In order for the SDK to work, your webpage needs to configure a clientKey that can be used by the SDK. The procedure for obtaining a clientKey for KYC Components are the same as for our other Web components. The details are listed on docs.adyen.com
environmentthe domain where the KYC external api can be contacted.
AdyenKyc.create(dropinComponentName: ComponentName, options: Options)

ComponentName Possible values are:

ValueDescription
'taskList' recommendedLet the SDK list the tasks that require completion. The navigation between each task will be handled internally. The rendering of drop-ins and navigation will be decided automatically.
'individualDropin'KYC details for a natural person
'companyDropin'KYC details for an organization
'payoutAccount'KYC details for a transfer intstrument

Options

OptionRequiredTypeRemarks
isReviewOptionalbooleanChange all forms to be in review mode, essentially starting (and ending) every flow with a summary screen, with buttons changed to confirm and review.
legalEntityResponseRequiredLegal Entity object that is returned from the Legal Entities APIthis now contains extended properties, see legal-entity.ts for more details
capabilitiesRequiredarrayList of capabilities that are being requested, e.g. ['PSP_PAYOUT']
readOnlyRrequiredbooleanto set form to read only mode
countryOptionalstringoverrides resident country set in the Config that initialises the AdyenKyc
showInlineErrorsOptionalbooleanshow errors inline or only above form
onChangeOptional(state) => voidmethod that passes on the entire state when changes to the state of the forms have changed. state in the case of the Individual form will be of type IndividualSchema.
onSubmitOptional(state) => voidmethod that passed on the entire state after submitted data has been handled by the backend (successfully received a 200 response).
i.e. User clicks form submit -> API handler promise fired -> promise resolves successfully -> fires onSubmit
handleGetLegalEntityRequired(legalEntityId: string) => Promise<LegalEntity>method for getting a Legal Entity using the legalEntities API.
handleCreateLegalEntityRequired(data: LegalEntity) => Promise<LegalEntity>method for creating a legal entity using the legalEntities API.
handleUpdateLegalEntityRequired(data: LegalEntity, legalEntityId: string) => Promise<LegalEntity>method for updating a legal entity using the legalEntities API.
handleCreateIdDocumentRequired(data: Document) => Promise<Document>method for creating a document using the documents API.
handleUpdateIdDocumentRequired(data: Document, , documentId: string) => Promise<Document>method for updating a document using the documents API.

Server configuration

To complete the setup of the Adyen SDK the following additional configurations are needed on your server. These configurations are listed below.

Content Security Policy

In order for the SDK to reach out to the Adyen servers for configuration requests and assets, additional Content Security Policy need to be configured. On top of your existing configration the following domains need to be added:

EnvironmentCSP SectionValue
Testconnect-srchttps://kyc-test.adyen.com
Testfont-srchttps://kyc-test.adyen.com
Testimg-srchttps://kyc-test.adyen.com
Liveconnect-srchttps://kyc-live.adyen.com
Livefont-srchttps://kyc-live.adyen.com
Liveimg-srchttps://kyc-live.adyen.com

FAQs

Package last updated on 06 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc