Integration Guide
This guide explains how to integrate the Verification API into any application. Examples added are from Reference Beneficiary and Provider Toasters
Basic API Integration
The Verification API is technology-agnostic and can be integrated into any system by making a simple HTTP POST request to the /verification endpoint.
curl -X POST http://your-domain-or-ip:{{PORT}}/verification \
-H "Content-Type: application/json" \
-d '{
"credential": {
"id": "12345",
"type": "VerifiableCredential",
"issuer": "https://example.com",
"credentialSubject": {
"id": "did:example:123",
"name": "John Doe"
}
},
"config": {
"method": "online",
"issuerName": "dhiway"
}
}'
How to use this example:
Replace
your-domain-or-ipand{{PORT}}with your actual deployment details.Send a POST request with this JSON structure from your system.
The response will indicate whether the credential is valid or not.
Example # 1 Verification API Integration in Reference Beneficiary App
The Verification SDK is integrated into the beneficiary backend to verify Verifiable Credentials (VC) during direct scan & document uploads and fetching document from wallet.
Document Upload API
Endpoint Details
User uploads document via
/user_docsendpointAPI internally calls verification service before storage
Document is only stored if verification succeeds
Verification Implementation
Configuration
Implementation
Core verification method: verifyVcWithApi
Integration Points
The SDK is called at these points:
Document upload API: createUserDocsNew
Document processing: processSingleUserDoc
Example # 2 Verification API Integration in Reference Provider App
The Verification SDK is integrated into the provider middleware to verify Verifiable Credentials (VC) submitted by applicants through application file uploads and verification requests.
Verification API Endpoint
Endpoint Details
POST
/verification/verify-vcsAuthorization: Bearer JWT Token required
Controller:
src/verifications/verifications.controller.ts
Process Flow
User submits verification request via
/verify-vcsendpointAPI internally calls Verification SDK before updating database
Application verification status is updated based on SDK response
Verification Implementation
Configuration
Implementation Core verification method: verifyApplicationVcs in src/verifications/verification.service.ts
Response Handling
Integration Points
The SDK integration flow:
Verification Request:
verifyApplicationVcsmethod.File Processing: Load and parse VC documents from application files.
API Call: Send processed VC data to Verification SDK.
Status Updates: Update database with verification results (both success and failure).
Last updated
