Documentation

API Documentation

Everything you need to integrate OTP verification into your application.

Quick Start
Get up and running in 5 minutes
1

Step 1: Create an Account

Sign up for a free account at verify.ge/register

2

Step 2: Get Your API Key

Navigate to the API Keys section in your dashboard and create a new key. Keep it secure!

3

Step 3: Install the SDK (Optional)

For TypeScript/JavaScript projects, install our official NPM package:

Code Examples

🇬🇪 Official TypeScript SDK

@smart-pay-chain/otp - First Georgian-made NPM package for OTP

Installation

npm install @smart-pay-chain/otp

Quick Start

import { OtpClient, OtpChannel } from '@smart-pay-chain/otp';

// Initialize client
const client = new OtpClient({
  apiKey: process.env.OTP_API_KEY,
  autoConfig: true, // Auto-fetch server configuration
});

// Send OTP
const result = await client.sendOtp({
  phoneNumber: '+995568000865',
  channel: OtpChannel.SMS,
  ttl: 300, // 5 minutes
  length: 6, // 6-digit code
});

console.log('OTP sent!', result.requestId);

// Verify OTP
const verification = await client.verifyOtp({
  requestId: result.requestId,
  code: '123456', // User-entered code
  ipAddress: req.ip, // Optional but recommended
});

if (verification.success) {
  console.log('Phone verified! ✓');
  // Proceed with authentication
}

Key Features

  • Full TypeScript support with type definitions
  • Built-in retry logic and error handling
  • Test mode for development (no SMS charges)
  • Automatic idempotency keys
  • React Native & mobile app support
Error Handling
import {
  InvalidOtpError,
  OtpExpiredError,
  RateLimitError,
} from '@smart-pay-chain/otp';

try {
  const result = await client.verifyOtp({ requestId, code });
} catch (error) {
  if (error instanceof InvalidOtpError) {
    console.log('Wrong code. Please try again.');
  } else if (error instanceof OtpExpiredError) {
    console.log('OTP expired. Request a new one.');
  } else if (error instanceof RateLimitError) {
    console.log('Too many attempts. Please wait.');
  }
}
Test Mode
import { TEST_PHONE_NUMBERS, TEST_OTP_CODE } from '@smart-pay-chain/otp';

// Check if test mode is enabled
const testMode = await client.isTestMode();

// Use test phone numbers (no SMS charges)
const result = await client.sendOtp({
  phoneNumber: TEST_PHONE_NUMBERS.SUCCESS, // +995568000865
});

// In test mode, OTP is always: 123456
const verification = await client.verifyOtp({
  requestId: result.requestId,
  code: TEST_OTP_CODE, // '123456'
});

API Reference

Base URL
https://api.verify.ge/api/v1
Authentication

All API requests require authentication using an API key. Include your API key in the X-API-Key header:

X-API-Key: your_api_key_here
Endpoints
POST/otp/sendSend an OTP to a phone numberPrimary
POST/otp/verifyVerify an OTP codePrimary
GET/otp/{requestId}Get OTP request status
GET/keysList all API keys
POST/keysCreate a new API key
DELETE/keys/{keyId}Revoke an API key
GET/tierGet current tier information
GET/billing/balanceGet account balance

Ready to start integrating?