🎯
UNIFID Integration Guide
  • 📖UNIFID Integration
  • ⭐Get started with UNIFID
  • ⚛️Authentication
  • SDK
    • ✳️SDK Configuration
  • API
    • 👥User Identity
      • 👤Basic Identity - Uganda
      • 👥Sanctions
      • 🥈Request credential
    • ⚙️Company Verification
      • 🔧Company Search
      • 📄Company Docs
  • Webhook
    • ⚙️Webhook
      • 👥User Identity
      • 👥Verified Credentials
      • 🎭Company Search
      • 🎭Company Docs
Powered by GitBook
On this page
  1. SDK

SDK Configuration

Use the SDK to integrate user integration natively into your web or mobile flows.

The following code snippets should be embeded into the portal to initiate verfiication & validation flow.

  1. Add this in index.html

<script src="https://web-button.mati.io/button.js"/>

2. In app.js or index.js, include the following

var unifidClient = require('mati-sdk').Mati;

const unifidEvents = () => {
    let button = document.getElementById("unifid-button");
    button.click();
    // setup callbacks
    button.addEventListener('mati:loaded', ({ detail }) => {
      console.log('loaded payload matiEvent', detail)
    });
    button.addEventListener('mati:userFinishedSdk', ({ detail }) => {
      console.log('finished payload', detail)
    });
    button.addEventListener('mati:exitedSdk', ({ detail }) => {
      console.log('exited payload', detail)
    });
}

<div style={{ padding: "30px 40px", margin: "20px" }}>
    <button type="submit" onClick={unifidEvents} style={{color:" #fff", backgroundColor: "#0047CC", padding: "8px 22px", fontSize: "1rem"}}>
        Verify My KYC
    </button>
    <mati-button
        style={{ display: "none" }}
        id="unifid-button"
        clientId="<clientId>"
        flowId="<flowId>"
        color="#0047CC" // It's recommended to add color to speed up button initialization.
        metadata={JSON.stringify({
            "partner_id": "<patner ID>",
            "ref_id": "<customer ID>",
            "user_email": "<email@email.com>"
        })}
    />
</div>

The following (partner specific) data items must be included in the above configuration

  • clientId - consult your UNIFID contact

  • flowId - consult your UNIFID contact

  • partner_id - consult your UNIFID contact

  • ref_id - this is your reference that will help to link the webhook data; usually userID

  • user_email - registered email of the user verifiying identity

PreviousAuthenticationNextUser Identity

Last updated 2 years ago

✳️