Biometric KYC

Running Biometric KYC on Android

  1. Create a Callback Endpoint

  2. Get your user's Selfie images

  3. Get the ID information from your users

  4. Submit the Job to Smile ID

  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.When using the Smile ID UI please see Presenting Screens and Selfie Configuration on how to present the selfie capture screen and when using the Smile ID SDK please see Smartselfie Capture on how to integrate directly with the selfie capture view.

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 ID

//Instantiation
SIDMetadata metadata = new SIDMetadata();

//To get the user id information
SIDUserIdInfo userIdInfo = metadata.getSidUserIdInfo();

//To get the partner parameters
PartnerParams params  = metadata.getPartnerParams();

SIDMetadata is useful for information that needs to be sent to Smile ID, it provides a way of setting PartnerParams which are useful for sending job related information and SIDUserInfo which is useful for sending user id related information. Once instantiated please reuse the same instance per job but it's important to make sure this is not reused across jobs

Step 1.Set the User Identity Information to be validated

// Instantiate the metadata which
// holds all information to be sent to Smile ID

SIDMetadata metadata = new SIDMetadata();

SIDUserIdInfo userIdInfo = metadata.getSidUserIdInfo();
userIdInfo.setCountry(<Country Code>); //String Alpha-2 country code
userIdInfo.setFirstName(<First Name>); // String
userIdInfo.setLastName(<Last Name>); // String
userIdInfo.setIdNumber(<ID Number>); // String
userIdInfo.setIdType(<ID Type>); // String

//Useful if there is anything which is not catered
//for by the strongly typed methods above so you can add
//for example dob as a key and the date as the value
userIdInfo.additionalValue(<Key>, <Value>);//String for both key and value
PartnerParams partnerParams = metadata.getPartnerParams();
partnerParams.setJobId(<Job ID>);// unique identifier string per job
partnerParams.setUserId();// unique identifier for the user information being processed
partnerParams.additionalValue(<key>,<value>)//string key and value
                                            // for anything etra which you may need associated with the job

Step 3:Create the config

//Set the environment which can be either
// SIDNetData.Environment.PROD or  SIDNetData.Environment.TEST
//

SIDNetData data = new SIDNetData(this, SIDNetData.Environment.PROD);

SIDConfig config = new SIDConfig.Builder(this)
.setSmileIdNetData(data) //Environment information
.setGeoInformation(<GeoInfos>)//optional GeoInfos with geo information
.setSIDMetadata(metadata)//the same object with partner params and user id info
.setMode(SIDConfig.Mode.ENROLL)//
.setAllowNewEnroll(<true/false>) ==> will allow reuse of user ids
.useEnrolledImage(<true/false>) ==> will allow to update enrolled selfie
.setJobType(1);//int must be set to 1
.build(<TAG>)// string must be a unique string

Step 4: Submit the Job

SIDNetworkRequest sIDNetworkRequest = new SIDNetworkRequest(<Contect>)
mSINetworkRequest.setOnCompleteListener(this);
mSINetworkRequest.setOnEnrolledListener(this);
mSINetworkRequest.set0nErrorListener(this);
mSINetworkRequest.submit(config)//the object from above

Step 5: Interpret your results

SIDResponse 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.

Last updated