Affinity API 1.0 Help

Ghana card verification

Introduction

This API enables third parties on our developer platform to verify Ghana Card numbers

Endpoints

Endpoint 1: Verify Ghana card

  • Description: This endpoint allows you to verify the validity of a Ghana Card. It requires the Ghana card number and a selfie. If there is a positive match, the response will include KYC details.

  • Method: POST

  • URL: /verification/ecowas

Request Parameters:

Name

Type

Description

Default value

In

Required

1.

idNumber

string

Accepts in a format with or without dashes: e.g. GHA-000000000-0 or GHA0000000000

body

[required]

2.

selfie

image

format: PNG or JPEG

body

[required]

Response (Success: 200)

Name

Type

Description

Notes

1.

nationalId

string

Ghana card number

[required]

2.

cardId

string

[required]

3.

cardValidFrom

datetime

Ghana card issue date

[required]

4.

cardValidTo

datetime

Ghana card expiry date

[required]

5.

surname

string

[required]

6.

forenames

string

[required]

7.

nationality

string

[required]

8.

birthDate

datetime

[required]

9.

gender

ENUM:


  • MALE

  • FEMALE

[required]

10.

selfie

string

Face on card (base64 string)

[required]

Response (Error: 400/422)

Name

Type

Description

Required

1.

message

string

Error message

[required]

2.

errorCode

string

Type of error (see (here) for further details)

[required]

3.

errorId

date

Identifier to help track request errors

[required]

4.

errors

{field:string; message:string}[]

List of validation errors

[optional]

Endpoint 2: Verify Ghana card yes/no

  • Description: This endpoint allows you to verify the validity of a Ghana Card. It requires the Ghana card number and a selfie. The response will indicate whether there is a positive match, but no KYC details will be provided.

  • Method: POST

  • URL: /verification/ecowas/yes-no

Selfie requirements

Below are the standard requirements for taking or uploading a selfie:

  • The face should take up 70-80% of the image

  • Face should be visible and centred in the picture frame, facing the camera directly

  • Resolution should be at least 640x640 pixels

  • Background should be plain, without other objects, people or reflections

  • Take a live photo, not a picture of another picture

  • Image should not be digitally enhanced

  • Remove any accessories on the face such as a hat, face mask, sunglasses, etc.

Sample of a selfie

V3 0056110 0507927 0760905

ID number response guide

ID number formats and their responses

XXX-2002002XX-X

Returns a successful response.

Error codes

AUTHENTICATION_ERROR

The authentication header is missing or incorrect. Please ensure the auth header is properly set and that your API key's scope and environment match the required values.

VALIDATION_ERROR

The request data is invalid. Check the errors array for detailed information on the fields that caused the issue.

VERIFICATION_UNSUCCESSFUL

The verification was unsuccessful. Possible reasons include an incorrect or malformed Ghana card number, or a mismatch between the provided selfie and the ID holder.

BAD_IMAGE

The verification failed due to a low-quality selfie. Ensure the photo is clear and meets the required standards for verification.

VERIFICATION_FAILED

A general failure occurred during the verification process. Please check the details and try again.

APPLICATION_ERROR

An unexpected error occurred. Please try again later or contact support if the problem persists.

API reference

Refer to ID verification for more details

Last modified: 27 August 2025