pass-me-kyc
v1.0.2
Published
## Getting Started
Downloads
14
Readme
PassMe KYC form
Getting Started
html
<div id="form_id_here" />
js
import { PassMeForm } from 'pass-me-kyc'
const passMeForm = new PassMeForm({
// custom domain for iframe, may be dev server
domain: 'https://e-gates.io',
// User token which you can get from E-Gates api
// here https://connect.e-gates.io/passme/technical-documentation/creating-passme-verification-and-obtaining-a-token
params: {
user_token: 'hyD3jaV83TUkzaRvfcpe6OIPNvoZRhRo',
},
// HTML element where you want form appear
elemContainer: document.getElementById('form_id_here'),
// When form in iframe loaded
onFormLoaded: params => console.log('onFormLoaded', params),
// When iframe loaded
onIFrameLoad: () => console.log('onIFrameLoad'),
// When user filled all fields, pressed "Submit" button and
// all request was sent to server
onSubmitted: params => console.log('onSubmitted', params),
// When iframe resized
onResized: params => console.log('onResized', params),
// Messages from server validation which you can use for notifications
onFormMessage: params => console.log('onFormMessage', params),
})
// Creates iframe with form
await passMeForm.createForm()
// Remove iframe from html
passMeForm.destroyForm()
Installing
npm i pass-me-kyc