Hypersign.Id
Hypersign.idEntity StudioIdentity Wallet
  • 💬Welcome!
  • Hypersign KYC
    • Introduction
    • Integrations
      • KYC Service
      • Widget Configuration
      • Environments
        • Development
        • Production
      • Webhook
    • KYC Widget
      • Integrations
        • Backend Integration
          • Generate AccessTokens
          • Generate KYC Session Id
        • Frontend Integration
      • Data Capture
        • Data Vault Setup
        • Capture Facial Recognition
        • Capture ID Document
        • Capture zk-proof and KYC token
        • Capture User Consent
      • User Data
        • idToken
    • Hypersign ID Wallet
    • On-Chain KYC
      • Contracts Deployment
      • Use Cases
      • Supported Blockchains
      • KYC Token Metadata
    • Dashboard
      • User Sessions
      • User Session Details
      • Usage
      • Credit
    • Concepts
      • Facial Recognition
      • ID Verification (via OCR)
      • Reusable KYC
      • Encrypted Data Vault (EDV)
      • Facial Authentication
      • Issuer Marketplace
      • Security
      • Privacy
      • Credentials Types
        • Personhood Credential
        • Passport / Govt. ID Credential
      • zk Proof Types
        • Proof Of Personhood (PoP)
        • Proof Of KYC (PoK)
        • Proof Of Age (PoA)
      • Uniqueness Check
      • Credential Revocability
      • Machine Readable Zone (MRZ)
      • Liveliness Check
      • Zero Knowledge Proof (zkp)
        • Introduction
        • zk-SNARK
        • Circuits
        • SSI and ZKP
    • Tutorials
      • How to Integrate KYC in minutes?
      • How to add your team member?
  • Hypersign SSI
    • Introduction
    • Setup SSI Service
      • Create Your First DID
      • Credits
    • 🔗API Reference
      • Service Authentication API
      • DID
      • Schema
      • Verifiable Credential
      • Verifiable Presentation
        • Presentation Template
        • Presentation
    • 🎰API Playground
    • 🏑SSI Playground
  • Hypersign Developer Dashboard
    • Service
      • Managing API keys
      • Network Fee
    • Members & Roles
      • Members
        • Assign Role To Member
      • Invitations
        • Member Access Admin's Dashboard
      • Roles & Permissions
        • Permissions List
    • Security
      • Login
      • Multi factor Authentication (MFA)
  • Hypersign Identity Network
    • Introduction
    • Validators & Delegators
      • Installation of Node
      • Running a Testnet Validator Node
    • Governance
      • Proposals
        • Blockchain Node Upgrade
        • Community Pool Spend Proposal
        • Blockchain Parameter Change Proposal
        • Text Proposal
      • Delegation
    • Faucet (testnet)
    • Developers
      • HID-Node Codebase
      • ⚙️Setup Local hid-network Tutorial
        • Running one-node local hid network
        • Create and fund new account
        • Transfer funds
        • Connect Keplr to local hid network
      • Hypersign SSI Toolkit
        • Hypersign DID SDK
        • Hypersign Schema SDK
        • Hypersign Verifiable Credential SDK
        • Hypersign Verifiable Presentation SDK
        • OfflineSigner
    • Blockchain & ID Explorer
  • Core Concepts
    • Introduction
    • Decentralized Identifier (DID)
      • DID Registry
      • Private and Public DID
      • DID Authentication
      • DID Communication (DIDComm)
      • Adding multiple controller to DID
      • Adding multiple verification methods
      • Verification Method vs Recovery Signature
      • Blockchain Account Id
      • DID Threshold
      • Verifiable Condition
      • Verification Relationships
        • Authorization Capabilities (zCap)
    • Schema
      • Schema Registry
      • Schema.org
    • Verifiable Credential (VC)
      • Credential Revocation Registry
      • Issuing a Credential to Multiple Subjects
      • Bearer Credential
      • Single-Use Credential
    • Verifiable Presentation (VP)
    • Specifications
      • Supported Signature Algorithms
      • Client Specification
        • EVM based chains
        • Cosmos based chains
  • Ecosystem
    • Forum
    • Github
    • HID Explorer
    • Eiko
    • MetaAuth
  • Privacy Policy
Powered by GitBook
On this page
  • Pre-requisites
  • Widget Integration
  • Forming Widget URL
  • Invoking the widget
  • Listening to events
Edit on GitHub
  1. Hypersign KYC
  2. KYC Widget
  3. Integrations

Frontend Integration

PreviousGenerate KYC Session IdNextData Capture

Last updated 8 months ago

Pre-requisites

Generate your access tokens before proceeding:

Optionally, generate KYC sessionId as well.

Widget Integration

You'll need to generate a Widget URL and insert it into a DOM element. Additionally, you can monitor events triggered by the widget on your webpage to showcase either success or failure. Once the user completes the KYC process successfully, you'll receive an idToken, which can be utilised to request the user's data/credentials from the KYC server.

Forming Widget URL

The Widget URL has three query params:

  1. kycAccessToken: KYC Access Token

  2. ssiAccessToken: SSI Access Token

  3. sessionId: KYC Session Id

The final Widget URL format would look something like this:

https://verify.hypersign.id
?kycAccessToken=${kycAccessToken}&ssiAccessToken=${ssiAccessToken}&sessionId=${sessionId}

Invoking the widget

You can invoke the Hypersign KYC widget through popup from your page

const widgetUrl = `https://verify.hypersign.id
?kycAccessToken=${kycAccessToken}&ssiAccessToken=${ssiAccessToken}&sessionId=${sessionId}`

window.open(widgetUrl, 'Popup Window', 'width=850,height=900');

Listening to events

You can listen to events thrown by the widget to get the result of verification.

window.addEventListener('message', function (event) {
    if (event.origin === 'https://verify.hypersign.id') {
        console.log('Received message from popup:', event.data);
        // make sure to parse the data before use
        const data = JSON.parse(event.data)
        
        // we send these 3 vaules: 
        // status = success / fail, 
        // message = a simple message (if any)
        const { status, message} = data;
        if (status === 'success') {
            console.log('Successfully finished the KYC')
        }
        else if (status === 'fail') {
            console.log('Failed to finish KYC')
        }
    }
});

You can only obtain status of verification through events. But in order to get user data, developers need to configure the webhook on their KYC dashboard.

Generate AccessTokens
Generate KYC Session Id
Webhook