Developer Guide

Integrate your web application with the GTS License API for subscription-based licensing.

Overview

Connect your application (PHP, WordPress, Laravel, or any language) to verify licenses in real-time. The API validates license keys, domain binding, and subscription status.

API Endpoints

Method Endpoint Description
GET/api/statusAPI health check
GET/api/applicationsList applications (get app slugs)
GET/api/applications/{slug}Get app integration info
POST/api/verify-licenseVerify license key

Verify License Request

POST https://gtsappstore.com/api/verify-license

{
  "license_key": "GTS-XXXXX-XXXXX-XXXXX-XXXXX",
  "domain": "yourdomain.com",
  "app_id": "gts-pos",
  "secret_token": "optional"
}

Response (Active)

{
  "data": {
    "status": "active",
    "message": "License is valid",
    "expires_at": "2026-03-28T00:00:00.000000Z",
    "in_grace_period": false
  },
  "signature": "hmac-sha256",
  "valid": true
}

PHP SDK

Copy sdk/GtsLicenseClient.php into your project:

$client = new GtsLicenseClient(
    'https://gtsappstore.com',
    'GTS-XXXXX-XXXXX-XXXXX-XXXXX',
    'gts-pos'
);
$result = $client->verify();
if ($result['valid']) {
    // License active
} else {
    // Show: $result['message']
}

Status Values

  • active — License valid, grant access
  • expired — Subscription ended, show renewal
  • suspended — Admin suspended, show support message
  • invalid_domain — Domain not authorized

Full Documentation

For the complete integration guide including WordPress, Node.js, Python examples, and best practices, see docs/DEVELOPER_GUIDE.md in the repository. Contact us for integration support.