POST JSON to verify a license with product code and domain binding:
POST /verify
Content-Type: application/json
X-Api-Secret: your-api-secret (optional)
User-Agent: YourApp/1.0 (optional)
{
"license_key": "XXXX-XXXX-XXXX-XXXX",
"product_code": "SEW-001",
"domain": "example.com",
"mode": "verify" // optional: "verify" (default) or "activate"
}
Request Headers:
The server also checks the encrypted payload and the license file at https://<domain>/license/license.
License file format (choose one):
XXXX-XXXX-XXXX-XXXX
{"license": "XXXX-XXXX-XXXX-XXXX"}
{"license_key": "XXXX-XXXX-XXXX-XXXX"}
{
"ok": true,
"license": {
"id": 1,
"license_key": "XXXX-XXXX-XXXX-XXXX",
"product": "SEW-001",
"domain": "example.com",
"max_activations": 5,
"activations": 2,
"expires_at": "2025-12-31 23:59:59",
"status": "active",
"created_at": "2024-01-15 10:30:00",
"updated_at": "2024-01-20 14:22:00"
}
}
{
"ok": false,
"reason": "not_found",
"message": "License not found in database",
"error_code": "V008"
}
Common Error Reasons:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://yourdomain.com/verify');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'license_key' => 'XXXX-XXXX-XXXX-XXXX',
'product_code' => 'SEW-001',
'domain' => 'example.com',
'mode' => 'verify' // optional: 'verify' (default) or 'activate'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'X-Api-Secret: your-api-secret', // optional
'User-Agent: YourApp/1.0'
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$result = json_decode($response, true);