Staging
How to integrate Hypersign KYC in your test environment
Staging Widget Base URL : https://hypersign-kyc-widget.netlify.app
Hypersign KYC Widget integration
The Hypersign KYC widget can be configured and incorporated in just a few minutes. 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 utilized to request the user's data/credentials from the KYC server.
Forming Widget URL
The Widget URL has three query params:
pr
: Presentation Query Request (base64 encoded)kycAccessToken
: KYC Access TokenssiAccessToken
: SSI Access Token
The final Widget URL format would look something like this:
https://hypersign-kyc-widget.netlify.app?kycAccessToken=${kycAccessToken}&ssiAccessToken=${ssiAccessToken}&pr=${base64EncodedPr}
Let's go ahead and get vaules for each of these query params. We will start with Presentation Query Request
1. Presentation Request
The Presentation Query request is a way to request user's credential from their data vault. The presentation query request is implemented based on W3C Verifiable Presentation Request v0.2 Specification - that means its being widely adopted in the SSI ecosystem.
Below is the sample presentation query request object:
Reason: Please furnish a legitimate justification for why you are seeking access to user data. This information will be displayed on the consent screen for users to review and authorize your app to access their data. Max
110
chars are supported.IssuerDID: Kindly contact Hypersign Admin
IssuerDIDVerificationMethod: Kindly contact Hypersign Admin
LogoUrl: Provide a URL for the monologue that users can view on the consent screen. See the example widget consent screen for reference.
Keep rest of the fields in the
query
as it is.
Once presentation query request object is ready, we need encode it in base64 string so that we can pass it in Widget URL.
Here I am using btoa utility function in browser to convert stringified presentation request object to base64 string.
2. KYC Access Token
Kindly contact Hypersign Admin.
3. SSI Access Token
Kindly contact Hypersign Admin.
Invoking the widget
You can invoke the Hypersign KYC widget through popup from your page
Listening to events
You can listen to events thrown by the widget to get the result of verification.
Extracting User Data
Once you receive the idToken
, you can query the KYC service to extract user data.
Staging KYC service Request:
KYC service URL:
Method:
GET
Headers:
Demo
Try Demo Now: https://hypersign-kyc-demo.netlify.app/
Last updated