Documentation Index
Fetch the complete documentation index at: https://docs.frankieone.com/llms.txt
Use this file to discover all available pages before exploring further.
Listening to Window Events with Hosted OneSDK
Hosted OneSDK will emit window events during specific stage of your onboarding experience. You can leverage this mechanism to handle error and success handling
Table of Events
Implementation method
| flowId | On which stage? | Event Emitted | Payload |
| ocr_only | failed uploading OCR | ocr_only:failed | - |
| ocr_only | success uploading OCR | ocr_only:success | - |
| manual_kyc | manual kyc is mounted | manual_kyc:mounted | - |
| manual_kyc | success with manual kyc | manual_kyc:success | - |
| manual_kyc | partial success with manual kyc | manual_kyc:partial | - |
| manual_kyc | failed manual kyc | manual_kyc:failed | - |
| idv | idv is getting mounted | idv:mount | - |
| idv | idv process success | idv:success | - |
| idv | idv process failed | idv:failed | - |
| idv | idv getting rendered | idv:render | - |
| idv_review | idv_review is getting mounted | idv_review:mount | - |
| idv_review | idv_review getting rendered | idv_review:render | - |
| idv_review | idv was failed on idv_review flow | idv_review:idv_failed | (error message depends on error type) |
| idv_review | after submitting review screen | idv_review:submit | |
| idv_review | idv_review process is success | idv_review:success | result from calling individual.submit()sample: {
"payload": {
"checkDate": "0001-01-01T00:00:00.000Z",
"checkTypes": [
"id",
"namev",
"two_plus",
"pep",
"idvalidate"
],
"personalChecks": {
"name": null,
"dateOfBirth": null,
"phoneNumber": null,
"email": null,
"chineseName": null,
"addresses": {
"4021e881-e51a-48ab-b8db-82cdc882d1a2": null
}
},
"status": {
"type": "unchecked",
"label": "Unchecked",
"key": "UNCHECKED"
},
"risk": {
"level": null,
"class": "HIGH"
},
"alertList": [],
"blocklistPotentialMatches": [],
"duplicatePotentialMatches": [],
"duplicateBlocklistMatches": [],
"checkCounts": {
"name": null,
"address": {
"4021e881-e51a-48ab-b8db-82cdc882d1a2": []
},
"document": {},
"dob": null
},
"kycMethod": "electronic",
"issues": {
"creditHeader": false,
},
"checkResults": [],
"rulesetsMatches": []
}
}
|
| idv_review | during idv_review, there are some issues occurred | idv_review:error | {
error: {} // object of dumped errors
}
|
You can listen to Hosted OneSDK window events if you embed Hosted OneSDK inside an iframe<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" charset="UTF-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<script>
// here, you add an event listener to listen to Hosted OneSDK window events
window.addEventListener('message', (e) => {
if (e.data['X-Frankie-Source'] === 'hosted-onesdk') {
console.log('---HOSTED OneSDK events', e.data)
}
});
</script>
<body>
<iframe
style="position: absolute; top: 0; left: 0; left: 0;right: 0;bottom: 0;border: 0;margin: 0; padding: 0;width: 100%; height: 100%; fontSize: 100%;font: inherit; vertical-align: baseline;"
src="https://verify.frankie.one?t=wy2BSoBrMYba7dB4cHS5dLjK" allow="camera;fullscreen;accelerometer;gyroscope;magnetometer;geolocation;microphone;" />
</body>
</html>