SourceID Docs

API Overview

Welcome to the SourceID API documentation! The SourceID API provides a powerful and flexible way to integrate identity and access management capabilities into your applications. With SourceID, you can securely verify users and manage identities with ease.

Key Features

  • Authentication: Implement secure user verification using industry-standard protocols.
  • Scalability: Designed to handle high volumes of requests, ensuring reliability for applications of any size.
  • Developer-Friendly: Comprehensive API endpoints with detailed documentation to simplify integration.

Base URL

The SourceID API is available in two environments:

  • Sandbox: Use the following base URL for testing and development purposes:
    https://api.sbx.sourceid.tech

  • Production: The production URL will be provided by the support team. The API will be accessible at a URL similar to:
    https://api.sourceid.tech

Please ensure you are using the correct environment for your use case.

Sandbox Test Parameters

When testing the API in sandbox mode, you can use the following test parameters to simulate different response scenarios. These parameters are specifically designed for testing purposes and will return predictable responses.

Test Values for Different Scenarios

Testing Tip

For Duplicate references use this value 77777777777.

Verification Test Values

Verification TypeValid Test ValueInvalid Test ValueError Test ValueFace Mismatch Value
BVN12345678901000000000009999999999988888888888
NIN12345678901000000000009999999999988888888888
EMAILvalid@example.cominvalid@example.comerror@example.com
PHONE080123456780000000000099999999999
TIN12345678-0000100000000-0000099999999-99999
PASSPORTA00400000B00000000C99999999
RC_NUMBERRC123456RC000000RC999999
GHANA_CARDGHA123456789GHA000000000GHA999999999
ALIEN_IDALN123456789ALN000000000ALN999999999
DRIVERS_LICENSEDL123456789DL000000000DL999999999
NATIONAL_IDNID123456789NID000000000NID999999999
PLATE_NUMBERABC123DEINVALID123ERROR999
BANK_ACCOUNT123456789000000000009999999999
FACE_COMPARISONdata:image/jpeg;base64,valid_imagedata:image/jpeg;base64,invalid_imagedata:image/jpeg;base64,error_imagedata:image/jpeg;base64,mismatch_image
COMPANY_DIRECTOR_SEARCHDoe VentureInvalid CompanyError Company

Response Behavior

  • Valid Test Values: Will return a successful response with mock data
  • Invalid Test Values: Will return a validation error response
  • Error Test Values: Will simulate a server error response
  • Face Mismatch Values: Will return a face mismatch error for face-related verifications

Testing Tip

Use these test values during development to ensure your application handles all possible API response scenarios correctly.

Using Test Values in Code

Here's how you can structure these test values in your application code:

export const MOCK_VERIFICATION_TEST_VALUES = {
  VALID: {
    BVN: '12345678901',
    NIN: '12345678901',
    EMAIL: 'valid@example.com',
    PHONE: '08012345678',
    TIN: '12345678-00001',
    PASSPORT: 'A00400000',
    RC_NUMBER: 'RC123456',
    GHANA_CARD: 'GHA123456789',
    ALIEN_ID: 'ALN123456789',
    DRIVERS_LICENSE: 'DL123456789',
    NATIONAL_ID: 'NID123456789',
    PLATE_NUMBER: 'ABC123DE',
    BANK_ACCOUNT: '1234567890',
    FACE_COMPARISON: 'data:image/jpeg;base64,valid_image',
    COMPANY_DIRECTOR_SEARCH: 'Doe Venture',
  },
  INVALID: {
    BVN: '00000000000',
    NIN: '00000000000',
    EMAIL: 'invalid@example.com',
    PHONE: '00000000000',
    TIN: '00000000-00000',
    PASSPORT: 'B00000000',
    RC_NUMBER: 'RC000000',
    GHANA_CARD: 'GHA000000000',
    ALIEN_ID: 'ALN000000000',
    DRIVERS_LICENSE: 'DL000000000',
    NATIONAL_ID: 'NID000000000',
    PLATE_NUMBER: 'INVALID123',
    BANK_ACCOUNT: '0000000000',
    FACE_COMPARISON: 'data:image/jpeg;base64,invalid_image',
    COMPANY_DIRECTOR_SEARCH: 'Invalid Company',
  },
  ERROR: {
    BVN: '99999999999',
    NIN: '99999999999',
    EMAIL: 'error@example.com',
    PHONE: '99999999999',
    TIN: '99999999-99999',
    PASSPORT: 'C99999999',
    RC_NUMBER: 'RC999999',
    GHANA_CARD: 'GHA999999999',
    ALIEN_ID: 'ALN999999999',
    DRIVERS_LICENSE: 'DL999999999',
    NATIONAL_ID: 'NID999999999',
    PLATE_NUMBER: 'ERROR999',
    BANK_ACCOUNT: '9999999999',
    FACE_COMPARISON: 'data:image/jpeg;base64,error_image',
    COMPANY_DIRECTOR_SEARCH: 'Error Company',
  },
  FACE_MISMATCH: {
    NIN: '88888888888',
    BVN: '88888888888',
    FACE_COMPARISON: 'data:image/jpeg;base64,mismatch_image',
  },
  GENERIC: {
    DUPLICATE_REFERENCE: '77777777777',
  },
} as const;

export type MockVerificationTestValueKey =
  keyof typeof MOCK_VERIFICATION_TEST_VALUES.VALID;

API Response Codes

This document provides a detailed description of the response codes used in the system. These codes indicate the status of a request and help identify issues when they occur.


✅ Success Codes

CodeDescription
00SUCCESS: The request was successfully processed.

❌ Failure/Error Codes

CodeDescription
99FAILED: The request failed due to an unspecified error.
91INVALID_REQUEST: The request was malformed or contained invalid data.
92INVALID_CREDENTIALS: Authentication failed due to incorrect credentials.
94TIMEOUT: The request timed out due to no response within the expected time frame.
95PROVIDER_ERROR: An error occurred from an external provider or service.
96INVALID_DOCUMENT: The submitted document was invalid or unreadable.
97DOCUMENT_EXPIRED: The document provided has expired.
98DOCUMENT_NOT_FOUND: The specified document could not be located.
90FACE_MISMATCH: Face verification failed; faces did not match.
100INVALID_IMAGE: The image provided was invalid or not suitable for processing.
101SYSTEM_ERROR: An internal system error occurred.
102SERVICE_TEMPORARILY_UNAVAILABLE: The service is currently unavailable, try again later.
103DUPLICATE_REFERENCE: The reference used already exists and must be unique.

⏳ Pending Code

CodeDescription
03PENDING: The request is being processed and not yet complete.

Note: Always refer to the specific error code for appropriate handling logic and user feedback.

Authentication

The SourceID API uses token-based authentication. You will need to include an access token in the x-api-key header of each request:

x-api-key: {API-KEY} 

Getting Started

  1. Sign Up: Register for a SourceID account to obtain your API credentials.
  2. Obtain API KEY: Use your credentials to authenticate your API request.
  3. Explore Endpoints: Use the API to verify users.

Example Request

Here’s an example of a simple API request to fetch user details:

GET /v1/customer
Host: api.rd.sourceid.tech
x-api-key: {API-KEY}

Support

If you have any questions or need assistance, please contact our support team or refer to the detailed endpoint documentation.

Start building with the SourceID API today and unlock seamless identity and access management for your applications!

On this page