Metamap button

What is Metamap button

Metamap button is a web component that allows customers to start verification process from your page.

When should you use Metamap button

You should use Metamap button if you have existing web page from which you want your customers to start verification process.

Importing scripts

In order to use Metamap button on your page you will need to add button.js to your page like so

<script src="https://web-button.getmati.com/button.js"></script>

Add Metamap button element

<metamap-button
  clientid="your_client_id"
  flowid="your_flow_id"
></metamap-button>

Replace your_client_id and your_flow_id with ids from your dashboard.

Learn how to obtain client and flow ids here.

Configuration

Configuration of Metamap button is done via html attributes. You can find complete list of attributes here

Interacting with Metamap button

During verification process Metamap button emits custom events that indicate certain state of verification process.

This event can be listened to by adding event listeners to button element

<metamap-button
  clientid="your_client_id"
  flowid="your_flow_id"
></metamap-button>
<script>
  const metamapButton = document.querySelector('metamap-button');
  metamapButton.addEventListener('metamap:userFinishedSdk', ({ detail }) => console.log(detail));
</script>

Events

Event nameDescriptionPayload
metamap:loadedIndicates that verification scripts are loaded. Emitted before verification itself starts.n/a
metamap:userStartedSdkIndicates that the individual has started verification process. Emitted just after verification was created.identityId, verificationId
metamap:userFinishedSdkIndicates that the individual finished verification process. Emitted when the individual reaches final screen.identityId, verificationId
metamap:exitedSdkIndicates that the individual exited verification before finishing it. Emitted when the individual chooses to exit verification.identityId, verificationId
metamap:continuedOnAnotherDeviceIndicates that the individual chose to continue redirection on another device. Emitted when individual chooses redirection method.identityId
verificationId