|
| source |
|
---|---|---|---|
|
| Kafka Topic - Pub/Sub |
|
| Kafka Topic - Pub/Sub |
| |
|
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) |
|
| Atomic | Type |
---|---|---|---|---|---|
customerId |
|
| YES - entity_id | STRING | |
cardType |
|
| STRING | ||
idExpiryDate |
|
| STRING | ||
ocrError |
|
| STRING | ||
forgeryResult |
|
| STRING | ||
forgeryError |
|
| STRING | ||
Features below are derived from “ocrResult” field of the response
| |||||
address | address |
|
| STRING | |
agencyCode | Agency Code |
|
| STRING | |
birthday | Date of Birth Birth Date |
|
| STRING | |
birthPlace | Place of Birth |
|
| STRING | |
bloodType | Blood Type |
|
| STRING | |
chairman | Chairman |
|
| STRING | |
civilStatus | Civil Status |
|
| STRING | |
conditions | Conditions |
|
| STRING | |
countryCode | Country Code |
|
| ||
documentNumber | Document Number |
|
| ||
expiryDate |
|
|
| ||
eyeColor | Eye Color |
|
| ||
firstName |
|
|
| ||
fullAddress | Address |
|
| ||
fullName |
|
|
| ||
gender | Sex |
|
| ||
givenName | Given Name |
|
| ||
height | Height |
|
| ||
idNumber |
|
|
| ||
issueDate |
|
|
| ||
issuerAuthority |
|
|
| ||
issuingAuthority | Issuing Authority |
|
| ||
lastName | Last Name |
|
| ||
middleName |
|
|
| ||
name | Name |
|
| ||
nationality |
|
|
| ||
occupation | Occupation |
|
| ||
postMaster | Postmaster General & CEO |
|
| ||
precinctNo | Precinct No. |
|
| ||
restrictions | Restrictions |
|
| ||
surname | Surname |
|
| ||
type | Type |
|
| ||
weight | Weight |
|
|
OCR Lite Response Details - AAI Docs
OCR Lite responses varies depending on the type of card. Current valid card types are:
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 |
| Atomic | Type |
---|---|---|---|---|
imageId | The image identifier in our system - “OCR_LITE_UMID-77da92bbb624c805_20220118173025354_0595496463.jpg” |
| STRING | |
idNumber | ID number of the person, for example “006-0041-5476-5” |
| STRING | |
surname | Surname of the person |
| STRING | |
middleName | Middle name of the person |
| STRING | |
givenName | Given name of the person |
| STRING | |
birthday | Date of birth of the person, for example “1986/04/08” |
| STRING | |
gender | Gender of the person |
| STRING | |
postcode | Postcode of the address |
| STRING | |
ph | PHI or PHL |
| STRING | |
province | Province in the address |
| STRING | |
city | City in the address |
| STRING | |
homeAddress | Home address of the person |
| STRING | |
fullAddress | Full address of the person |
| 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 |
| Atomic | Type |
---|---|---|---|---|
imageId | The image identifier in our system |
| YES | STRING |
birthday | Date of birth of the person, for example “1986/04/08” |
| YES | STRING |
name | Name of the person |
| YES | STRING |
idNumber | ID number of the person, for example “03-7206344-5” |
| 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 |
| Atomic | Type |
---|---|---|---|---|
imageId | Date of birth of the person, for example “03-09-1986” |
| YES | STRING |
issueDate | Issue date of the card, for example “03-26-2019” |
| YES | STRING |
name | Name of the person |
| YES | STRING |
address | Address of the person |
| YES | STRING |
idNumber | ID number of the person, for example “275-855-533-000” |
| 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 |
| Atomic | Type |
---|---|---|---|---|
imageId |
| STRING | ||
birthday | Date of birth of the person, for example, “15 DEC 87” |
| STRING | |
surName | Surname of the person |
| STRING | |
gender | Gender of the person |
| STRING | |
givenName | Given name of the person |
| STRING | |
idNumber | ID number of the person, for example, “P1085120A” |
| STRING | |
type | Type of the passport |
| STRING | |
expiryDate | Expiry date of the passport |
| STRING | |
birthPlace | Birthplace of the person |
| STRING | |
issuingAuthority | Issuing authority of the passport |
| STRING | |
nationality | Nationality of the person |
| STRING | |
countryCode | Country code of the person |
| STRING | |
middleName | Middle name of the person |
| STRING | |
issueDate | Issue date of the card, for example “03-26-2019” |
| 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 |
| Atomic | Type |
---|---|---|---|---|
imageId |
| STRING | ||
birthday | Date of birth of the person |
| STRING | |
address | Address of the person |
| STRING | |
gender | Gender of the person |
| STRING | |
weight | Weight of the person |
| STRING | |
restrictions | Restrictions of the vehicle type |
| STRING | |
agencyCode | Agency code of the issuing office |
| STRING | |
idNumber | ID number of the person, for example, “C02-11-002230” |
| STRING | |
bloodType | Blood type of person |
| STRING | |
assistantSecretary | Assistant secretary of the driving license |
| STRING | |
expiryDate | Expiry date of the driving license |
| STRING | |
nationality | Nationality of the person |
| STRING | |
eyeColor | Eye color of the person |
| STRING | |
name | Name of the person |
| STRING | |
conditions | Conditions of the person |
| STRING | |
height | Height of the per |
| 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 |
|
| Atomic | Type |
---|---|---|---|---|---|
customerId |
|
|
| ||
previousFacialVerificationId |
|
| YES | ||
passedVerification |
|
| YES | ||
livenessScore |
|
| YES | ||
similarity |
|
| YES | ||
createdAt |
|
| |||
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 |
|
| Atomic | Type |
---|---|---|---|---|---|
customerId |
|
| STRING | ||
detectionResult | The image url or the image base64 |
|
| 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. |
|
| 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 |
| Atomic | Type |
---|---|---|---|---|
customerId |
| |||
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. |
| STRING | |
firstFace | The face in the first picture |
| DOUBLE_ARRAY | |
secondFace | The face in the second picture |
| 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.