Enhanced KYC

Previously and also when sending job in the SDK this is set as job type 5

Running Enhanced KYC on the Android SDK

  1. Get the ID information from your users

  2. Submit the Job to Smile ID

  3. Interpret your results

Get the ID information from your users

It is important that this information is gathered according to supported id types and required information as listed on this section. Please ensure that data is validated before sending information over to avoid unnecessary errors.

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)//
.setJobType(5);//int must be set to 5
.build(<TAG>)// string must be a unique string

Step 4: Submit the Job

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

Step 5: Interpret your results

IDValidationResponse 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 Enhanced KYC section of the docs.

Last updated