Vanilla Javascript
The Vanilla JavaScript SDK provides a simple, framework-agnostic implementation using iframe-based widget loading.
Installation
Simply include the SDK script in your HTML:
KYC Verification Start Verification
Requirements
| Requirements | Details |
|---|---|
| Browser Support | Chrome 90+, Firefox 88+, Safari 14+, Edge 90+ |
| JavaScript | ES6+ |
| HTTPS | Required for camera/microphone access |
| Permissions | Camera, Microphone (user consent) |
Advanced JavaScript Example
Advanced KYC Integration
API Reference
IdentityKYC.verify() parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
| widget_id | string | Yes | Widget ID from dashboard |
| widget_key | string | Yes | Widget key from dashboard |
| first_name | string | Yes | User's first name |
| last_name | string | Yes | User's last name |
| string | Yes | User's email | |
| phone | string | No | User's phone number |
| metadata | object | No | Additional custom data |
| callback | function | Yes | Result handler function |
Callback Function Signature
function callback(error, data) {
// error: null if success, object if error
// data: verification result object
}
Error Object Structure
{
code: "E01",
message: "Verification failed",
status: "failed"
}
Success Data Structure
{
code: "00",
status: "success",
message: "Verification successful",
data: {
reference: "refabc123",
user_data: { / verified user information / },
verification_details: { / verification specifics _/ }
},
channel: "web"
}
Updated about 2 hours ago
