API Docs · eKYC Core

Integration scenarios

Which eKYC Core endpoints you call, from where, and in what order. Start with the consent obligations, pick the topology that matches how much of the flow your own backend owns, then follow the interaction flow for each capability you need.

Some of the APIs required user consent in order to process user's PII data.

To provide user consent for TS, client should attach the following headers to the request:

headerrequireddescription
X-UC-IPnoCurrent IP address of the end-user used during the verification
X-UC-LocationyesCurrent location of the end-user in format: <country-code>/<state-code>

- Country of end-user. Possible values: ISO 3166-1 alpha-3 country code

- State of end-user. Applicable only in countries where state exists, including USA. Possible values: For USA, CAN, or AUS alpha-2 code (state only - without country & hyphen), e.g. IL (Illinois), NSW (New South Wales). For other countries, if applicable, any string. For VNM & PHL, State is not mandatory.
X-UC-Consent-ObtainedyesConsent obtained from the end-user. Possible values: yes or no
X-UC-Consent-Obtained-AtyesTimestamp when consent was obtained from the end-user. Format: RFC3339, e.g. 2019-04-21T18:00:15+07:00

For the list of services that required user consent, please contact the admin.

Suggested scenarios (eKYC System included Face Authen services, NFC Chip verification services)

Mobile/Web App will send all requests to the Bank's Server. Bank's backend implements based on your business as call APIs (OCR, Liveness, FaceMatching, FaceRetrieval,..) to TrustingSocial Server and receives a response. And then handle the response and return the result to your application. Scenario 1

Scenario 2: Forwarding requests

Mobile/Web App will send all requests to the Bank's Server. The Bank Server attaches the authorization header and forwards all requests to the TrustingSocial Server. eKYC result will be sent back to the Mobile/Web App Scenario 2

Scenario 3: Use temporary credential or signature

Mobile/Web App will call the Bank's Server to get temporary credentials or signature. Mobile/Web App will use a temporary credential or signature to call Trusting Social. Scenario 3

Temporary signature: Recommended

Temporary credential

Scenario 4: Restrict with security

Mobile/Web App will call the TrustingSocial Server directly and receive the eKYC result. Scenario 4

Scenario Hybrid: Scenario 1 and Scenario 3

Mobile/Web App will upload images and video frames to the TrustingSocial Server directly. The Bank server will call main API services (OCR, Tampering, Liveness check, Compare Faces, Face Authen, NFC). Scenario Hybrid

Suggested scenarios (FaceAuthen System deployed On-premise or Cloud)

Mobile/Web App will send all requests to the Bank's Server. Bank's backend implements based on your business as calls APIs (Face Registration, Face Authentication) to TrustingSocial Server and receives a response. And then handle the response and return the result to your application. Scenario 1

Scenario 2: Face Authen Standalone combines with user onboarding eKYC on TS's eKYC system

Mobile/Web App will send all requests to Bank's Server. Bank's backend implements based on your business as call APIs (Face Registration, Face Authentication) to TrustingSocial Server and receives a response. And then handle the response and return the result to your application. Scenario 2

Interaction Flows

Flow 1: Compare faces between images

Flow 1: Compare faces between 2 images

Flow 2: Verify face liveness in images

We provide multi-layered liveness detection - active (challenge response-based) liveness verification and passive (AI-based) liveness verification.

Flow 2: Verify face liveness in images

Flow 3: Read ID card info

Flow 3: Read ID card info

Flow 4: Convert PDF to images

Flow 4: Convert PDF to images

Flow 5: Verify portrait sanity

Flow 5: Verify portrait sanity

Flow 6: Verify id card sanity

Flow 6: Verify id card sanity

Flow 7: Index faces

Flow 7: Index faces

Flow 8: Search faces

Flow 8: Search faces

Flow 9: Update metadata

Flow 9: Update metadata

Flow 10: Face OTP

Flow 10: Face OTP

API Reconciliation

To make easier for API reconciliation, we support some ways to reconcile requests between the client and TrustingSocial (TS) as below:

  1. Use X-Request-ID (Recommended for VN market): When the client makes any API should pass an HTTP header X-Request-Id. The client should generate and manage its value of it (max length 64 characters). When reconciling, we will compare the value that the client sent and TS received if have a mismatch Besides that, we often reconcile base users, so the client should generate a value for all APIs calls of a user.

eg. Client can generate pattern like: a UUID or [USER_ID]-[RANDOM_ID], ...

If a user has multiple sessions, you can use X-Request-ID2 to distinguish between sessions.

  • Use both headers: X-Request-ID: [USER_ID] and X-Request-ID2: [SESSION_ID]
  • Only use X-Request-ID: [USER_ID]-[SESSION_ID]
  1. Use Transaction-ID (Recommended for IN market): Reference API