Required Class: ID Api Class or Business Verification Class
Running Business Verification on Python
Get your Smile ID Partner ID
Get your API Key (take note of the environment you are running the job in)
Get the business information from your users
Submit the Job to Smile ID
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 business information from your users
To submit a Business Verification KYC job you need the business information of your business. 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 page dedicated to each id type in the KYB Supported Countries 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.BusinessVerification import BusinessVerification
from smile_id_core import 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 = BusinessVerification(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": 7,
}
# Create ID info
id_info = {
"country": "<2-letter country code>",
# <BUSINESS_REGISTRATION | TAX_INFORMATION>
"id_type": "<supported ID Type>",
"id_number": "<id number>", # <valid id number>
"business_type": "<supported business type>", # bn | co | it NOTE: This is only required for
# `BUSINESS_REGISTRATION` in Nigeria (NG)
"postal_address": "<4 or 5 digit postal address>", # NOTE: This is only required for
# `BUSINESS_REGISTRATION` in Kenya (KE)
"postal_code": "<5 digit postal code>", # NOTE: This is only required for
# `BUSINESS_REGISTRATION` in Kenya (KE)
}
# Submit the Job
try:
response = connection.submit_job(partner_params, id_info_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: