Skip to main content

Quick Integrations

This powerful SDK enables the integration of multiple verification journeys using just a single line of code, catering to various user events and scenarios ShuftiPro All-In-One SDK automatically listens for the Journey you associate with a customer and initiates the verification process immediately.

The ShuftiPro Web SDK quick integration can be done in two simple steps:

1. Initialize the SDK.
2. Trigger the verification journey

1.Initialize the SDK

initialize-the-shuftiPro-sdk
import ShuftiPro from 'shuftipro-web-sdk';

const shuftiPro = new ShuftiPro();

shuftiPro
.init({
client_id: 'YOUR_CLIENT_ID',
customer_id: 'YOUR_CUSTOMER_ID',

containerId: 'div-ID', // optional
// or
iframeId: 'iframe-ID', // optional
})
.start();
Note

To demonstrate the initialization of the All-in-One SDK, download the sample HTML file

Note

In order to associate a new user with a Journey we need to trigger it’s verification, which can be initiated through the following API here.

Parameters

ParametersDescription
client_idRequired: Yes
Type: String
Your ShuftiPro client ID obtained from the back office.
customer_idRequired: Yes
Type: String
The unique identifier of the user within your application. This ID is likely generated by your application upon user registration.
containerIdRequired: No
Type: String
The ID of the HTML element where the verification interface will be mounted.
iframeIdRequired: No
Type: String
The ID of the HTML element where the verification interface will be mounted. Alternative of containerId
Note

To display the verification process within a specific container, initialize the div container and use its ID in the containerId field. You must provide either containerId or iframeId. If the iframeId field is provided, the containerId field will be ignored. If neither is provided, the iframe will open in a popup window.

2.Trigger verification Journey

This API triggers verification for a given customer (customer_id) with the provided verification journey (journey_id).

API Endpoint

https://api.shuftipro.com/create/customer/journey

Authorization Keys

To generate requests using mobile SDKs, you need to obtain the authorizations keys by following given steps here.

Request Parameters

ParametersDescription
journey_idRequired: Yes
Type: String
The unique identifier of the verification journey you want to associate with the user. This ID is typically obtained from your ShuftiPro back office platform where you define the verification steps for each journey.
customer_idRequired: Yes
Type: String
The unique identifier of the user within your application. This ID is likely generated by your application upon user registration.
referenceRequired: No
Type: String
Each request is assigned a unique reference ID, will be generated if not provided.

Request payload

customer-journey-creation-payload
{
"journey_id" : "ULMTCqye1719840116",
"customer_id" : "testingCustomer595",
// optional
"reference" : "12345678"
}

Response parameters

ParametersDescription
errorType: Bool
If the association fails, ShuftiPro will return error bool as true, else false.
messageType: String
If the association is successful, ShuftiPro might return a success response message.