Skip to content
Lira APILira API

Identity/KYC Verification in Ghana

Ghana Card, Voter ID & Passport

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

DocumentidTypeNotes
Ghana Cardghana_cardNational identity card issued by the National Identification Authority (NIA). Most widely used Ghanaian ID.
Voter IDvoter_idVoter identification card issued by the Electoral Commission.
PassportpassportGhanaian 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

Terminal
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

Terminal
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

Terminal
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

FieldTypeRequiredDescription
countrystringYesAlways GH.
idTypestringYesOne of ghana_card, voter_id, passport.
idNumberstringYesThe document number. See format requirements below.
modestringNosync (default). Async mode is not yet available for Ghana identity.
validationobjectNoOptional fields to cross-check against the document record. See validation section below.

idNumber format requirements

idTypeFormat
ghana_card6–20 alphanumeric characters and dashes (e.g. GHA-123456789-0).
voter_id6–12 digits.
passport6–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.

Terminal
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 fieldTypeMatch rule
firstNamestringCase-insensitive, trimmed.
lastNamestringCase-insensitive, trimmed.
dateOfBirthstringExact 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

JSON
{
  "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.

JSON
{
  "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

JSON
{
  "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

FieldTypeDescription
idstringUnique verification ID.
statusstringsuccess, inconclusive, failed, or error.
verificationTypestringOne of GHANA_CARD, GHANA_VOTER_ID, GHANA_PASSPORT.
idTypestringThe idType you submitted.
countrystringAlways GH.
identifierstringThe document number you submitted.
verifiedAtstringISO 8601 timestamp.
originstringapi (API-key requests) or dashboard (logged-in dashboard requests).
verifiedbooleantrue only when status is success.
firstNamestringFirst name as recorded by the registry. May be null.
lastNamestringLast name as recorded by the registry. May be null.
middleNamestringMiddle name. May be null or empty.
dateOfBirthstringDate of birth, YYYY-MM-DD. May be null (notably for Passport records).
genderstringM or F. May be null.
validationobjectPresent only when validation was included in the request. Contains per-field match results.
errorobjectPresent when status is failed or error.
error.codestringMachine-readable failure code. See error handling table below.
error.messagestringHuman-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.codeCauseAction
IDENTIFIER_NOT_FOUNDDocument number not found in the registryAsk the user to check the number is correct
INVALID_REQUESTSubmitted data was rejected by the registry (e.g. malformed number)Validate format client-side before submitting
INCONCLUSIVECross-check fields did not match the registry recordSurface mismatched fields from validation to a manual review queue
PROVIDER_RATE_LIMITEDToo many requests in a short windowBack off and retry; consider request batching
PROVIDER_UNAVAILABLEUpstream registry is temporarily unreachableRetry with exponential backoff

For the full error code reference, see Errors.


Next steps