Biometric KYC
Running Biometric KYC on IOS
Create a Callback Endpoint
Get your user's Selfie images
Get the ID information from your users
Submit the Job to Smile ID
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
Step 1.Set the User Identity Information to be validated
var userIdInfo = SIDUserIdInfo()
userIdInfo.setCountry(country : <String>); //String Alpha-2 country code
userIdInfo.setFirstName(firstName: <String#>); // String
userIdInfo.setLastName(lastName: <String>); // String
userIdInfo.setIdNumber(idNumber: <String>); // String
userIdInfo.setIdType(idType : <String>); // 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( name : String, value : String );//String for both key and value
Step 2.Set the Partner Params related to the job
var partnerParams = PartnerParams()
partnerParams.setJobId(jobId: <#T##String#>)// unique identifier string per job
partnerParams.setUserId(userId: <#T##String#>)// unique identifier for the user information being processed
partnerParams.setAdditionalValue(key: <#T##String#>, val: <#T##Any#>)//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
//
let sidNetData = SIDNetData(environment: SIDNetData.Environment.PROD)
// the instance of SIDNetworkRequest which is responsible for handling
//api calls and callbacks to your app
let sidNetworkRequest = SIDNetworkRequest()
sidNetworkRequest.setDelegate(delegate: <SIDNetworkRequestDelegate>)// an instance of SIDNetworkRequestDelegate
//which has various callback methods to your app
sidNetworkRequest.initialize()
let sidConfig = SIDConfig()
sidConfig.setSmileIdNetData(data) //Environment information
sidConfig.setUserIdInfo(userIdInfo: <SIDUserIdInfo>) // set user id info
sidConfig.setSidNetworkRequest( sidNetworkRequest : sidNetworkRequest )
sidConfig.setPartnerParams(partnerParams: <PartnerParams>) //set partner params
sidConfig.setJobType(1);//int must be set to 1
sidConfig.setAllowNewEnroll(<true/false>) ==> will allow reuse of user ids
sidConfig.setUseEnrolledImage(<true/false>) ==> will allow to update enrolled selfie
sidConfig.build(userTag:<String>) Job identifier
Step 4: Submit the Job
sidConfig.getSidNetworkRequest().submit(sidConfig: sidConfig )
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
Was this helpful?