Modern and customer friendly ID scanning

Developers

Developers

okID Verification API

okID Verification API

Comprehensive guide to integrating the okID identity verification system into your application.
Comprehensive guide to integrating the okID identity verification system into your application.

Modern and customer friendly ID scanning

Developers

okID Verification API

Comprehensive guide to integrating the okID identity verification system into your application.

Overview

Overview

The okID verification system provides a secure and reliable way to verify user identities. The integration flow follows these steps:

The okID verification system provides a secure and reliable way to verify user identities. The integration flow follows these steps:

1

Generate Verification Token

Your backend server calls our API with your API key to generate a verification token.

1

Generate Verification Token

Your backend server calls our API with your API key to generate a verification token.

1

Generate Verification Token

Your backend server calls our API with your API key to generate a verification token.

2

Pass Verification Token to Client

Your backend server receives a unique verification token.

2

Pass Verification Token to Client

Your backend server receives a unique verification token.

2

Pass Verification Token to Client

Your backend server receives a unique verification token.

3

Initialize Verification

Your backend server uses the verification token to call our API and initiate the verification process.

3

Initialize Verification

Your backend server uses the verification token to call our API and initiate the verification process.

3

Initialize Verification

Your backend server uses the verification token to call our API and initiate the verification process.

4

User Completes Verification

The user completes the verification process and returns to your website or mobile app.

4

User Completes Verification

The user completes the verification process and returns to your website or mobile app.

4

User Completes Verification

The user completes the verification process and returns to your website or mobile app.

5

Receive Results

Your backend server receives a webhook payload containing the results of the verification process.

5

Receive Results

Your backend server receives a webhook payload containing the results of the verification process.

5

Receive Results

Your backend server receives a webhook payload containing the results of the verification process.

API Reference

API Reference

Our REST API provides endpoints for generating verification tokens and retrieving verification results.
POST/v1/verification/generate

Request

{
  "metadata": {
    "user_id": "user-123",
    "reference": "order-456"
  },
  "callback_url": "https://your-api.example.com/webhook",
  "success_url": "https://your-app.example.com/success",
  "error_url": "https://your-app.example.com/error"
}

Response

{
  "process_token": "tok_v1_7f4b5e3a2c1d9f8e7d6c5b4a3f2e1d",
  "expires_at": "2023-12-31T23:59:59Z"
}

Headers

Header
X-SDK-Key
Content-Type
Description

Your API key from the OkID dashboard

application/json

GET/v1/verification/:id

Response

{
  "id": "ver_6a7b8c9d0e1f2g3h4i5j",
  "status": "completed",
  "created_at": "2023-12-30T10:15:30Z",
  "completed_at": "2023-12-30T10:17:45Z",
  "document_type": "passport",
  "verification_details": {
    "first_name": "John",
    "last_name": "Doe",
    "document_number": "X123456",
    "expiry_date": "2028-05-20",
    "date_of_birth": "1990-01-15"
  },
  "metadata": {
    "user_id": "user-123",
    "reference": "order-456"
  }
}

Headers

Header
X-SDK-Key
Description

Your API key from the OkID dashboard

SDK Integration



SDK Integration



Our JavaScript SDK makes it easy to embed the verification flow into your web application.

Our JavaScript SDK makes it easy to embed the verification flow into your web application.

Installation

Installation

<script src="https://cdn.okid.io/sdk/okid.js"></script>

Usage

Usage

// Initialize the verification with the process token
const config = {
  apiUrl: 'https://api1.okid.io',
  frontendUrl: 'https://verify.okid.io',
  processToken: 'tok_v1_7f4b5e3a2c1d9f8e7d6c5b4a3f2e1d',
  flowName: 'standard',
  locale: 'en',
  onComplete: (data) => {
    console.log('Verification completed:', data);
  },
  onError: (error) => {
    console.error('Verification error:', error);
  }
};

// Create okID instance
const okID= new okID(config);

// Start the verification process
okID.init();

Configuration Options

Configuration Options

Option
Option/Type

String

apiUrl
frontendUrl

String

processToken

String

flowName

String

String

locale

Function

onComplete

Function

onError
Type

String

String

String

String

String

Function

Function

Description

API endpoint URL (default: https://api1.okid.io)

Frontend URL (default: https://verify.okid.io)

Verification token generated from the API

Verification flow type (default: standard)

Interface language (default: en)

Callback when verification completes

Callback when verification fails

Webhooks

Webhooks

Webhooks allow your application to receive real-time updates about verification status changes.

Webhooks allow your application to receive real-time updates about verification status changes.

Setup

Setup

Configure your webhook URL in the okID dashboard. Alternatively, you can provide a callback_url when generating a verification token.

Configure your webhook URL in the okID dashboard. Alternatively, you can provide a callback_url when generating a verification token.

Webhook Events

Webhook Events

Event Type
Event Type Description

Fired when a verification process starts

verification.started

Fired when a verification is successfully completed

verification.completed

Fired when a verification fails

verification.failed

Fired when a verification token expires

verification.expired
Description

Fired when a verification process starts

Fired when a verification is successfully completed

Fired when a verification fails

Fired when a verification token expires

Webhook Payload Format

Webhook Payload Format

{
  "event": "verification.completed",
  "data": {
    "id": "ver_6a7b8c9d0e1f2g3h4i5j",
    "status": "completed",
    "created_at": "2023-12-30T10:15:30Z",
    "completed_at": "2023-12-30T10:17:45Z",
    "document_type": "passport",
    "verification_details": {
      "first_name": "John",
      "last_name": "Doe",
      "document_number": "X123456",
      "expiry_date": "2028-05-20",
      "date_of_birth": "1990-01-15"
    },
    "metadata": {
      "user_id": "user-123",
      "reference": "order-456"
    }
  }
}

Security

Security

Webhook requests include a signature header to verify authenticity.
Header
Header/ Description

HMAC-SHA256 signature of the payload

X-okID-Signature

Timestamp when the webhook was sent

X-okID-Timestamp
Description

HMAC-SHA256 signature of the payload

Timestamp when the webhook was sent

© 2025 Bluem B.V. Smallepad 30
3811 MG Amersfoort, the Netherlands

Tel.: +31 (0)85-222040

CoC: 32081330

© 2025 Bluem B.V. Smallepad 30
3811 MG Amersfoort, the Netherlands

Tel.: +31 (0)85-222040

CoC: 32081330

© 2025 Bluem B.V. Smallepad 30
3811 MG Amersfoort, the Netherlands