Integrate iVerify.ng verification services into your application
Before you begin integration, ensure you have completed the following:
Base URL:
https://api-test.iverify.ngAll API requests must be made over HTTPS. Include your Firebase ID token in the Authorization header for all requests.
Authentication Header:
Authorization: Bearer <idToken>
Content-Type: application/jsonBefore making verification requests, you'll need to retrieve your workspaceId. This can be obtained from your user profile.
Endpoint:
GET /api/users/profile/meNode.js Example:
// Get user profile to retrieve workspaceId
const response = await fetch('https://api-test.iverify.ng/users/profile/me', {
headers: {
'Authorization': `Bearer ${idToken}`
}
});
const profile = await response.json();
// Extract workspaceId from the first workspace
const workspaceId = profile.workspaces[0]?.workspaceId;
console.log('Workspace ID:', workspaceId);Sample Response:
{
"firstName": "John",
"lastName": "Doe",
"email": "johndoe@example.com",
"firebaseId": "WTRb500cMbPEzL2CRuEf39204l13",
"id": "ee003a43-725c-4563-9939-4e4d385533a2",
"appRoles": ["WORKSPACE"],
"default_country": "NG",
"emailVerified": true,
"workspaces": [
{
"id": "cmj5tgkfb00021jmiji491uz2",
"workspaceId": "cmj5tgkfa00001jmi9gkqvban",
"userId": "ee003a43-725c-4563-9939-4e4d385323a2",
"permissions": ["ADMIN", "OWNER", "REQUESTER", "VIEWER"],
"mainRole": "OWNER",
"workspace": {
"id": "cmj5tgkfa00001jmi9gkqvban",
"name": "John Doe Workspace",
"active": true,
"type": "PERSONAL"
}
}
]
}The workspaceId can be found in the workspaces array at workspaces[0].workspaceId.
Verify government-issued identity documents (NIN, Driver's License, Passport, etc.)
Request Body Example:
{
"workspaceId": "your-workspace-id",
"country": "NG",
"code": "NIN_VERIFICATION",
"params": {
"idNumber": "12345678901"
}
}Node.js Example:
const response = await fetch('https://api-test.iverify.ng/requests/new/id-verification', {
method: 'POST',
headers: {
'Authorization': `Bearer ${idToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
workspaceId: 'your-workspace-id',
country: 'NG',
code: 'NIN_VERIFICATION',
params: {
idNumber: '12345678901'
}
})
});
const result = await response.json();
console.log('Request ID:', result.request.id);
console.log('Payment URL:', result.payment?.paymentUrl);| Method | Endpoint | Description |
|---|---|---|
| GET | /api/requests/details/:requestId | Get request details and verification results |
| POST | /api/requests/new/getCost | Calculate the cost for a verification request |
| GET | /api/services | List all available services |
Get Request Details Example:
// Get request details after verification is complete
const response = await fetch(`https://api-test.iverify.ng/requests/details/${requestId}`, {
headers: {
'Authorization': `Bearer ${idToken}`
}
});
const details = await response.json();
console.log('Status:', details.status);
console.log('Report URL:', details.identity?.reportPdfUrl || details.employees?.[0]?.reportUrl);Get Cost Example:
// Calculate cost before creating request
const response = await fetch('https://api-test.iverify.ng/requests/new/getCost', {
method: 'POST',
headers: {
'Authorization': `Bearer ${idToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
code: 'NIN_VERIFICATION',
country: 'NG',
quantity: 1
})
});
const cost = await response.json();
console.log('Cost:', cost.amount, cost.currency);For third-party integrations with offline payment mode, payments are processed manually by the iVerify team. After creating a verification request:
Status Flow:
PENDING → ONGOING_VERIFICATION → COMPLETED → REJECTED → FAILED| Status | Description |
|---|---|
| PENDING | Request created, awaiting payment (for offline mode, contact iVerify team) |
| ONGOING_VERIFICATION | Payment successful, verification in progress |
| COMPLETED | Verification successfully completed |
| REJECTED | Verification failed (invalid data, document not found) |
| FAILED | System error or timeout |
Need Help?