iframe element. If you want additional handling, the iFrame also posts statuses of success or failed.
Embed business verification in your page.
iframe element. If you want additional handling, the iFrame also posts statuses of success or failed.
<!DOCTYPE html>
<html>
<body>
<!--
Recommended styles for optimal UX:
Desktop: Width: ~670px, Height: ~800px
Mobile: Width: 100%, Height: 100% (avoid fixed pixels)
-->
<iframe
id="iframe"
allowfullscreen
style="width: 670px; height: 800px; border: none;"
src="https://kyb.ui.idenfy.com/welcome?authToken=BUSINESS_VERIFICATION_TOKEN"
allow="camera">
</iframe>
<script>
window.addEventListener('message', receiveMessage, false);
function receiveMessage(event) {
// 1. Check if the event contains your verification data
const data = event.data;
console.log('Verification Status:', data);
// 2. Logic to detect success/completion
// Example: If the automated check is approved or manual review is waiting
if (data.status === 'success') {
// 3. UX Best Practice:
// Hide the iframe and refresh the parent app to show new status
document.getElementById('iframe').style.display = 'none';
location.reload();
}
}
</script>
</body>
</html>