Integration

Web SDK

Embed the flow on your website with one script tag.

#Install

html
<script src="https://{{HOST}}/sdk/kyc.js"></script>

#Open as a modal

js
// sessionToken comes from YOUR backend (POST /v3/session/ → session_token)
KYC.open({
  sessionToken: 'vs_...',
  onComplete: (e) => { /* user submitted — wait for the webhook for the result */ },
  onClose: () => {},
  onError: (e) => console.error(e),
  onEvent: (e) => console.log(e.type),
});

#Open inline

js
KYC.open({ sessionToken: 'vs_...', container: '#kyc' }); // fills the element, min height 680px

#Options

OptionTypeDescription
sessionTokenstringRequired. The session token from your backend
containerstring or elementRender inline instead of in a modal
onCompletefunctionCalled when the user submits
onClosefunctionCalled when the user closes the modal
onErrorfunctionCalled on a flow error
onEventfunctionCalled for every flow event
autoClosebooleanClose the modal 2 seconds after submit. Default true
baseUrlstringOverride the host. Defaults to the host the script came from

KYC.close() closes the modal. The iframe is given camera permission automatically.