KYC form connection
Learn how to integrate PassMe service into your project using iframe.
You can use KYC form on your website by iframe.
function createIframe ({
// HTML element where you want form appear
parentElem,
domain,
// User token which you can get from E-Gates api
// learn more on the "Obtaining a token" page
params: {
user_token,
}
}: {
parentElem: HTMLElement,
domain: string,
params: {
user_token: string,
}
}) {
const iFr = document.createElement('iframe')
const query = new URLSearchParams(params).toString()
iFr.setAttribute('id', 'KYC_IFRAME')
iFr.setAttribute('src', domain + '/kyc-process-embed?' + query)
iFr.setAttribute('height', 900)
iFr.setAttribute('style', 'transform: all 0.5s; width:100%;')
// must have this attributes
iFr.setAttribute('allow', 'camera')
iFr.setAttribute('frameborder', '0')
iFr.onload = () => {
// do something on iframe loaded
}
iFr.onerror = () => {
// do something on iframe error
}
parentElem.appendChild(iFr)
return iFr
}You can also listen for events from this form:
Types of messages:
Use this functions like this:
Last updated