Peleza β€” Trust built on data
πŸ‡°πŸ‡ͺ Kenya
On this page

KRA PIN by PIN

Look up taxpayer details using a known KRA PIN (e.g. A123456789Z).

Request

POST/api/v1/kra-pin-by-pin
{{baseUrl}}/api/v1/kra-pin-by-pin
HeaderTypeDescription
AuthorizationstringBearer YOUR_ACCESS_TOKEN from the OAuth client-credentials flow
Content-Typestringapplication/json

Body Parameters

ParameterTypeDescriptionRequired
kra_pinstringKRA PIN β€” A or P + 9 digits + letter (e.g. A123456789Z)required
consentbooleanMust be true β€” confirms data-subject consent to perform this verificationrequired
customer_numberstringOptional reference for your own tracking (max 255 characters)optional

Sample request & response

Request payload for Sample request & response:

Sample dataRequest payload
{
  "kra_pin": "A123456789Z",
  "consent": true
}

Expected response for Sample request & response:

200 OKSample dataExpected response
{
  "success": true,
  "response_code": 200,
  "message": "KRA PIN by PIN verification successful",
  "data": {
    "taxpayer_id": "A123456789Z",
    "taxpayer_pin": "A123456789Z",
    "taxpayer_name": "JOHN DOE SAMPLE",
    "taxpayer_type": "Individual",
    "status": "Active"
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Response Fields

FieldTypeDescription
successbooleanWhether the request succeeded
response_codenumberApplication response code (typically mirrors HTTP)
messagestringHuman-readable status message
dataobjectPayload for the verified resource
request_idstringUUID for support and audit trails
data.taxpayer_pinstringKRA PIN
data.taxpayer_namestringTaxpayer name
data.taxpayer_typestringType of taxpayer from KRA
data.statusstringPIN status from KRA (StatusOfPIN). Possible values: Active, Suspended, Cancelled, Stopped

PIN status values

data.status maps from KRA StatusOfPIN. Possible values and meanings:

StatusMeaning
ActiveThe PIN is currently active in the tax system.
SuspendedThe PIN has been temporarily suspended.
CancelledThe PIN has been cancelled and is no longer active.
StoppedThe PIN has been stopped in the tax system.

Error codes

Standard Peleza HTTP / response_code values (same across all API calls). Validation message text is endpoint-specific. Full reference: Error Codes.

CodeWhenBilled?
200Taxpayer details returnedYes
400Validation β€” kra_pin required and must match A/P + 9 digits + letterNo
401Missing or invalid Bearer tokenNo
402Insufficient wallet balance or credit limitNo
403No active wallet or billing profile (or service not enabled)No
404Invalid KRA PIN (code 19005)Yes
408Not typically used for KRA β€” upstream failures map to 503No
429Rate limitedNo
502Not typically used for KRA β€” upstream failures map to 503No
503KRA connection / service unavailableNo

Set {{baseUrl}} to https://api.peleza.com (production) or https://sandbox.peleza.com (sandbox). Authenticated calls need a Bearer token from POST /api/v1/oauth/token.