QoreID Web SDK
This guide provides information on how to integrate the QoreID SDK with your web application. With the QoreID SDK, you can more conveniently access QoreID services.
Note
With this release, customers can perform Collection services like VeriFind (digital address verification), Passport, Driver's License and other QoreID services. Workflow will be available in a future release.
Requirements
- QoreID web SDK can be used on ECMAScript 5 and above supported browsers. You can confirm your browser's version compatibility on caniuse.com.
Integration
Installation
npm install @qore-id/web-sdkyarn add @qore-id/web-sdkQuick Start
import QoreID from '@qore-id/web-sdk';
// Listen for events
QoreID.on('success', (data) => {
console.log('Verification successful:', data);
});
QoreID.on('error', (error) => {
console.error('Verification error:', error);
});
QoreID.on('close', (data) => {
console.error('Verification modal closed:', data);
});
QoreID.on('loading', (isLoading) => {
console.log('Loading:', isLoading);
});
// Start verification flow
await QoreID.start({
clientId: 'your-client-id', //required,
productCode: 'your-product', // required for collection mode,
//flowId: 123, // required for workflow mode
customerReference: 'unique-reference', //requried
applicantData: {
firstname: 'John',
lastname: 'Doe',
email: '[email protected]',
},
ocrAcceptedDocuments: "DRIVERS_LICENSE_NGA, VOTERS_CARD_NGA, NIN_SLIP_NGA" //optional
});Optional start Parameters
start Parameters
interface StartConfig {
clientId: string;
productCode: string;
customerReference: string;
flowId?: number;
applicantData: ApplicantData;
identityData?: IdentityData;
addressData?: AddressData;
ocrAcceptedDocuments?: string;
}
interface ApplicantData {
firstname: string;
middlename?: string;
lastname: string;
gender?: string;
/**YYYY-MM-DD */
dob?: string;
phone?: string;
email?: string;
}
interface IdentityData {
idType: string;
idNumber: string;
}
interface AddressData {
address: string;
city: string;
lgaName: string;
}Updated 5 days ago