Integration

SDK integration

Treat zKYC as a simple SDK call that launches verification and returns a reusable proof when complete.

Install

Add the SDK to your application.

Install zKYC
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.

Trigger verification
"use client";
import { ZKYCProcess } from "zkyc-sdk-package";

export default function Example() {
  return (
    <button
      onClick={() =>
        ZKYCProcess(
          "test_f891b652bbf3005a23fffc8b3f78ada4ee8424eca4bf553d", // test API key
          "https://yourapp.com/failure", // failure redirect
          "https://yourapp.com/pending" // success/pending redirect
        )
      }
      className="rounded-md bg-white px-4 py-2 text-black"
    >
      Start KYC process
    </button>
  );
}

Check verification status (API)

Fetch the verification status for a specific user ID. Use sandbox keys first, then swap to production in your deployment environment.

Status endpoint
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.
pendingPageURL to redirect the user when verification is pending or complete.