Identity Verification in Ghana

Verify a Ghanaian identity document — Ghana Card, Voter ID, or Passport — and retrieve the holder's identity details including name, date of birth, and gender.

Prerequisites

You'll need an API key. See Quickstart or Authentication if you don't have one yet.

Note: Verification endpoints use an API key in the X-API-Key header — not a Bearer token. Verification POST requests also require an Idempotency-Key header.


Supported document types

Document idType Notes
Ghana Card ghana_card National identity card issued by the National Identification Authority (NIA). Most widely used Ghanaian ID.
Voter ID voter_id Voter identification card issued by the Electoral Commission.
Passport passport Ghanaian passport issued by the Ghana Immigration Service.

All three return the same response shape — only the request idType and idNumber format differ.


Make the verification request

Submit the document via the identity verification endpoint. Set country to GH and idType to one of the values above.

Ghana Card

curl -X POST https://api.lira.com/api/v1/verify/identity \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Idempotency-Key: YOUR_IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "country": "GH",
    "idType": "ghana_card",
    "idNumber": "GHA-123456789-0"
  }'

Voter ID

curl -X POST https://api.lira.com/api/v1/verify/identity \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Idempotency-Key: YOUR_IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "country": "GH",
    "idType": "voter_id",
    "idNumber": "1234567890"
  }'

Passport

curl -X POST https://api.lira.com/api/v1/verify/identity \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Idempotency-Key: YOUR_IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "country": "GH",
    "idType": "passport",
    "idNumber": "G1234567"
  }'

Request body fields

Field Type Required Description
country string Yes Always GH.
idType string Yes One of ghana_card, voter_id, passport.
idNumber string Yes The document number. See format requirements below.
mode string No sync (default). Async mode is not yet available for Ghana identity.
validation object No Optional fields to cross-check against the document record. See validation section below.

idNumber format requirements

idType Format
ghana_card 6–20 alphanumeric characters and dashes (e.g. GHA-123456789-0).
voter_id 6–12 digits.
passport 6–12 alphanumeric characters.

Optional validation (cross-check)

You can include a validation object to check whether specific caller-provided fields match the registry record. The response will include a validation object indicating whether each submitted field matched, and the verification status becomes inconclusive if any field does not match.

curl -X POST https://api.lira.com/api/v1/verify/identity \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Idempotency-Key: YOUR_IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "country": "GH",
    "idType": "ghana_card",
    "idNumber": "GHA-123456789-0",
    "validation": {
      "firstName": "Kwame",
      "lastName": "Mensah",
      "dateOfBirth": "1990-04-12"
    }
  }'
Validation field Type Match rule
firstName string Case-insensitive, trimmed.
lastName string Case-insensitive, trimmed.
dateOfBirth string Exact match. Format YYYY-MM-DD.

Note: Cross-check fields are never persisted on the verification record and never logged. They are compared in-memory against the registry response and only the boolean match result is stored.


Read the result

Successful verification

{
  "id": "c3d4e5f6-...-...-...-...",
  "status": "success",
  "verificationType": "GHANA_CARD",
  "idType": "ghana_card",
  "country": "GH",
  "identifier": "GHA-123456789-0",
  "verifiedAt": "2026-05-26T10:00:00.000Z",
  "origin": "api",
  "verified": true,
  "firstName": "Kwame",
  "lastName": "Mensah",
  "middleName": "Kofi",
  "dateOfBirth": "1990-04-12",
  "gender": "M",
  "validation": null
}

Inconclusive verification (cross-check mismatch)

When you include validation and at least one submitted field does not match the registry record, status is inconclusive and validation.<field>.match reports per-field results.

{
  "id": "c3d4e5f6-...-...-...-...",
  "status": "inconclusive",
  "verificationType": "GHANA_CARD",
  "idType": "ghana_card",
  "country": "GH",
  "identifier": "GHA-123456789-0",
  "verifiedAt": "2026-05-26T10:00:00.000Z",
  "origin": "api",
  "verified": false,
  "firstName": "Kwame",
  "lastName": "Mensah",
  "middleName": "Kofi",
  "dateOfBirth": "1990-04-12",
  "gender": "M",
  "validation": {
    "firstName": { "value": "NotKwame", "match": false },
    "lastName":  { "value": "Mensah",   "match": true },
    "dateOfBirth": { "value": "1990-04-12", "match": true }
  }
}

Failed verification

{
  "id": "c3d4e5f6-...-...-...-...",
  "status": "failed",
  "verificationType": "GHANA_CARD",
  "idType": "ghana_card",
  "country": "GH",
  "identifier": "GHA-000000000-0",
  "verifiedAt": "2026-05-26T10:00:00.000Z",
  "origin": "api",
  "error": {
    "code": "IDENTIFIER_NOT_FOUND",
    "message": "No identity record found"
  }
}

Response fields

Field Type Description
id string Unique verification ID.
status string success, inconclusive, failed, or error.
verificationType string One of GHANA_CARD, GHANA_VOTER_ID, GHANA_PASSPORT.
idType string The idType you submitted.
country string Always GH.
identifier string The document number you submitted.
verifiedAt string ISO 8601 timestamp.
origin string api (API-key requests) or dashboard (logged-in dashboard requests).
verified boolean true only when status is success.
firstName string First name as recorded by the registry. May be null.
lastName string Last name as recorded by the registry. May be null.
middleName string Middle name. May be null or empty.
dateOfBirth string Date of birth, YYYY-MM-DD. May be null (notably for Passport records).
gender string M or F. May be null.
validation object Present only when validation was included in the request. Contains per-field match results.
error object Present when status is failed or error.
error.code string Machine-readable failure code. See error handling table below.
error.message string Human-readable description.

Ghana-specific notes

  • A Ghana Card number is issued by the National Identification Authority (NIA) and is the most reliable identity document for KYC. The standard format is GHA-XXXXXXXXX-X but variations exist.
  • Voter ID numbers reflect the Electoral Commission's current state. A reissued voter card may resolve to the same person under a new number — old numbers will fail.
  • Passport records may omit dateOfBirth and middleName; treat both as optional in your downstream code.
  • Date of birth on the registry record is the source of truth. If your form collects DOB and you use the validation.dateOfBirth cross-check, a mismatch is a strong fraud signal — surface it to a manual review queue.

Error handling

error.code Cause Action
IDENTIFIER_NOT_FOUND Document number not found in the registry Ask the user to check the number is correct
INVALID_REQUEST Submitted data was rejected by the registry (e.g. malformed number) Validate format client-side before submitting
INCONCLUSIVE Cross-check fields did not match the registry record Surface mismatched fields from validation to a manual review queue
PROVIDER_RATE_LIMITED Too many requests in a short window Back off and retry; consider request batching
PROVIDER_UNAVAILABLE Upstream registry is temporarily unreachable Retry with exponential backoff

For the full error code reference, see Errors.

Warning: Do not surface raw error.code values directly to end users. Map them to user-friendly messages in your application (e.g. IDENTIFIER_NOT_FOUND → "We couldn't verify that document. Please check the number and try again.").


Next steps