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 job, you need either the business registration Number or the tax number of your user's 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 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.
require 'smile-identity-core'
# Initialize
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 = SmileIdentityCore::IDApi.new(partner_id, api_key, sid_server)
# Create required tracking parameters
partner_params = {
job_id: '<put your unique job ID here>',
user_id: '<put your unique ID for the user here>',
job_type: SmileIdentityCore::JobType::BUSINESS_VERIFICATION
};
# Create ID info
# Create ID info
id_info = {
# The country where ID document was issued
country: 'NG',
# The ID document type
# Available types BUSINESS_REGISTRATION and TAX_INFORMATION
id_type: '<id type>',
# The business registration or tax number
id_number: '0000000',
# The business incorporation type bn - business name, co - private/public limited, it - incorporated trustees
# Only required for BUSINESS_REGISTRATION in Nigeria
business_type: 'co',
# Postal address of business. Only Required for BUSINESS_REGISTRATION in Kenya
postal_address: '<postal address>',
# Postal code of business. Only Required for BUSINESS_REGISTRATION in Kenya
postal_code: '<postal code>'
}
# Set the options for the job
options = {};
# Submit the job
response = connection.submit_job(partner_params, id_info, options)
Example Response Body
Your response will return a JSON String containing the below: