Dexiway API Documentation

Integrate license verification into your products

Overview

The Dexiway API allows you to verify licenses programmatically. This is useful for:

  • Validating customer purchases in your products
  • Checking support status
  • Verifying update eligibility
Base URL: https://www.dexiway.com/api/v1

Authentication

Public endpoints (license verification) do not require authentication. For user-specific endpoints, include your API key in the header:

HTTP Header
X-API-Key: your_api_key_here

Rate Limits

API requests are limited to prevent abuse:

Public endpoints 100 requests per hour per IP
Authenticated endpoints 1,000 requests per hour

Rate limit headers are included in responses:

  • X-RateLimit-Limit - Maximum requests allowed
  • X-RateLimit-Remaining - Remaining requests
  • X-RateLimit-Reset - Unix timestamp when limit resets

Verify License

Verify a license code is valid.

POST /api/v1/license/verify

Request Body

JSON
{
  "license_code": "XXXX-XXXX-XXXX-XXXX",
  "item_id": 123,        // optional - verify for specific item
  "domain": "example.com" // optional - for logging
}

Response (Success)

JSON - 200 OK
{
  "success": true,
  "data": {
    "valid": true,
    "license": {
      "license_code": "XXXX-XXXX-XXXX-XXXX",
      "purchase_code": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "type": "regular",
      "item": {
        "id": 123,
        "name": "Product Name",
        "version": "1.0.0"
      },
      "buyer": "username",
      "purchased_at": "2025-01-01 10:00:00",
      "support_until": "2025-07-01 10:00:00",
      "support_active": true
    }
  }
}

Response (Invalid)

JSON - 400 Bad Request
{
  "success": false,
  "error": {
    "code": "license_not_found",
    "message": "License not found"
  }
}

Verify Purchase Code

Alternative verification using purchase code instead of license code.

POST /api/v1/purchase/verify

Request Body

JSON
{
  "purchase_code": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "item_id": 123  // optional
}

Check for Updates

Check if a newer version is available for an item.

GET /api/v1/item/{item_id}/version

Query Parameters

version Current version to compare against (optional)

Response

JSON - 200 OK
{
  "success": true,
  "data": {
    "item_id": 123,
    "name": "Product Name",
    "current_version": "2.0.0",
    "last_updated": "2025-01-15 14:30:00",
    "update_available": true
  }
}

Error Handling

All errors return a consistent JSON structure:

Error Response
{
  "success": false,
  "error": {
    "code": "error_code",
    "message": "Human readable message"
  }
}

Error Codes

Code HTTP Status Description
license_not_found 400 License code does not exist
license_revoked 400 License has been revoked
license_suspended 400 License is temporarily suspended
item_mismatch 400 License not valid for specified item
unauthorized 401 Invalid or missing API key
rate_limit_exceeded 429 Too many requests

Code Examples

PHP

PHP
<?php
function verify_license($license_code, $item_id = null) {
    $url = 'https://www.dexiway.com/api/v1/license/verify';
    
    $data = ['license_code' => $license_code];
    if ($item_id) $data['item_id'] = $item_id;
    
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
    curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    
    $response = curl_exec($ch);
    curl_close($ch);
    
    return json_decode($response, true);
}

// Usage
$result = verify_license('XXXX-XXXX-XXXX-XXXX');
if ($result['success'] && $result['data']['valid']) {
    echo "License is valid!";
}
?>

JavaScript

JavaScript
async function verifyLicense(licenseCode, itemId = null) {
    const response = await fetch('https://www.dexiway.com/api/v1/license/verify', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
            license_code: licenseCode,
            item_id: itemId
        })
    });
    
    return await response.json();
}

// Usage
const result = await verifyLicense('XXXX-XXXX-XXXX-XXXX');
if (result.success && result.data.valid) {
    console.log('License is valid!');
}