3.4.26 • Published 10 months ago

idcheckio-sdk v3.4.26

Weekly downloads
31
License
-
Repository
-
Last release
10 months ago

image

IDCheck.io

Easily integrate a document capture and identification solution in your prospect on-boarding path.

A Javascript library for IDCheck.io WEB SDK integration.

We also support 2 other types of integrations

  • Redirection
  • Iframe

This article is focused on the Javascript library integration

Installation of the javascript library

// with npm
npm install idcheckio-sdk

// with yarn
yarn add idcheckio-sdk

Usage

Import

Import it in your code as an ES6 module :

import IdCheckIo from 'idcheckio-sdk';

You can also include it as a regular script tag on your page and use the global variable IdCheckIo:

<script src="https://sdkweb.idcheck.io/v2/assets/js/idcheckio-sdk.min.js"></script>

Display an Onboarding

In order to display an onboarding using the SDK-WEB library, you need to instantiate a IdCheckIo object, then call the init() function. This function takes an object as parameter containing the following properties :

  • uid: the onboarding identifier, obtained when calling the /onboarding/sendlink API
  • element: an HTML element or a query selector for obtaining the HTML container that will be used to display the onboarding

JS:

const idcheck = new IdCheckIo();
idcheck.init({
  url: 'https://sdkweb.idcheck.io/v2/my-path-name/5d70cb7dadad283c572bc0fc', // URL from API
  element: '#idcheck-component',
});

HTML:

<div id="idcheck-component">Loading...</div>

The IdCheckIo class constructor takes a Configuration object as parameter that can contain the following properties:

PropertyDescriptionRequiredDefault value
logThe log level to use when outputting log messages. Values = "DEBUG", "INFO", "WARN", "ERROR"false"ERROR"
wordingsObject used for overriding wordings configuration. See documentation.falseundefined
themeObject used for overriding theme configuration (header, button, logo...). See documentation.falseundefined
navigationObject used for overriding navigation configuration. See documentation.falseundefined

Configuring theme

In the Theme configuration object, you can use all the theme properties available through the REST API. See documentation.

You can also use the following additional properties :

PropertyDescriptionRequiredDefault value
hideHeaderBoolean that indicates if the header should be hidden.falsefalse
hideStepperBoolean that indicates if the stepper should be hidden.falsefalse
forceMobileLayoutBoolean that indicates if the mobile layout should be used on desktop. Setting this value to true will remove the white box with grey background on desktop.falsefalse

Configuring navigation

PropertyDescriptionRequiredDefault value
showWelcomePolicyEnum: ALWAYS, NEVER, REFERER_ONLY (By default a welcome page is displayed when the link is sent by EMAIL or SMS) that indicates if the Welcome page should be displayed.falseREFERER_ONLY
skipDocumentsListBoolean that indicates if the Documents List page should be skipped. This page will only be displayed if the list of documents to capture contains at least 2 physical documents.falsefalse
skipEndBoolean that indicates if the ending page should be skipped. If the value is set to true, the user will stay on the finalizing page (with loading spinner). This could be useful for displaying a custom ending page after receiving an "ENDED" event.falsefalse
skipCameraTutorialBoolean that indicates if the camera access page should be skipped.falsefalse

Handling events

You can react to SDK-WEB events by registering event callbacks using the IdCheckIo class.

Exemple:

idcheck.on('STARTED', (event) => console.log('sdk-web started!', event));

List of available events :

PropertyDescription
STARTEDThe onboarding has been started. A client session has been initialized.
DOCUMENT_CAPTUREDA document has been successfully captured.
NAVIGATION_WELCOMEThe welcome page is being displayed.
NAVIGATION_DOCUMENTS_LISTThe documents list is being displayed.
NAVIGATION_LEGAL_MENTIONSThe legal mentions are being displayed.
NAVIGATION_CAPTUREThe document capture page is being displayed.
NAVIGATION_LIVENESSThe liveness page is being displayed.
NAVIGATION_CAPTURE_HELPThe help page is being displayed.
NAVIGATION_ANALYSISThe document analysis page is being displayed.
NAVIGATION_WAITING_ERRORThe page inviting the user to wait while handling an onboarding error is being displayed.
NAVIGATION_WAITING_ENDThe page iniviting the user to wait while finishing to transmit data to the web API at the end of the onboarding is being displayed.
NAVIGATION_ENDThe onboarding end page is being displayed.
ENDEDThe onboarding has successfully ended. All documents have been captured.
ERRORAn error has occured. All documents could not have been captured.
ACTIVITYNon-blocking errors (ex: the user has provided an invalid document and is being asked to retry the capture).

Examples

Are you looking for an example project to get started? We have one in react.

Browser compatibility

Chrome FirefoxEdgeSafari
Latest ✔Latest ✔17+ ✔11+ ✔

Troubleshooting

  • "an ancestor violates the following Content Security Policy directive"

    We are limiting iframe integration to https://localhost:3000. To allow your domain please make a request to support Team.

Support

Please contact AriadNEXT IDCHECKIO support team if you encounter any issue with your idcheckio sdk-web integration.

Licence

Copyright (c) 2010-2020 ARIADNEXT - All Rights Reserved. NOTICE: All information contained herein is, and remains the property of ARIADNEXT and its suppliers, if any. The intellectual and technical concepts contained herein are proprietary to ARIADNEXT and its suppliers and may be covered by U.E. and Foreign Patents, patents in process, and are protected by trade secret or copyright law.

3.4.26

10 months ago

3.4.3

2 years ago

3.4.0

2 years ago

3.2.1

2 years ago

3.1.2

3 years ago

2.4.3

3 years ago

2.4.2

3 years ago

2.4.0

3 years ago

2.3.4

4 years ago

2.3.3

4 years ago

2.2.0

4 years ago

2.1.3

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago