Skip to content

Overview

Identity Verification is a module of a client-side JavaScript SDK that allows you to verify IDs and selfies with Mosaic.

Installation

Load the SDK:

npm install @transmitsecurity/platform-web-sdk@^2

Initialization

To initialize, use the following code:

Note

Identity Verification module requires the Fraud Prevention module to be imported and initialized.

import { idv, drs, initialize } from '@transmitsecurity/platform-web-sdk';

// Initialize SDK
// If SDK was loaded via script tag, use window.tsPlatform.initialize({ ... })
initialize({
  clientId: 'your-client-id',
  idv: {
    serverPath: 'https://api.transmitsecurity.io/verify', // Required: Set serverPath based on your region or custom domain
    consentVersion: 'CONSENT_VERSION', // ID of the consent document
    callbacks: callbacks // Callback methods
  },
  drs: {
    serverPath: 'https://api.transmitsecurity.io/risk-collect/', // Required: Set serverPath based on your region or custom domain
  }
});

Customizations:

NameTypeDescription
serverPathstring(Required) The Identity Verification module should be configured to work with your region or custom domain by setting serverPath to:
- https://api.transmitsecurity.io/verify (for US)
- https://api.eu.transmitsecurity.io/verify (for EU)
- https://api.ca.transmitsecurity.io/verify (for Canada)
- https://api.au.transmitsecurity.io/verify (for Australia)
- https://api.sbx.transmitsecurity.io/verify (for sandbox)
- https://<your_custom_domain>/verify (for custom domain)
For the SDK modules to work properly together, the regions must match.
consentVersionstringID of the consent document.
callbacksobjectCallback methods for handling verification events.
languagestringLanguage code for the SDK UI (e.g., 'en').
rootElementstringID of the root container element for the SDK UI.