Smile Identity
Search…
⌃K

Biometric KYC

Running Biometric KYC on React Native

  1. 1.
    Create a Callback Endpoint
  2. 2.
    Get your user's Selfie images
  3. 3.
    Get the ID information from your users
  4. 4.
    Submit the Job to Smile Identity
  5. 5.
    Interpret your results

Create a Callback Endpoint

Responses from this product are asynchronous (based on various actions we carry out on the product) and are sent as soon as they are ready, you will need to setup a callback when submitting a job. You can read about creating a Callback URL here.

Get the User's Selfie

To successfully run Biometric KYC jobs you need to submit the user's selfie.Please see SmartSelfie capture as specified here, it is important to recognise that the tag supplied and or returned from this is what will need to be used to submit the Job

Get the ID information from your users

To submit a Biometric KYC job you need the ID information of your user. Depending on the ID type you are attempting to query, the required information varies. For the comprehensive list of required information for each ID Type, check the Supported ID Types section of the docs.

Submit the Job to Smile Identity

Step 1.Set the User Identity Information to be validated

// Instantiate the metadata which
//Instantiation
const userIdInfo = { "country": <country>, //String Alpha-2 country code
"id_type": <idType>,
"id_number": <idNumber>,
"first_name": <firstName>,
"middle_name": <middleName>,
"last_name": <lastName>,
"email": <email>,
"<OTHER_KEY>":<OTHER_KEY_VALUE>
}
const partnerParams = {
"job_id":<YOUR JOB ID>,
"user_id":<YOUR USER ID>,
...
"<OTHER_KEY>":<OTHER_KEY_VALUE>
...
}

Step 3: Optional Set Geo Information

const geoInfo = {
accuracy: number
altitude: number,
latitude: number,
longitude: number,
lastUpdate: string,
isGeoPermissionGranted: boolan
}

Step 4: Submit the Job

const result = await RnSmileId.submitJob(
tag: string,
jobType: number,
isProduction: boolean,
partnerParams: object,//optional pass {} when not available
idInfo: object,//optional pass {} when not available
geoInfo: object//optional pass {} when not available
callbackUrl: string//optional pass '' when not available
);
  • jobType should be set to 1 and is required
  • isProduction (required)should be set to true if you intent to run in production and false if you intend to run in sandbox, it is important to note you cannot run real ID Numbers check on sandbox, for test data please see here
  • callBackUrl (Optional)can be null but if not it should be a url which the job data will be posted to depending on the status the job is in
  • partnerParams (Optional)This is the object create in the step above related to partner params
  • idInfo (Required)This is the object create in the step above related to user id information
  • geoInfo (Optional) This is any information that may be necessary to associate the job with any geolocation

Step 5: Interpret your results

The result hashmap is an object will contain results returned from the api this contains strongly typed method to get the response as individual items or as json object or as a string, for more information on how to interpret results you can read more about result codes and responses in the Biometric KYC section of the docs.