Enhanced Integrations
Instead of customer ID, you can directly initialize your SDK with the specific Journey using its Journey ID. This approach eliminates the need to initiate the customer verification journey through. This method offers more flexibility but requires managing authentication tokens.
Initialize the SDK
const shuftiPro = new ShuftiPro();
shuftiPro.setToken(token); // Replace with your actual token
shuftiPro.init({
payload: {
'reference':'request-ref-1221',
'journey_id': 'journey-refsadfasdf'
},
containerId: 'verification-container' // (optional)
});
shuftiPro.start((response) => {
console.log('Verification started:', response);
});
To demonstrate the initialization of the All-in-One SDK, download the sample HTML file
Your ShuftiPro Web SDK token is essential for enhanced integration. To generate requests using this flow, you need to obtain the authorizations keys by following given steps here. For access token you can refer to this page for complete guide on authentication token here. This one time used access token, It must be renewed after each request
Request Parameters
Parameters | Description |
---|---|
payload | Required: Yes Type: Object An object containing the following elements. |
containerId | Required: No Type: String The ID of the HTML element where the verification interface will be mounted. |
iframeId | Required: No Type: String The ID of the HTML element where the verification interface will be mounted. Alternative of containerId |
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.
Payload Parameters
The payload parameter is an object containing the following elements:
Parameters | Description |
---|---|
reference | Required: Yes Type: String Each request is issued a unique reference ID which is sent back to Shufti Pro’s client with each response. This reference ID helps to verify the request. The client can use this ID to check the status of already performed verifications. |
journey_id | Required: Yes (if generic request object is not provided) Type: String Each journey is issued a unique reference ID which is sent back to shufti pro. This reference helps to start the Journey Client intended for. To know more about journey builder please refer this link |