KRA — Validate PIN by National ID

Look up a KRA PIN by national ID or company registration number via the live KRA API. Use `"ID"` for individuals or `"COMP"` for companies. Aliases are case-insensitive: `ID`, `KE`, `INDIVIDUAL`, `NATIONAL_ID` all map to individual lookups; `COMP`, `COMPANY`, `CPR` all map to company lookups.

Endpoint

POSThttps://gateway.startappz.co.ke/api/v1/sandbox/kra-validate-pin-by-id

Swap sandbox for live once you have production credentials.

Authentication

Send your credentials as headers:

HeaderValue
X-API-KeyYour public key
X-API-SecretYour secret (shown once at issue time)

Request parameters

ParameterTypeRequiredDescription
taxpayer_type String required `"ID"` for Kenyan national ID, or `"COMP"` for company CPR. Aliases accepted (case-insensitive): `ID|KE|INDIVIDUAL|NATIONAL_ID` for individuals, `COMP|COMPANY|CPR` for companies. Returns 400 for any other value.
taxpayer_id String required The taxpayer identifier: national ID number (8 digits, e.g. `37391109`) for individuals, or company CPR registration number (e.g. `CPR/2014/133700`) for companies.

Response parameters

All responses follow the standard envelope: { code, message, data }.

FieldTypeDescription
codeStringInternal status code (e.g. 200.001).
messageStringHuman-readable status / error description.
dataObjectEndpoint-specific payload (fields below).
data.verified Boolean True when a PIN was found for the supplied identifier.
data.kra_pin String KRA PIN registered to the identifier.
data.taxpayer_name String Registered taxpayer name.

Sandbox masking

By default, sandbox responses mask PII (names, IDs, dates, phone numbers). Accept the Data Processing Addendum once from your dashboard to see real data on all your sandbox keys.