Face Liveness

Instantpay Face Liveness helps you verify that a user going through facial verification is physically present in front of a camera. It detects spoof attacks presented to a camera or trying to bypass a camera. Users can complete a Face Liveness check by taking a short video selfie where they follow a series of prompts intended to verify their presence.

When you configure your application to integrate with Face Liveness feature, it uses the following API operations:

Step 1- Create Face Liveness Session

Starts a Face Liveness session, letting the Face Liveness detection model be used in your application. Returns a sessionId and accessToken for the created session.

Step 2 : Start Face Liveness Session

When the Create Face Liveness Session API operation finishes, Instantpay will provide a component to performs the Start Face Liveness Session operation. The user is prompted to capture a video selfie. For a successful check, the user must position their face within the onscreen oval while maintaining good lighting.

Step 3 : Get Session Result

Retrieves the results of a specific Face Liveness session, including a Face Liveness confidence score, reference image, and audit images.

Calling the Face Liveness API

You can call the createSession and getSessionResults APIs with the below SDK. The following section guide you how to call these APIs with the SDKs.

SDK URL

https://static.instantpay.in/assets/idv/ipayfaceliveness.js

The following snippet demonstrates how to call the Face Liveness APIs

{
        debug : false,
        selectorId : '', //Id Of the element in which liveness should be open
        sessionId : '', //Required, to start the liveness journey
        accessToken : '', //Required, to start the liveness journey
        disableStartScreen : false, //default false, // Optional parameter for the disabling the start
        onCancelCallback : '', //Function ; Callback called when the user cancels the flow. This callback is also called when users click the "Try Again" button in the default error modal.
        onErrorCallback : '', //Required, //Function ; Callback called when there is error occured on any step.; (error: LivenessError) => void
        onSuccessCallback : '',//Required, //Function ; Callback that signals when the liveness session has completed analysis. At this point a request can be made to GetFaceLivenessSessionResults.
        welcomeScreenConfig : {
            hideScreen : false,
            hideTitleBar : false,
            title : 'Liveness Check',
            hideCloseButton : false,
            description : 'You will go through a face verification process to prove that you are a real person.',
            extraInstructionPoint : [],
            proceedButtonText : 'Proceed Liveness Check'
        },
        verificationScreenConfig : {
            hideTitleBar : false,
        },
        onChangeDisplayText : {
            hintCenterFaceText : 'Center your face', //'Center your face'
            startScreenBeginCheckText : 'Start video check', //'Start video check'
            hintTooCloseText: 'Move back', //'Move back',
            hintTooFarText: 'Move closer', //'Move closer',
            hintConnectingText: 'Connecting...', //'Connecting...',
            hintVerifyingText: 'Verifying...', //'Verifying...',
            hintCheckCompleteText: 'Check complete', //'Check complete',
        },
        config : {
            hidePhotosensitiveWarning : false, //default false; set true to hide the warning
            color : {
                backgroundPrimary : '#FFFFFF',
                fontPrimary : '#0d1926',
                primary10 : '#e9f9fc',
                primary20 : '#bcecf5',
                primary40 : '#7dd6e8',
                primary60 : '#40aabf',
                primary80 : '#047d95',
                primary90 : '#005566',
                primary100 : '#00404d',
                button : {
                    background : '#047d95',
                    hover : '#005566',
                    focus : '#005566',
                    active : '#00404d',
                },
                loader : {
                    primary : '#304050',
                }
            }
        }
    }

The client can modify the above snippet to customize the view as per their requirements. Additionally, clients can add descriptions beyond the static five provided.