Enhanced KYC

Required Class: ID Api Class (only available on versions 1.0.1 and above)

Running Enhanced KYC on Java

  1. Get your Smile ID Partner ID

  2. Get your decoded version of the API Key

  3. Get the ID information from your users

  4. Submit the Job to Smile ID

  5. Interpret your results

Get your Partner ID

You can find your Partner ID in the developer section of the portal.

Get your decoded API Key

Your decoded API Key is also in the developer section of the portal.

  • Click on the Generate New API Key button

  • Copy your decoded API Key (must be striped of the BEGIN and END line and the rest needs to be all on one line)

Get the ID information from your users

To submit an Enhanced 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

submitJob method

Copy this code and replace sections marked with <>

String partnerId = "<Put your partner ID here>";
String defaultCallback = "<Put your default callback url here>";
String apiKey = "<Put your API key here>";
String sidServer = "< 0 || 1 >";  // Use '0' for the sandbox server and '1' for production

IDApi connection = new IDApi(partnerId, apiKey, sidServer);

// Create required tracking parameters
Map<String, Object> optionalInfo = new HashMap(); // map of optional parameters partner uses to track jobs. can be left empty
PartnerParams params = new PartnerParams(JobType.ENHANCED_KYC, "<unique ID for user>", "< unique job ID >", optionalInfo);

// Create ID number info
IdInfo idInfo = new IdInfo("< firstName >",
    "< middleName >",
    "< lastName >",
    "< 2 letter country code >",
    "< id type >",
    "< valid id number >",
    "< date of birth yyyy-mm-dd >",
    "< phone number >"
);

// Options for the job
boolean returnJobStatus = false; // Set to true if you want to get
// the job result in sync (in addition to the result been sent to
// your callback). If set to false, result is sent to callback url only
boolean returnHistory = false; // Set to true to receive all of the
// updates you would otherwise have received in your callback as
// opposed to only the final result. You must set return_job_status
// to true to use this flag.
boolean returnImageLinks = false; // Set to true to receive links to
// the selfie and the photo it was compared to. You must set
// return_job_status to true to use this flag.
String callBackUrl = "< optional callback url to use for this job only >";
Options options = new Options(returnHistory, returnImageLinks, returnJobStatus, callBackUrl);

// Submit the job
JobStatusResponse response = connection.submitJob(params, idInfo, options);

Example Response Body

Your response will be a JobStatusResponse object representation of the JSON below:

{
  "SmileJobID": "0000001105",
  "PartnerParams": {
    "user_id": "T6yzdOezucdsPrY0QG9LYNDGOrC",
    "job_id": "FS1kd1dd15JUpd87gTBDapvFxv0",
    "job_type": 5
  },
  "ResultText": "ID Number Validated",
  "ResultCode": "1012",
  "Actions": {
    "Verify_ID_Number": "Verified",
    "Return_Personal_Info": "Returned"
  },
  "Country": "NG",
  "IDType": "DRIVERS_LICENSE",
  "IDNumber": "ABC000000000",
  "ExpirationDate": "2017-10-28",
  "FullName": "John Doe",
  "DOB": "1900-09-20",
  "Photo": "SomeBase64Image",
  "sec_key": "pjxsx...",
  "timestamp": 1570698930193
}

Interpret your Results

You can read more about result codes and responses in the Enhanced KYC section of the docs.

Last updated