Run a verification check
const url = 'https://connect.payhero.africa/api/v1/kyc/verify/kra_pin?fresh=true';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"number":"P000000000X"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://connect.payhero.africa/api/v1/kyc/verify/kra_pin?fresh=true' \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "number": "P000000000X" }'Runs one identity, business, phone or bank account check and returns a
lookup_id — the verification token.
The request body is a flat object of string fields; which fields are
required depends on the check. Call GET /api/v1/kyc/checks for the
catalogue.
A check that ran but found no match returns 200 with
status: "not_verified" — always read status, never treat 200 as
proof.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The check key, e.g. kra_pin, national_id_ke, phone, bank_account_ke.
Example
kra_pinQuery Parameters
Section titled “Query Parameters”Set to true to bypass the cache and force a live provider call.
Example
trueRequest Bodyrequired
Section titled “Request Bodyrequired”object
Examples
Business tax PIN
{ "number": "P000000000X"}{ "number": "28200002"}{ "number": "254712345678"}{ "account_no": "2096844395", "bank_id": "34"}{ "number": "0123456789", "bank_code": "058"}{ "tin": "MWI789456123", "country": "MW"}{ "company_number": "PVT-ABCDEFG", "country_code": "KE"}Responses
Section titled “Responses”The check result. Read status for the verdict.
The outcome of one check. Identical in shape whichever check ran.
object
The verification token. Attach it to a KYC submission or resolve it later.
The kind of check, independent of which provider ran it. Decides what a token is worth when attached to a Team’s KYC.
The country the check actually ran against — the input country for global checks.
verified — the identifier was confirmed. not_verified — the check ran
and found no match. error — the check could not be completed.
The provider’s own verdict.
C for a company, I for a natural person. Absent when the check cannot
tell. Only tax_id and company checks can distinguish; an ID card or a
phone line always reports I.
The registered name, normalised out of the provider payload.
The raw provider payload. Shape varies per check, per country and
occasionally per record — read subject_name and actor_type
instead of reaching into this.
object
prembly for a live call, cache for a replay.
When the cached result lapses.
What this call cost. 0 on your own provider key.
Example
{ "lookup_id": "a1b2c3d4e5f6a7b8c9d0e1f2", "check": "kra_pin", "category": "national_id", "country": "KE", "status": "verified", "verification_status": "VERIFIED", "actor_type": "C", "subject_name": "ACME TRADING LIMITED", "reference": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d", "detail": "KRA PIN Checker (Kenya) verification successful", "response_code": "00", "duration_ms": 412, "source": "prembly", "cached": true, "charged_amount": 20, "charge_currency": "KES", "charge_reference": "cmp_a1b2c3d4e5f6a7b8c9d0e1f2", "charge_status": "charged"}The request was rejected (validation or business-rule failure).
object
Examples
{ "error_code": "invalid_argument", "error_message": "the transaction amount is insufficient as it wont cater for cost: (4.62)", "status_code": 400}{ "error_code": "invalid_argument", "error_message": "The passed channel is not active", "status_code": 400}Missing or invalid Basic auth credentials.
object
Example
{ "error_code": "invalid_argument", "error_message": "the transaction amount is insufficient as it wont cater for cost: (4.62)", "status_code": 400}The Team’s service wallet cannot cover the check.
object
Machine-readable cause, on billing and entitlement failures.
Example
{ "error": "insufficient service wallet balance", "reason": "insufficient_balance"}Identity checks are not available on this PayHero account.
object
Machine-readable cause, on billing and entitlement failures.
Example
{ "error": "insufficient service wallet balance", "reason": "insufficient_balance"}Unknown check key.
Identity checks are not enabled — connect a provider key first.
object
Machine-readable cause, on billing and entitlement failures.
Example
{ "error": "insufficient service wallet balance", "reason": "insufficient_balance"}The identity provider or billing was unreachable. Safe to retry.
object
Machine-readable cause, on billing and entitlement failures.
Example
{ "error": "insufficient service wallet balance", "reason": "insufficient_balance"}
