For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to Build a Custom KYC Flow with the Hypersign ID APIs?

This document is for developers building a custom UI to integrate with Hypersign ID and SSI APIs. By using these APIs directly instead of the pre-built widget, you maintain total control over your UI/UX while leveraging decentralized identity (DID) infrastructure.


1. Integration Architecture

The integration follows a Security-First Handshake model:

  • Backend: Securely manages the API_SECRET, fetches administrative tokens, and registers User DIDs.

  • Frontend: Handles the camera interface, performs OCR extraction, executes Face Match, and signs the final Consent via a Verifiable Presentation.


2. Base Configuration

Service URLs

const KYC_BASE_URL = "https://api.cavach.hypersign.id";
const SSI_BASE_URL = "https://api.entity.hypersign.id";
const DEVELOPER_DASHBOARD_SERVICE_BASE_URL = "https://api.entity.dashboard.hypersign.id"

Prerequisite Setup

  1. Dashboard Access: Create your developer account inside the Hypersign Dashboard.

  2. Environment Secrets: Securely generate and download your SSI_API_SECRET and KYC_API_SECRET keys from the App Settings view. Store these in your backend .env configuration file.

  3. Issuer Information: Copy your application's unique decentralized identifier configuration from the SSI sub-portal:

Note: Please make sure that X_ISSUER_VERMETHOD_ID is of type Ed25519VerificationKey2020

You can keep these variables in your .env


3. Backend Implementation (Node.js)

The backend acts as a secure proxy to ensure administrative keys are never exposed to the browser.

STEP 1: Prepare Administrative Access Tokens

Administrative tokens for KYC and SSI services should be cached locally and refreshed only upon expiry.

STEP 2: Initialize the KYC Verification Session

Create a unique session for the user's verification journey.

STEP 3: Register User DID

Every user requires a DID to sign their final verification results.

STEP 4: Generate User-Specific Bearer Token

This token authorizes the frontend to perform biometric actions for this specific session only.

STEP 5: Implement an API to return relevant tokens in frontend


4. Frontend Implementation

Step 1: Initialize Session

Call your backend endpoint to receive all necessary session and admin tokens.

Step 2: Document OCR Extraction

After capturing the ID document via the camera, send the Base64 image for extraction.

documentType (enum)

Allowed values:

  • PASSPORT

  • GOVT_ID

Step 3: Identity Verification (Face Match)

Matches the selfie against the extracted document data.

Finalize the process by creating a Verifiable Presentation and submitting it to the KYC service.


Last updated