zKYC
Integration

Aptos Integration

Sign your first Aptos commitment in under 10 minutes.

This guide walks you through how to use zKYC to allow users to verify their identity as well as sign a commitment in Web3.

Prerequisites

  • Node.js 18 or higher.
  • Create a zKYC account app.zkyc.tech.
  • An API key from your dashboard.

Step 1 — Install the SDK

npm i zkyc-aptos-package@latest

Step 2 — Trigger Verification

Call ZKYCProcess when a user needs to verify their identity. This redirects them to the hosted zKYC verification flow.

import { ZKYCProcess } from "zkyc-sdk-package";

export default function VerifyButton() {
  const handleVerify = async () => {
    try {
      await ZKYCProcess({
        apiKey: "test_your_key_here",
        successPage: `${window.location.origin}/verification-success`,
        failurePage: `${window.location.origin}/verification-failed`,
      });
    } catch (error) {
      console.error("Failed to start verification:", error);
    }
  };

  return <button onClick={handleVerify}>Verify Identity</button>;
}

Use a test_ prefixed key during development. Test keys use a sandboxed environment with simulated documents and do not charge per verification. Switch to a prod_ key when going live. Production keys require a $100 minimum deposit.

What Happens Next

The user completed KYC. Their proof is:

  • Issued to them as a code string they will recieve at the end of the kyc process
  • Optionally anchored on Aptos if they connected a wallet
  • Valid until their underlying document expires

If you want to understand the full lifecycle, read the Flow Architecture.

Ask an AI

Have an AI explain this page or help you integrate zKYC with Aptos.

On this page