Enhanced KYC

Required Class: ID Api Class

Running Enhanced KYC on Python

  1. Get your Smile ID Partner ID

  2. Get your API Key (take note of the environment you are running the job in)

  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 menu list when logged into the portal.

Get your API Key

Your api key is in the developer section of the portal.

  • Click on the Generate New API Key button

  • Copy your api key (ensure you are in the right environment)

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

You can copy the sample code below and edit with your partner and job details.

from smile_id_core import IdApi, ServerError

# Initialize Values
partner_id = "<Your partner ID>"; # login to the Smile ID portal to view your partner id
api_key = "<Your API key>"; # copy your API key from the Smile ID portal
sid_server = <0 or 1>; # Use 0 for the sandbox server, use 1 for production server

connection = IdApi(partner_id, api_key, sid_server)

# Create required tracking parameters
partner_params = {
    "user_id": "<put your unique ID for the user here>",
    "job_id": "<put your unique job ID here>",
    "job_type": 5,

# Create ID info
id_info_params = {
  "first_name": "<first name>",
  "last_name": "<surname>",
  "country": "<2-letter country code>",
  "id_type": "<id type>",
  "id_number": "<valid id number>",
  "dob": "<date of birth>", # yyyy-mm-dd
  "phone_number": "<phone number>" 

# Set the options for the job
option_params = {
    "signature": True

# Submit the Job
    response = connection.submit_job(partner_params, id_info_params, options_params=option_params)
except ValueError:
    # some of your params entered for a job are not valid or missing
    print("handle ValueError")
except ServerError:
    # Server returned an error
    print("handle ServerError")

Example Response Body

Your response will return a JSON String containing the below:

   "ResultType":"ID Verification",
   "ResultText":"ID Number Validated",
   "FullName":"John Doe",

Interpret your Results

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

Last updated