Client-mode Product Integration
#TheMobile Client SDK
We provide a mobile client SDK, which needs to be integrated into merchant's APP. And the SDK is available for both Android and iOS.
- Minimum OS version supported: Android 4.3+, iOS 8+.
- Permissions required: network and camera.
All client-mode products involve 4 anticipants:
- The merchant's server
- The merchant's mobile application
- ZOLOZ SaaS service
- ZOLOZ mobile client SDK
The customer must fully understand the whole interaction sequence before any integration attempt.
- Start business. A user starts the process (e.g. eKYC process) by requesting the mobile app.
- Get meta info. The mobile app asks ZOLOZ client SDK for meta info such as device model and operation system version as the preparation step.
- Return meta info. ZOLOZ SDK returns meta info to the mobile app.
- Initialize transaction. The mobile app sends initialization request to the merchant server together with the meta info retrieved from ZOLOZ SDK.
- Initialize transaction. The merchant server calls ZOLOZ SaaS service to initialize the transaction of the product (such as RealId) and passes along meta info.
- Return initialize result and client config. ZOLOZ SaaS service completes transaction initialization and returns result as well as corresponding client configuration prepared for ZOLOZ SDK to the merchant server.
- Return initialize result and client config. The merchant server returns the initialization result and client configuration to mobile app.
- Invoke with client config. The mobile app invokes ZOLOZ SDK with client configuration.
- Capture user data and upload. ZOLOZ SDK starts to interact with the end-user, capture required data and then upload. There might be multiple rounds of interaction between ZOLOZ SDK and ZOLOZ server.
- Process complete. The process is completed and ZOLOZ server returns the process status to ZOLOZ SDK.
- Inform completion with status. ZOLOZ SDK informs the completion of the process to the mobile app.
- Inform completion. The mobile app informs the merchant server about the process completion.
- Check transaction details. The merchant server asks ZOLOZ SaaS service for transaction details.
- Return transaction details. ZOLOZ server returns details to the merchant server.
- Confirmed. The information from the mobile app is confirmed by the merchant server.
- Inform completion. The mobile app tells user that the process is completed.
The merchant's server need to provide proper endpoint for the merchant application to create a transaction, as well as fetch the final result of transaction. The request from the merchant application could be simply forwarded to ZOLOZ SaaS APIs.
Similar with integrating APIs of server-mode products, ZOLOL API SDK helps a lot by easing the gateway protocol implementation. In this document we only demonstrate how to integrate with ZOLOZ API SDK.
#Instantiate and Configure API SDK Client
#Expose Endpoint for Client Application
#Example of Minimum Server
- JDK 1.8
- Maven >3.2.5
The examples are also included in the API SDK project, to build the project, simply execute following command from the root directory of the API SDK project:
#Launch Business Server
- JDK 1.8
Execute following command (on local machine typically):
or specify public key content directly instead of specify the file path of the public key:
#API Specification Reference
Refer to RealId API specification for more information.
Our SDK requires configurations to function, and there are two types of configurations to be noted.
Runtime configurations are obtained from zoloz server during runtime, and need to be supplied to SDK when invoking the SDK.
Static configurations are done during development and build phase.
- UI style: This is optional as there is a default UI style in place. However, you can customize your UI style via Chameleon configurations.
- RSA public key: The traffic payload between our SDK and our server is encrypted with RSA, hence you need to generate a pair of keys, and keep the private key at zoloz server, and the public key in our SDK.
#SDK API Specification
Both Android and iOS have similar interfaces defined, here we take Android for example.
This is the primary interface to be used to call our SDK. Please note in iOS
getMetaInfo doesn't require any arguments, while Android requires a
context as the input.
This interface consists of two callback functions, which will be called by our SDK when eKYC is completed or interrupted. You need to implement them with business logics to handle the outcome from our SDK.
#Android Integration Guide
Add dependency library
- Get the latest SDK, unzip and move it to libs folder.
- Add libs folder to flatDir like this:
- In your module's (app-level) Gradle file (usually
app/build.gradle), add Zoloz sdk as dependecy.
Start the SDK
To start SDK, some runtime configurations need to be obtained from server first, refer to step 4 in the sequence diagram, and in this step, meta info must be sent to server.
To get the meta info from our SDK, you can simply do this:
If server initialized the eKYC flow successfully, and returned with the configurations
clientCfg, you can then construct a
ZLZRequest object and start the SDK in this way. You need to implement the callback functions to handle the eKYC outcome.
Please add the following configuration to the project's confusing file：
Add dependency library
- Download latest SDK.
- Unzip and add zolozkit.framework to your project. and also need add System Library in pic:
- Zoloz sdk requires camera permission, please add Camera Permissions into plist file. Click here for more about camera permission.
- Import Zoloz resources, usually resources will be added automatically when importing Zoloz SDK.Developers need to make sure main bundle can read these resources.
-ObjCin Other Linker Flags
The process is similar with Android, here we listed the iOS code samples.
To get the meta info from SDK:
Construct ZLZRequest object with
clientCfg returned from server and
public key generated by your server :
Start the SDK with
sdk& demo code: 📎saas_demo_app.zip
sdk& demo code:📎saas_demo_ios.zip