NAV
javascript

Introduction

The eKYC module is an Fcloud service developed by Ftech. The module allows customer identity verification through the application of electronic technology. To integrate and use this service, you must use Fcloud's SDK. And here are instructions for integrating the SDK.

Authentication

To call the APIs, we will have to init the SDK with the parameters ClientID and SecretKey taken when you create the Application on CMS for partners according to the following instructions:

Server Integrator

After integrating the SDK, the Fcloud service supports server-server callbacks to help get request information as quickly and accurately as possible.

Web SDK

Android SDK

Install SDK Android

Setup gradle maven

allprojects {
    repositories {
        google()  
        mavenCentral()
        maven { url 'https://jitpack.io' } <- // add this line
    }
}

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' } <- // add this line
    }
}

Open file app/build.grade then add sdk

dependencies {
...
   implementation "com.github.ftechmobile:feykc-android:1.0.1"
}

Init in file Application

override fun onCreate() {
        super.onCreate()
        ...
        FTechEkycManager.init(this)
    }

SDK Android Integration

Init

Param Type Description
appId String Application id
secretKey String IOE secret key
FTechEkycManager.registerEkyc(appId, licenseKey, new IFTechEkycCallback<Boolean>() {
            @Override
            public void onSuccess(Boolean info) {

            }

            @Override
            public void onFail(APIException error) {

            }

            @Override
            public void onCancel() {

            }
        });

Register callback

Calling functions in activity lifecycle

    @Override
    protected void onResume() {
        super.onResume();
        FTechEkycManager.notifyActive(this);
    }

    @Override
    protected void onPause() {
        super.onPause();
        FTechEkycManager.notifyInactive(this);
    }

SDK Android Feature

Create transaction

FTechEkycManager.createTransaction(new IFTechEkycCallback<TransactionData>() {
            @Override
            public void onSuccess(TransactionData info) {

            }

            @Override
            public void onFail(APIException error) {

            }

            @Override
            public void onCancel() {

            }
        });

Get process transaction

Param Type Description
transactionId String Transaction id
FTechEkycManager.getProcessTransaction(transactionId, new IFTechEkycCallback<TransactionProcessData>() {
            @Override
            public void onSuccess(TransactionProcessData info) {

            }

            @Override
            public void onFail(APIException error) {

            }

            @Override
            public void onCancel() {

            }
        });

Upload Photo (Normal detection)

Param Type Description
pathImage String Image path local
captureType CAPTURE_TYPE Orientation images include the following types: CAPTURE_TYPE.FRONT, CAPTURE_TYPE.BACK, CAPTURE_TYPE.FACE
FTechEkycManager.uploadPhoto(pathImage, captureType, new IFTechEkycCallback<CaptureData>() {
            @Override
            public void onSuccess(CaptureData info) {

            }

            @Override
            public void onFail(APIException error) {

            }

            @Override
            public void onCancel() {

            }
        });

Face Matching

Use this method to get ORC scan information

FTechEkycManager.faceMatching(new IFTechEkycCallback<FaceMatchingData>() {
           @Override
           public void onSuccess(FaceMatchingData info) {
           }

           @Override
           public void onFail(APIException error) {
           }

           @Override
           public void onCancel() {
           }
       })

FaceMatchingData

Param Type Description
sessionId String Session id
cardInfo CardInfo Card information

CardInfo

Param Type Description
id String id card
birthDay String birth day
birthPlace String birth place
cardType String card type
gender String gender
issueDate String issue date
issuePlace String issue place
name String full name
nationality String nationality
originLocation String origin location
passportNo String passport no
recentLocation String recent location
validDate String valid date
feature String feature
nation String nation
mrz String mrz

Liveness detection

Using bitmap image to check face position

FTechEkycManager.setEnableLiveness(true);
FTechEkycManager.detectFacePose(bitmap, FACE_POSE.UP, new IFTechEkycCallback<Boolean>() {
            @Override
            public void onSuccess(Boolean info) {

            }

            @Override
            public void onFail(APIException error) {

            }

            @Override
            public void onCancel() {

            }
        });

Submit info

Use this method to submit information

FTechEkycManager.submitInfo(submitInfoRequest, new IFTechEkycCallback<Boolean>() {
           @Override
           public void onSuccess(Boolean info) {
           }

           @Override
           public void onFail(APIException error) {
           }

           @Override
           public void onCancel() {
           }
       });

NewSubmitInfoRequest

Param Type Description
cardInfoSubmit CardInfoSubmit Information card
preProcessId String Session id

CardInfoSubmit

Param Type Description
id String id card
birthDay String birth day
birthPlace String birth place
cardType String card type
gender String gender
issueDate String issue date
issuePlace String issue place
name String full name
nationality String nationality
originLocation String origin location
passportNo String passport no
recentLocation String recent location
validDate String valid date
feature String feature
nation String nation
mrz String mrz

IOS SDK

Install SDK IOS

Add package dependencies

https://github.com/FTechMobile/fekyc

SDK IOS Integration

Register callback

    FEKYCApp.instance().delegate = self

And implement FEKYCDelegate

Init

Param Type Description
appId String Ekyc app id
licenseKey String Ekyc license key

SDK IOS Feature

Enable Liveness version

    FEKYCApp.setEnableLiveness()

Use full stream sdk

    FEKYCApp.instance().start()

Note: If you don't want to use enough threads, the SDK provides the following features

Create transaction

    FEKYCApp.instance().createTransaction()

Get process transaction

Param Type Description
transactionId String Transaction id
    FEKYCApp.instance().getProcessTransaction(transactionId)

Upload Photo

Param Type Description
pathImage String Image path local
step FEKYCStep Verify steps

Face Matching

     FEKYCApp.instance().faceMatching()

FaceMatchingData

Param Type Description
sessionId String Session id
cardInfo CardInfo Card information

CardInfo

Param Type Description
id String id card
birthDay String birth day
birthPlace String birth place
cardType String card type
gender String gender
issueDate String issue date
issuePlace String issue place
name String full name
nationality String nationality
originLocation String origin location
passportNo String passport no
recentLocation String recent location
validDate String valid date
feature String feature
nation String nation
mrz String mrz

Submit info

    FEKYCApp.instance().submitInfo(info: FaceMatchingData)

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.