Identity Verification
Per-kind KYC and KYB endpoints (BVN, NIN, liveness, face-match, account-name, business registration) with audit trail + envelope-encrypted PII.
PlatformXe ships per-kind identity verification endpoints that wrap the underlying Identity Resolution Service with audit-grade persistence, envelope-encrypted PII, and scoped events. Six capabilities are exposed:
| Endpoint | What it verifies |
|---|---|
POST /v1/identity/verify-bvn | Bank Verification Number against a name. |
POST /v1/identity/verify-nin | National Identification Number against a name. |
POST /v1/identity/liveness | Live person, not a printed photo / video / mask. |
POST /v1/identity/face-match | Selfie similarity to an ID-document reference photo. |
POST /v1/identity/verify-account | Bank account name resolution (NIBSS-equivalent). |
POST /v1/identity/verify-business | A Nigerian business registration (RC, BN, IT) and TIN against the business name (KYB). |
| Property | Value |
|---|---|
| Scope | identity:verify (a person); account:verify for verify-account; business:verify for verify-business |
| Plan gate | Detection Pack addon (verify-account and verify-business need none; a FREE plan has 250 account and 50 business checks a month) |
| Rate limit | 1,000 requests / hour per API key (per endpoint) |
| Idempotency | All endpoints honour the x-idempotency-key header (an Idempotency-Key header is ignored) |
Each call is persisted to identity_verifications with the raw provider response envelope-encrypted under your tenant's KMS key. The metadata summary stays in the clear for fast querying; the encrypted payload is only ever decrypted under explicit reviewer authorisation.
Country support today: The per-kind verification endpoints on this page (BVN, NIN, account-name, liveness, face-match) currently dispatch through Nigeria's provider chain. The country-pluggable engine that backs them — NG, KE, GH, and ZA plugins, per-(country, provider) circuit breakers, latency observations, and a dead-letter queue — is live as of Phase 6F.5b. See Identity Resilience (access on request) for the supported countries, capability matrix, and provider health surface.
For multi-country use today, call POST /api/v1/identity/resolve or /verify (the generic endpoints) with the country-appropriate identifier kind — NIN maps to each country's primary national identifier (Huduma Number in KE, Ghana Card in GH, SAID in ZA). The per-kind endpoints below will accept an explicit country parameter in a follow-up release.
Verify BVN / NIN
curl -X POST https://api.platformxe.com/api/v1/identity/verify-bvn \
-H "Content-Type: application/json" \
-H "x-api-key: pxk_live_..." \
-d '{
"subjectId": "usr_001",
"bvn": "12345678901",
"matchAgainst": {
"firstName": "Adebayo",
"lastName": "Ogunde",
"dateOfBirth": "1980-04-15"
}
}'
POST /v1/identity/verify-nin is identical — substitute nin for bvn — except that matchAgainst.dateOfBirth is required on a NIN check (2026-11-07).
| Field | Type | Required | Description |
|---|---|---|---|
subjectId | string | Yes | Tenant-defined user / merchant id. Persisted on the verification row for audit linkage. |
bvn / nin | string | Yes | 11-digit identifier. Server validates the format. |
matchAgainst.firstName / lastName | string | Yes | Expected name to compare against the resolved profile. |
matchAgainst.dateOfBirth | string | NIN: Yes. BVN: No | YYYY-MM-DD. When sent it must match: it is a factor, not a soft signal. |
The match rule (2026-11-07). verified only when the first name, the last name and (when sent) the date of birth all match. A date that cannot be read on either side never matches. Before this, half the fields were enough, so the right names with the wrong date of birth verified.
How names are compared (2026-11-08). Word by word, exactly, never fuzzy. Case and accents are folded and punctuation, hyphens and apostrophes dropped, so Ade-Bayo matches ADEBAYO and O'Brien matches OBRIEN. A name you send matches when every word in it is one of the registry's words for that field: the first name is read against the registry's first and middle names (so John matches a registry JOHN PAUL, or JOHN with middle name PAUL), the last name against the registry's last name only. A word that is only on another field never counts, and a near miss (Jon for JOHN) fails. The date of birth must still match exactly.
Response:
{
"success": true,
"data": {
"verificationId": "iv_2j7yhq8wcs9...",
"kind": "bvn",
"status": "verified",
"matchScore": 1,
"checks": { "firstName": true, "lastName": true, "dateOfBirth": true },
"reason": null,
"profile": { "firstName": "Adebayo", "lastName": "Ogunde", "dateOfBirth": "1980-04-15", "...": "..." },
"faceMatchReference": true
}
}
Statuses: verified (every field sent matched), failed with reason mismatch (a field differed) or not_found (the identifier is not on the register), provider_down (no provider in the chain could answer). A NIN that is not on the register is failed / not_found, never provider_down.
profile is returned only when verified, never with a photo; on anything else it is null, and only the per-field checks are stored. faceMatchReference (NIN only) is true when PlatformXe kept the registry photo so a later face-match can name this verificationId as its reference.
When the chain returns provider_down, the request is also captured to the dead-letter queue so operators can replay it later. See Identity Resilience → Dead-letter queue (access on request).
Liveness
curl -X POST https://api.platformxe.com/api/v1/identity/liveness \
-H "Content-Type: application/json" \
-H "x-api-key: pxk_live_..." \
-d '{
"subjectId": "usr_001",
"image": { "url": "https://your-storage.com/selfie.jpg" }
}'
| Field | Type | Required | Description |
|---|---|---|---|
subjectId | string | Yes | Tenant-defined user id. |
image.url | string (https) | Either url or base64 | HTTPS-only URL to the captured selfie. |
image.base64 | string | Either url or base64 | Raw base64 (no data: prefix). Mutually exclusive with url. |
image.contentType | "image/jpeg" | "image/png" | "image/webp" | When base64 is supplied | MIME hint. |
Response:
{
"success": true,
"data": {
"verificationId": "iv_2j7yhq8...",
"kind": "liveness",
"status": "verified",
"score": 92,
"provider": "primary"
}
}
When liveness fails, status: "failed" ships with an optional reason (spoof, occluded, low_quality, …). The provider field is the internal provider label — never a vendor name.
Face match
curl -X POST https://api.platformxe.com/api/v1/identity/face-match \
-H "Content-Type: application/json" \
-H "x-api-key: pxk_live_..." \
-d '{
"subjectId": "usr_001",
"selfie": { "url": "https://your-storage.com/selfie.jpg" },
"reference": { "url": "https://your-storage.com/id-photo.jpg" },
"threshold": 70
}'
| Field | Type | Required | Description |
|---|---|---|---|
subjectId | string | Yes | |
selfie | BiometricImage | Yes | The "live" capture. |
reference | BiometricImage or { verificationId } | Yes | The reference image (typically from an ID document), or { "verificationId": "iv_..." }: an earlier verified NIN check by your organisation for the same subjectId. PlatformXe compares the selfie with the registry photo it kept from that check; the photo never leaves PlatformXe and is kept for 200 days (longer than a 180-day photo renewal, so a renewal still finds it). 404 REFERENCE_NOT_FOUND when there is no such verified check, 409 REFERENCE_UNAVAILABLE when no photo is held (none was given, or it has expired); neither calls a vendor. |
A base64 image must be image/jpeg or image/png (400 otherwise).
| threshold | number (0–100) | No | Similarity threshold for verified. Defaults to 65, clamped to [0, 100]. |
Response:
{
"success": true,
"data": {
"verificationId": "iv_2j7y...",
"kind": "face_match",
"status": "verified",
"similarity": 78,
"provider": "primary"
}
}
Verify account (NIBSS-equivalent)
curl -X POST https://api.platformxe.com/api/v1/identity/verify-account \
-H "Content-Type: application/json" \
-H "x-api-key: pxk_live_..." \
-d '{
"subjectId": "usr_001",
"accountNumber": "1234567890",
"bankCode": "044",
"expectedName": { "firstName": "Adebayo", "lastName": "Ogunde" },
"threshold": 70
}'
| Field | Type | Required | Description |
|---|---|---|---|
subjectId | string | Yes | |
accountNumber | string | Yes | Account number in the tenant's bank. Format depends on the country. |
bankCode | string | Yes | Bank code (NIBSS sort code in NG). |
expectedName.firstName / lastName | string | Yes | Expected name to match against the resolved account name. |
threshold | number (0–100) | No | Token-overlap match threshold. Defaults to 70. |
Response:
{
"success": true,
"data": {
"verificationId": "iv_2j7y...",
"kind": "account",
"status": "verified",
"matchScore": 100,
"resolvedName": "ADEBAYO OGUNDE",
"provider": "primary"
}
}
Verify business (KYB)
curl -X POST https://api.platformxe.com/api/v1/identity/verify-business \
-H "Content-Type: application/json" \
-H "x-api-key: pxk_live_..." \
-H "x-idempotency-key: kyb-prov_17-1" \
-d '{
"subjectId": "prov_17",
"country": "NG",
"registrationType": "RC",
"registrationNumber": "RC 1234567",
"tin": "12345678-0001",
"expectedName": "Acme Trading Ltd"
}'
| Field | Type | Required | Description |
|---|---|---|---|
subjectId | string | Yes | Your own id for the business. |
country | 'NG' | Yes | Only Nigeria for now; anything else is 400. |
registrationType | 'RC' | 'BN' | 'IT' | Yes | A company, a business name, or incorporated trustees. |
registrationNumber | string | Yes | Digits; an RC / BN / IT prefix, spaces and hyphens are tolerated. A prefix that contradicts registrationType (BN 123 sent as RC) is a 400. |
tin | string | No | Nigerian TIN (8 to 14 digits; hyphens and spaces tolerated). An empty string counts as not sent. |
expectedName | string | Yes | The business name the business gave you. |
threshold | number (0–100) | No | Name score needed to verify. Defaults to 70. |
Scope business:verify; no Detection Pack or fraud terms. Metered as business (₦80 a check) when the registry answered. A FREE plan has 50 checks a month and then answers 429 BUSINESS_CHECK_QUOTA_EXCEEDED (details: limit, used, resetAt); a paid plan is not capped.
Response:
{
"success": true,
"data": {
"status": "verified",
"reason": null,
"matchScore": 100,
"registeredName": "ACME TRADING LIMITED",
"registrationStatus": "ACTIVE",
"registeredAt": "2015-03-01",
"tinStatus": "MATCHED",
"provider": "prembly",
"verificationId": "iv_3k9z..."
}
}
verified means the registry knows the number, it is active, the registered name scores at least the threshold, and the TIN matched when you sent one. failed carries one reason, in this order: not_found, inactive, name_mismatch, tin_mismatch. provider_down (no reason) means the registry could not answer: try again later. A provider_down answer is never stored under your x-idempotency-key, so a retry with the same key checks again. tinStatus is MATCHED, NOT_MATCHED or NOT_CHECKED. The registered name is scored both ways against expectedName and the lower score kept, so every word must appear on both sides (legal-form words such as Ltd or Limited are ignored): Acme does not match ACME HOLDINGS INTERNATIONAL LIMITED. A TIN matches when the tax office holds the same registration for it (the same digits, on the same register when its record names one), or, when it holds none, the same name. PlatformXe answers facts; your own review decides, and a mismatch is never rejected for you. The answer never carries the registry's directors, shareholders, addresses or contacts, and the registration number and TIN are not logged.
Match scoring uses the same canonicalisation pipeline as screening (lowercase, diacritic-stripped, honorifics removed, whitespace collapsed) — Adébáyò Ógúndé resolves to the same canonical form as Adebayo Ogunde, so honest spelling differences don't sink the match.
Privacy + storage
- Every successful or failed call writes one append-only row to
identity_verificationskeyed by(orgId, subjectId, kind, verifiedAt). - The raw provider response is envelope-encrypted: per-row 32-byte DEK, AES-256-GCM payload encryption, KEK held by the configured KMS provider. Wire format is
<keyId>|<wrappedDEK>|<iv>|<authTag>|<ciphertext>(base64). metadatais non-PII (scores, thresholds, bank code, matched-fields list). The PII (full name, DOB, address, photos) lives only inside the encrypted payload.- Decryption requires explicit reviewer authorisation. A dedicated audit-decryption endpoint that surfaces raw payloads under that authorisation ships in a follow-up release; encryption itself is live.
- When the KMS provider is unconfigured (the documented null adapter), persistence still writes the row but
rawResponseEncryptedstays null. Audit reproducibility is partial in that case but the verification trail isn't lost. - A failed BVN / NIN check stores no registry data, only the per-field
checks(2026-11-07). - A face-match reference photo is sealed under the same KMS, kept for 200 days by default (
IDENTITY_REFERENCE_PHOTO_RETENTION_DAYS, 1 to 365), never returned or logged, and not kept at all without a KMS. - A dead-letter row's request is sealed under the same KMS, never holds image bytes, is never returned by any read, and is deleted after 7 days.
Events
| Event | Fires when |
|---|---|
IDENTITY_BVN_VERIFIED | BVN match against the expected name. |
IDENTITY_NIN_VERIFIED | NIN match. |
IDENTITY_LIVENESS_PASSED | Liveness check returned passed: true. |
IDENTITY_LIVENESS_FAILED | Liveness check returned passed: false. Carries reason. |
IDENTITY_FACE_MATCHED | Similarity ≥ threshold. |
IDENTITY_ACCOUNT_VERIFIED | Account name match ≥ threshold. |
IDENTITY_VERIFICATION_FAILED | Any kind failed. Carries kind, optional reason. |
All events carry the verificationId so you can drill into the audit trail.
Errors
| HTTP | Code | Cause |
|---|---|---|
| 400 | BAD_REQUEST | Validation failure — non-11-digit BVN/NIN, missing subjectId / expectedName, malformed image (both url+base64, http: URL), invalid threshold. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 402 | DETECTION_PACK_REQUIRED | Detection Pack addon not enabled. |
| 403 | FORBIDDEN | API key has no organisation context, or wrong scope. |
| 429 | RATE_LIMITED | 1,000/hr per endpoint exceeded. |
| 500 | INTERNAL_ERROR | Unexpected service failure. (Provider unavailability is a documented status: "provider_down" response, NOT a 500.) |