zKYC
Integration

KYC sdk

zKYC is a service package that redirects users to the zKYC page, where they go through a KYC verification process.

Before integrating the sdk in your end you will need to register in zKYC then generate your private key.

Install

Add the SDK to your application.

npm i zkyc-sdk-package@latest

Call the flow

Invoke ZKYCProcess with the user/session id, your API key, the service type, and redirect URLs.

import React from 'react';
import { ZKYCProcess } from "zkyc-sdk-package";

export default function KYCButton() {
  const handleKYC = async () => {
    try {
      await ZKYCProcess({
        apiKey: "prod_***********************************", //either production or testing key 
        failurePage: `${window.location.origin}/kyc-failed`, //In case of failure, you will be redirected to this page
        successPage: `${window.location.origin}/kyc-success`, // In case of success, you will be redirected to this page
      });
    } catch (error) {
      console.error('KYC initiation failed:', error);
      alert('Failed to start KYC process. Please try again.');
    }
  };

  return <button onClick={handleKYC}>Start KYC Verification</button>;}

Check verification status (API)

Fetch the verification status of your users via our API. Status values include: pending, valid, and invalid.

const res = await fetch(
  `https://sdk.zkyc.tech/api/kyc/verifications/${ApplicantId}`,
  {
    method: "GET",
    headers: {
      "x-api-key": apiKey,
    },
  }
);

if (!res.ok) throw new Error(`HTTP error: ${res.status}`);
const result = await res.json();
console.log("Verification data", result);

Required parameters

ParameterDescription
apiKeyYour API key (test or production).
failurePageURL to redirect the user if verification fails.
successPageURL to redirect the user when verification is completed and the proof is claimed by the user.

Check our repo in github

Check our demo

On this page