Skip to main content
POST
https://api.chariow.com/v1
/
licenses
/
{licenseKey}
/
revoke
curl -X POST "https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/revoke" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Customer requested refund"
  }'
{
  "message": "License revoked successfully",
  "data": {
    "id": "lic_abc123",
    "sale_id": 156,
    "customer_id": 89,
    "license_key": "ABC-123-XYZ-789",
    "status": "revoked",
    "activated_at": "2025-01-15T10:30:00.000000Z",
    "expires_at": "2026-01-15T10:30:00.000000Z",
    "expired_at": null,
    "revoked_at": "2025-01-20T14:22:00.000000Z",
    "activation_count": 3,
    "max_activations": 10,
    "activations_remaining": 7,
    "is_active": false,
    "is_expired": false,
    "can_activate": false,
    "metadata": null,
    "created_at": "2025-01-15T09:00:00.000000Z",
    "updated_at": "2025-01-20T14:22:00.000000Z",
    "product": {
      "id": 42,
      "name": "Premium Software License"
    }
  },
  "errors": []
}
Permanently revokes a license by changing its status to revoked and recording the revocation timestamp. Once revoked, the license cannot be activated on any device, and this action cannot be undone. The license will remain visible in reports and history for audit purposes. This endpoint is useful for handling customer refunds, policy violations, or when a license needs to be immediately terminated for any reason. An optional reason parameter allows you to document why the license was revoked.
Revoking a license is permanent and irreversible. The license cannot be reactivated after revocation.

Path Parameters

licenseKey
string
required
The license key to revoke (e.g., ABC-123-XYZ-789)

Request Body

reason
string
Optional reason for revocation. Max 500 characters. Useful for audit trails and customer support.

Response

data
object

Error Responses

400 Bad Request
object
Returned when the license has already been revoked
404 Not Found
object
Returned when the license key doesn’t exist or doesn’t belong to your store
422 Unprocessable Entity
object
Returned when validation fails (e.g., reason exceeds 500 characters)
curl -X POST "https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/revoke" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Customer requested refund"
  }'
{
  "message": "License revoked successfully",
  "data": {
    "id": "lic_abc123",
    "sale_id": 156,
    "customer_id": 89,
    "license_key": "ABC-123-XYZ-789",
    "status": "revoked",
    "activated_at": "2025-01-15T10:30:00.000000Z",
    "expires_at": "2026-01-15T10:30:00.000000Z",
    "expired_at": null,
    "revoked_at": "2025-01-20T14:22:00.000000Z",
    "activation_count": 3,
    "max_activations": 10,
    "activations_remaining": 7,
    "is_active": false,
    "is_expired": false,
    "can_activate": false,
    "metadata": null,
    "created_at": "2025-01-15T09:00:00.000000Z",
    "updated_at": "2025-01-20T14:22:00.000000Z",
    "product": {
      "id": 42,
      "name": "Premium Software License"
    }
  },
  "errors": []
}

Common Use Cases

Refund Processing

When processing a refund, revoke the license to prevent further use:
async function processRefund(licenseKey) {
  await fetch(`https://api.chariow.com/v1/licenses/${licenseKey}/revoke`, {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      reason: 'Full refund processed via payment gateway'
    })
  });
}

Terms of Service Violation

Revoke licenses that violate your terms:
async function revokeViolation(licenseKey, violationType) {
  await fetch(`https://api.chariow.com/v1/licenses/${licenseKey}/revoke`, {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      reason: `Terms of service violation: ${violationType}`
    })
  });
}

Fraudulent Purchase

Immediately revoke licenses from suspected fraudulent purchases:
async function revokeFraudulent(licenseKey) {
  await fetch(`https://api.chariow.com/v1/licenses/${licenseKey}/revoke`, {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      reason: 'Suspected fraudulent purchase - payment flagged by gateway'
    })
  });
}

What Happens After Revocation

Once a license is revoked:
  1. Status Change: The license status becomes revoked
  2. Timestamp: The revoked_at field is set to the current timestamp
  3. No Future Activations: The license cannot be activated on any device
  4. Existing Activations: Any existing activations remain in the system for audit purposes
  5. Permanent: The revocation cannot be undone - you must issue a new license if needed
  6. Visible in Reports: The license remains visible in your dashboard and API responses for historical tracking

Alternative: Deactivating Individual Devices

If you want to free up an activation slot without permanently revoking the entire license, you should instead remove specific activations. This can be done through your store dashboard, allowing the license to be activated on a different device.
There is currently no Public API endpoint for deactivating individual device activations. This must be done through the store dashboard or Core API.