KRA — Validate PIN by National ID
Look up a KRA PIN by national ID (or other taxpayer identifier) via the live KRA API.
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:
| Header | Value |
|---|---|
X-API-Key | Your public key |
X-API-Secret | Your secret (shown once at issue time) |
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taxpayer_type |
String | required | Identifier type, e.g. `ID` for Kenyan National ID. |
taxpayer_id |
String | required | The taxpayer identifier value (e.g. national ID number). |
Response parameters
All responses follow the standard envelope: { code, message, data }.
| Field | Type | Description |
|---|---|---|
code | String | Internal status code (e.g. 200.001). |
message | String | Human-readable status / error description. |
data | Object | Endpoint-specific payload (fields below). |
data.valid |
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). You can grant unmasked consent per key from your dashboard.