Upgrade a Team's KYC tier
const url = 'https://auth.payhero.africa/api/v2/account_kycs/upgrade';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"account_id":63,"upgrade_information":{"upgrade_to":3,"upgrade_notes":"Adding third-party collections"},"kyc_tokens":{"national_id":"9f2c61ab4d7e4a0c8b115d3e","tin":"a1b2c3d4e5f6a7b8c9d0e1f2"}}'};
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://auth.payhero.africa/api/v2/account_kycs/upgrade \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "account_id": 63, "upgrade_information": { "upgrade_to": 3, "upgrade_notes": "Adding third-party collections" }, "kyc_tokens": { "national_id": "9f2c61ab4d7e4a0c8b115d3e", "tin": "a1b2c3d4e5f6a7b8c9d0e1f2" } }'Raises an already-approved Team to a higher tier. Attach kyc_tokens
covering the requested tier and the upgrade is granted immediately;
otherwise it is recorded as pending for review.
Tokens top out at tier 3 — a tier 4 request, or tier 3 backed only by an individual taxpayer, always goes to a reviewer.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
The reviewer’s user id. Absent when the tokens settled it without review.
object
References to uploaded KYC document files.
object
Verification tokens backing a KYC submission. Each value is a lookup_id
returned by a check. All slots are optional; PayHero resolves every token
against Axxa Connect and rejects one it never issued.
object
A token from a national_id_* or nin check.
A token from a phone or phone_status_global check.
A token from a kra_pin or tin_global check.
Examples
{ "account_id": 63, "upgrade_information": { "upgrade_to": 3, "upgrade_notes": "Adding third-party collections" }, "kyc_tokens": { "national_id": "9f2c61ab4d7e4a0c8b115d3e", "tin": "a1b2c3d4e5f6a7b8c9d0e1f2" }}Responses
Section titled “Responses”The updated KYC record.
object
object
object
References to uploaded KYC document files.
object
object
References to uploaded KYC document files.
object
object
object
The reviewer’s user id. Absent when the tokens settled it without review.
The record of what the submitted tokens proved. Kept on the KYC submission so the basis for a tier stays auditable.
object
Verification tokens backing a KYC submission. Each value is a lookup_id
returned by a check. All slots are optional; PayHero resolves every token
against Axxa Connect and rejects one it never issued.
object
A token from a national_id_* or nin check.
A token from a phone or phone_status_global check.
A token from a kra_pin or tin_global check.
One resolved token, recorded on the KYC submission.
object
The slot it was submitted in.
The kind of check, independent of which provider ran it. Decides what a token is worth when attached to a Team’s KYC.
verified — the identifier was confirmed. not_verified — the check ran
and found no match. error — the check could not be completed.
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.
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 tier the tokens justify on their own.
Example
{ "account_kyc": { "id": 501, "account_id": 63, "entity_type": "business", "status": "pending", "country_code": "KE", "country": "Kenya", "kyc_tier": 3, "contact_information": { "first_name": "Jane", "last_name": "Doe", "identification_number": 12345678, "identification_type": "national_id", "phone_number": "+254712345678" }, "entity_information": { "entity_name": "Vendor A Ltd", "nature_of_business": "Internet Service Provider", "business_type": "limited_company", "entity_address": "Westlands" }, "account_information": { "currency": "KES", "organization_id": "9", "account_name": "Vendor A", "email": "vendor-a@acme.co", "phone_number": "+254711000111" }, "upgrade_information": { "requested_kyc_upgrade": true, "upgrade_from": 2, "upgrade_to": 3, "upgrade_notes": "Adding third-party collections", "upgrade_status": "approved" }, "verification_information": { "kyc_tokens": { "national_id": "9f2c61ab4d7e4a0c8b115d3e", "phone_number": "c41e77d9b0a24f6e89305ab2", "tin": "a1b2c3d4e5f6a7b8c9d0e1f2" }, "verifications": [ { "kind": "national_id", "token": "a1b2c3d4e5f6a7b8c9d0e1f2", "check": "kra_pin", "category": "national_id", "country": "KE", "status": "verified", "verification_status": "VERIFIED", "verified": true, "actor_type": "C", "subject_name": "ACME TRADING LIMITED", "identifier_masked": "P00•••••00X", "source": "cache" } ], "actor_type": "C", "verified_kyc_tier": 3 } }}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}
