Enhanced KYC
Previously and also when sending job in the SDK this is set as job type 5
- 1.Get the ID information from your users
- 2.Submit the Job to Smile Identity
- 3.Interpret your results
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.
// 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>
...
}
const geoInfo = {
accuracy: number
altitude: number,
latitude: number,
longitude: number,
lastUpdate: string,
isGeoPermissionGranted: boolan
}
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 5 and is requiredisProduction (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 herecallBackUrl (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 inpartnerParams (Optional)
This is the object create in the step above related to partner paramsidInfo (Required)
This is the object create in the step above related to user id informationgeoInfo
(Optional) This is any information that may be necessary to associate the job with any geolocation
This will return an object which 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 modified 8mo ago