Skip to content
Veriff SDK for browser integration
Branch: master
Clone or download
Latest commit 007d442 May 8, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts fixes build script Jun 26, 2018
src version increase && minor fixes Jun 22, 2018
test fixes karma coinfiguration and tests Jun 26, 2018
.babelrc initial commit Jan 24, 2018
.eslintrc minor changes in xhr Jan 24, 2018
.gitignore removes gitignored folders Jul 2, 2018
.npmignore adds response handling flexibility to the sdk May 3, 2018 Update May 8, 2019
package-lock.json updates dependencies Jul 2, 2018
package.json updates dependencies Jul 2, 2018

owner description status type
Client Tools
JS SDK for easy integration with Veriff

Veriff JS SDK

Veriff JS SDK, is a simple and customisable library which helps to integrate with Veriff Online Identity solution.


Include as a script tag:

<script src=''></script>

add the CSS styles:

<link rel='stylesheet' href=''>

or install it via a package manager, styles are added inline

$ npm install --save @veriff/js-sdk
 // CommonJS
 var Veriff = require('@veriff/js-sdk');

 // ES6 style import
 import Veriff from '@veriff/js-sdk';


Veriff JS SDK requires one parent element in HTML:

<div id='veriff-root'></div>

In order to initialize the library, API Key, parentId and onSession callback function is required.

  var veriff = Veriff({
    env: 'production', // or 'staging'
    apiKey: 'API_KEY',
    parentId: 'veriff-root',
    onSession: function(err, response) {
      // received the response, verification can be started now

By default the following form will be rendered:

alt text

onSession function is executed after the response is received from the API, response body contains a verification object with following schema:

    "status": "success",
    "verification": {
        "id": "UUID V4 Identifying the verification",
        "url": "full url to which a person should be redirected in order to proceed with verification flow",
        "host": "hostname",
        "status": "status of the verification",
        "sessionToken": "JWT encoded verification token"

In case the Given name / Last name or both are known, they can be passed to the SDK, therefore text input fields will not be rendered.

    person: {
      givenName: 'Foo',
      lastName: 'Bar',
      idNumber: 12345

additionally the input labels and button text value can be customised.

    formLabel: {
      givenName: 'First name',
      lastName: 'Family name',
      idNumber: 'Id'
    submitBtnText: 'Veriff Me'
    loadingText: 'Please wait...'
You can’t perform that action at this time.