featurestore_id

entity_type_id

source

entity_id

ekyc_fs

ocr_lite_features

Kafka Topic - Pub/Sub

customerid

facial_verification_features

Kafka Topic - Pub/Sub

customerid

face_comparison_features

Regarding the eKYC component, the necessary data are now retrieved from 2 separate Kafka topics:

  • IdCardSnapshotAvro - ocr_lite_features

    • This is based on the OCR Lite API of Advance AI

  • FacialVerificationSnapshotAvro - facial_verification_features

    • This is based on the Liveness Detection, and Face Comparison API of Advance AI

While the information comes from 2 different Kafka topics, they will be processed together in the same FeatureStore, but stored in their respective separate entity types. Reason being, both topics relate to eKYC in general and it makes semantic sense to store them together for business purposes.

Other relevant pages:

Id Card Snapshot - OCR Lite Features

ocr_lite_features

Example of message structure from Kafka Topic:

{
    "id": "47e824a6-93e9-45df-b489-e1d03917385b",
    "customerId": "f101b81e-218d-4cdf-a3c1-b9c4374fbd55",
    "cardType": "PASSPORT",
    "aaiImageFrontSideId": "13350a99-a0f4-4506-b5aa-34e800774ecc",
    "aaiImageBackSideId": null,
    "frontSidePictureDocumentId": "9a68683f-8231-4237-b36b-13c86bff608d",
    "backSidePictureDocumentId": null,
    "idNumber": "P0000000A",
    "idExpiryDate": "2021-06-26",
    "ocrResult": "{\"front\":{\"idNumber\":\"P0000000A\",\"lastName\":\"DELA CRUZ\",\"firstName\":\"MARIA\",\"middleName\":\"SANTOS\",\"birthday\":\"1980/03/16\",\"expiryDate\":\"2021/06/26\",\"issueDate\":\"27 T0N 2018\",\"placeOfBirth\":\"MANILA\",\"issuerAuthority\":\"DFA MANILA\",\"gender\":\"F\",\"nationality\":\"FILIPINO\",\"countryCode\":\"PHL\",\"passportType\":\"P\"}}",
    "ocrError": null,
    "forgeryResult": null,
    "forgeryError": null,
    "createdAt": "2022-08-24 03:36:08.234000+00:00",
    "updatedAt": "2022-08-24 03:36:13.002000+00:00"
}

List of Features

For now, all the response results will be ingested as features.

Response Result

Description (Equivalent field on ID card)

feature_id_prefix

feature_id

Atomic

Type

customerId

ekyc

customerid - entity_id

YES - entity_id

STRING

cardType

ekyc

cardtype

STRING

idExpiryDate

ekyc

idexpirydate

STRING

ocrError

ekyc

ocrerror

STRING

forgeryResult

ekyc

forgeryresult

STRING

forgeryError

ekyc

forgeryerror

STRING

Features below are derived from “ocrResult” field of the response

  • This are fields derived from AAI’s OCR Lite API response

  • The data is a JSON serialized as a string in the Kafka message - Parse the JSON to extract the features below

address

address

ekyc

address

STRING

agencyCode

Agency Code

ekyc

agencycode

STRING

birthday

Date of Birth

Birth Date

ekyc

birthday

STRING

birthPlace

Place of Birth

ekyc

birthplace

STRING

bloodType

Blood Type

ekyc

bloodtype

STRING

chairman

Chairman

ekyc

chairman

STRING

civilStatus

Civil Status

ekyc

civilstatus

STRING

conditions

Conditions

ekyc

conditions

STRING

countryCode

Country Code

ekyc

countrycode

documentNumber

Document Number

ekyc

documentnumber

expiryDate

  • Expiration Date

  • Valid Until

ekyc

expirydate

eyeColor

Eye Color

ekyc

eyecolor

firstName

  • First Name

  • Given Name

ekyc

firstname

fullAddress

Address

ekyc

fulladdress

fullName

  • Name

  • First Name, Middle Name, Surname

  • Full Name

ekyc

fullname

gender

Sex

ekyc

gender

givenName

Given Name

ekyc

givenname

height

Height

ekyc

height

idNumber

  • ID Number

  • License No.

  • Passport No.

  • Registration No.

  • VIN

  • TIN

  • PRN

  • MID No.

ekyc

idnumber

issueDate

  • Issue Date

  • Date of Issue

  • Registration Date

  • TIN Issuance Date

ekyc

issuedate

issuerAuthority

  • Issuer Authority

  • Issuing Post Office

ekyc

issuerauthority

issuingAuthority

Issuing Authority

ekyc

issuingauthority

lastName

Last Name

ekyc

lastname

middleName

  • Middle Name

  • Middle Initial/Name

ekyc

middlename

name

Name

ekyc

name

nationality

  • Nationality

  • Citizenship

ekyc

nationality

occupation

Occupation

ekyc

occupation

postMaster

Postmaster General & CEO

ekyc

postmaster

precinctNo

Precinct No.

ekyc

precinctno

restrictions

Restrictions

ekyc

restrictions

surname

Surname

ekyc

surname

type

Type

ekyc

type

weight

Weight

ekyc

weight

OCR Lite Response Details - AAI Docs

OCR Lite responses varies depending on the type of card. Current valid card types are:

OCR-Lite AAI API Docs

  • UMID Old/New Version

  • SSS

  • TIN

  • Passport

  • Driving/License

Card Type Examples

UMID Old/New Version

{
  "code":"SUCCESS",
  "message":"OK",
  "data":{
        "imageId":"OCR_LITE_UMID-77da92bbb624c805_20220118173025354_0595496463.jpg",
        "result":{
              "idNumber":"0000-4444444-4",
              "surname":"MMMMMMMM",
              "middleName":"EEEEEEEE",
              "givenName":"AAAA",
              "birthday":"1987/11/08",
              "gender":"F",
              "postcode":"4444",
              "ph":"PHL",
              "province":"LLLLLL",
              "city":"SSSSS RRRR",
              "homeAddress":"BBB 00 LLL 00 CCCCCCC ST. AAAAAAA HHHHH II BBBB. SSSSSSSS SSSSS RRRR CCCC LLLLLL",
              "fullAddress":"BBB 00 LLL 00 CCCCCCC ST. AAAAAAA HHHHH II BBBB. SSSSSSSS SSSSS RRRR CCCC LLLLLL PHL 4444"
          }
  },
  "extra":null,
  "transactionId":"77da92bbb624c805",
  "pricingStrategy":"PAY"
}

Response Result

Description

feature_id

Atomic

Type

imageId

The image identifier in our system - “OCR_LITE_UMID-77da92bbb624c805_20220118173025354_0595496463.jpg”

imageid

STRING

idNumber

ID number of the person, for example “006-0041-5476-5”

idnumber

STRING

surname

Surname of the person

surname

STRING

middleName

Middle name of the person

middlename

STRING

givenName

Given name of the person

givenname

STRING

birthday

Date of birth of the person, for example “1986/04/08”

birthday

STRING

gender

Gender of the person

gender

STRING

postcode

Postcode of the address

postcode

STRING

ph

PHI or PHL

ph

STRING

province

Province in the address

province

STRING

city

City in the address

city

STRING

homeAddress

Home address of the person

homeaddress

STRING

fullAddress

Full address of the person

fulladdress

STRING

Card Type SSS

  {
    "code":"SUCCESS",
    "message":"OK",
    "data":{
        "result":{
            "birthday":"DECEMBER 6,1965",
            "name":"MMMMM VVVVVVVV FFFFF GGGGGGG",
            "idNumber":"00-7777777-7"
        },
        "imageId":"OCR_LITE_SSS-0767ec94be9e220f_20190108103443696_3766516780.jpg"
    },
    "extra":null,
    "transactionId":"0767ec94be9e220f",
    "pricingStrategy":"PAY"
}

Response Result

Description

feature_id

Atomic

Type

imageId

The image identifier in our system

imageid

YES

STRING

birthday

Date of birth of the person, for example “1986/04/08”

birthday

YES

STRING

name

Name of the person

name

YES

STRING

idNumber

ID number of the person, for example “03-7206344-5”

idnumber

YES

STRING

Card Type TIN

{
      "code":"SUCCESS",
      "message":"OK",
      "data":{
          "result":{
              "birthday":"03-09-1986",
              "issueDate":"03-26-2019",
              "name":"BBBBBB, SSSSSS EAAAAEINO",
              "address":"AAA VVNNLA DDDDDDZA MMMMMMG 2 BACOOR CITY CAVITE",
              "idNumber":"275-855-533-000"
          },
          "imageId":"OCR_LITE_UMID-0767ec94be9e220f_20190108103443696_3766516780.jpg"
      },
      "extra":null,
      "transactionId":"0e9767ec94be220f",
      "pricingStrategy":"PAY"
  }

Response Result

Description

feature_id

Atomic

Type

imageId

Date of birth of the person, for example “03-09-1986”

imageid

YES

STRING

issueDate

Issue date of the card, for example “03-26-2019”

issuedate

YES

STRING

name

Name of the person

name

YES

STRING

address

Address of the person

address

YES

STRING

idNumber

ID number of the person, for example “275-855-533-000”

idnumber

YES

STRING

Card Type PASSPORT

{
    "code":"SUCCESS",
    "message":"OK",
    "data":{
        "result":{
            "birthday":"15 Dec 90",
            "surName":"LAC**ILAO",
            "gender":"F",
            "givenName":"PRE**US ANNE",
            "idNumber":"EC04**500",
            "type":"P",
            "expiryDate":"26 Feb 19",
            "birthPlace":"MA**TI MM",
            "issuingAuthority":"DFA MAN**A",
            "nationality":"FIL**INO",
            "countryCode":"PHL",
            "middleName":"MAN**UJETO",
            "issueDate":"27 Feb 14"
            },
            "imageId":"OCR_LITE_PASSPORT-db884fe70acec168_20201124102319272_3099917869.jpg"
        },
    "extra":null,
    "transactionId":"db884fe70acec168",
    "pricingStrategy":"PAY"
}

Response Result

Description

feature_id

Atomic

Type

imageId

imageid

STRING

birthday

Date of birth of the person, for example, “15 DEC 87”

birthday

STRING

surName

Surname of the person

surname

STRING

gender

Gender of the person

gender

STRING

givenName

Given name of the person

givenname

STRING

idNumber

ID number of the person, for example, “P1085120A”

idnumber

STRING

type

Type of the passport

type

STRING

expiryDate

Expiry date of the passport

expirydate

STRING

birthPlace

Birthplace of the person

birthplace

STRING

issuingAuthority

Issuing authority of the passport

issuingauthority

STRING

nationality

Nationality of the person

nationality

STRING

countryCode

Country code of the person

countrycode

STRING

middleName

Middle name of the person

middlename

STRING

issueDate

Issue date of the card, for example “03-26-2019”

issuedate

STRING

Card Type DRIVINGLICENSE

{
    "code":"SUCCESS",
    "message":"OK",
    "data":{
        "result":{
            "birthday":"1978/11/29",
            "address":"128 SSSSSSSS ST. SSSSSS,AAAAAA,BBBBBB",
            "gender":"F",
            "weight":"49",
            "restrictions":"1,2",
            "agencyCode":"BLC",
            "idNumber":"C02-00-000000",
            "bloodType":"A+",
            "assistantSecretary":"EEEEE C. GGGGGGG",
            "expiryDate":"2022/11/29",
            "nationality":"PHL",
            "eyeColor":"BLACK",
            "name":"MMMMMMM,CCCCCC CCCCCCC",
            "conditions":"NONE",
            "height":"1.55"
            },
            "imageId":"OCR_LITE_DRIVING_LICENSE-fd0075284216dc3a_20201124102513240_4568935703.jpg"
        },
    "extra":null,
    "transactionId":"db884fe70acec168",
    "pricingStrategy":"PAY"
}

Response Result

Description

feature_id

Atomic

Type

imageId

imageid

STRING

birthday

Date of birth of the person

birthday

STRING

address

Address of the person

address

STRING

gender

Gender of the person

gender

STRING

weight

Weight of the person

weight

STRING

restrictions

Restrictions of the vehicle type

restrictions

STRING

agencyCode

Agency code of the issuing office

agencycode

STRING

idNumber

ID number of the person, for example, “C02-11-002230”

idNumber

STRING

bloodType

Blood type of person

bloodtype

STRING

assistantSecretary

Assistant secretary of the driving license

assistantsecretary

STRING

expiryDate

Expiry date of the driving license

expirydate

STRING

nationality

Nationality of the person

nationality

STRING

eyeColor

Eye color of the person

eyecolor

STRING

name

Name of the person

name

STRING

conditions

Conditions of the person

conditions

STRING

height

Height of the per

height

STRING

Facial Verification Features

facial_verification_features

Example of message structure from Kafka Topic:

{
    "id": "ac0055f3-19db-4767-aafd-482e627623af",
    "previousFacialVerificationId": null,
    "passedVerification": true,
    "customerId": "f101b81e-218d-4cdf-a3c1-b9c4374fbd55",
    "aaiLivenessId": "0ec0079f-771b-4bbd-9642-cd85a26ce734",
    "livenessScore": 98.0,
    "selfieDocumentId": "75131862-6b49-4755-ab7f-db454051bec3",
    "idCardId": "47e824a6-93e9-45df-b489-e1d03917385b",
    "similarity": 0.0,
    "createdAt": "2022-08-24 03:39:30.094000+00:00",
    "updatedAt": "2022-08-24 03:39:31.412000+00:00"
}

List of Features

Response Result

Description

feature_id_prefix

feature_id

Atomic

Type

customerId

entity_id

ekyc

customerid

previousFacialVerificationId

ekyc

previousfacialverificationid

YES

passedVerification

ekyc

passedverification

YES

livenessScore

ekyc

livenessscore

YES

similarity

ekyc

similarity

YES

createdAt

ekyc

createdat

updatedAt

ekyc

updatedat

Liveness Detection Response Details - AAI Docs

Link - Liveness Detection API Reference Doc

AAI Sample Responses - URL Example

{
  "code":"SUCCESS",
  "transactionId": "196eb0c777789e58",
  "pricingStrategy": "PAY",
  "message":"OK",
  "data":{
      "detectionResult":"https://prod-liveness-detection.oss-ap-southeast-5.aliyuncs.com/standard-images/random_20180929195400851_1478837456?Expires=1542264468&OSSAccessKeyId=LTAIOnoatRFaPjAN&Signature=YGCyAGIBYaDwAnfRfQZummSdicc%3D",
      "livenessScore": 100
  },
  "extra":null
}

AAI Sample Responses - Base64 Example

{
  "code":"SUCCESS",
  "transactionId": "196eb0c777789e58",
  "pricingStrategy": "PAY",
  "message":"OK",
  "data":{
      "detectionResult":"/9j/4AAQSkZJRgABAQAAAQABAAD/...",
      "livenessScore": 100
  },
  "extra":null
}

Response Result

Description

feature_id_prefix

feature_id

Atomic

Type

customerId

ekyc

customerid - entity_id

STRING

detectionResult

The image url or the image base64

ekyc

detectionresult

No

-

livenessScore

The score for anti-spoofing, ranging from [0,100], less than 50 means it might be an attack. Please refer to the Note below of given suggestions based on different liveness scores.

ekyc

livenessscore

Yes

STRING

Face Comparison Response Details - AAI Docs

Link - Face Comparison API Reference Doc

  • Added support for flip angle photos. Supported flip angles include: 90°, 180°, 270°. If the image is flipped, it will have a certain impact on the accuracy.

  • If there are multiple faces in the photo, the largest face will be selected for comparison.

{
  "code":"SUCCESS",
  "transactionId": "196eb0c777789e58",
  "pricingStrategy": "PAY
  "message":"OK",
  "data":{
      "similarity":69.0,
      "firstFace":{
          "id":"1",
          "left":618.0,
          "top":227.0,
          "right":715.0,
          "bottom":350.0
      },
      "secondFace":{
          "id":"2",
          "left":316.0,
          "top":552.0,
          "right":894.0,
          "bottom":1321.0
      }
  },
  "extra":null
}

Response Result

Description

feature_id

Atomic

Type

customerId

customerid - entity_id

similarity

Face similarity rate between the 2 uploaded pictures, the rate value is always between the number 0-100, the closer the rate to 100, the more similar the two faces are. Please refer to the Note below for given suggestions based on different similarities.

similarity

STRING

firstFace

The face in the first picture

firstface

DOUBLE_ARRAY

secondFace

The face in the second picture

secondface

DOUBLE_ARRAY

Note:

  • If the faces similarity is more than 70, the suggestion is pass.

  • If the faces similarity is from 55 to 70, the suggestion is manual check.

  • If the faces similarity is less than 55,the suggestion is rejection or using other methods to verify the user’s identity.

Attachments: