License Object
A license contains comprehensive information about its status, activation history, and validity:Key Fields
license.key: The unique license key string (e.g.,ABC-123-XYZ-789)license.masked_key: Masked version for display (e.g.,ABC-***-***-789)status: Current license status (see table below)is_active: Boolean indicating if the license is currently active and usableis_expired: Boolean indicating if the license has expiredcan_activate: Boolean indicating if the license can be activated (has remaining slots)activations.count: Current number of device activationsactivations.max: Maximum allowed activationsactivations.remaining: Number of activation slots remainingcertificate_url: URL to download the license certificate (if available)activated_at: When the license was first activated (null if never activated)expires_at: When the license will expire (null for lifetime licenses)revoked_at: When the license was revoked (null if not revoked)
License Statuses
Listing Licenses
Retrieve all issued licenses for your store:Query Parameters
Filtering Examples
Getting a License by Key
Retrieve a specific license using its license key:Validating a License
To validate a license in your application, retrieve it and check the status:Activating a License
Activate a license on a device. The system automatically captures IP address and user agent:First Activation Behaviour
On the first activation:- Status changes from
pending_activationtoactive activated_attimestamp is setexpires_atis calculated based on product validity periodactivation_countincrements to 1
Subsequent Activations
On additional activations:activation_countis incremented- A new activation record is created
- License status remains
active
Activation Limits
Each license has a maximum number of activations (max_activations). When the limit is reached, further activations will fail:
can_activate and activations.remaining before attempting activation.
Revoking a License
Revoke a license to prevent further use:Getting Activation History
View all activations for a specific license with detailed device tracking:Response
What’s Tracked
Each activation record contains:- IP Address: Automatically captured from the activation request, with geolocation
- User Agent: Parsed browser and platform information
- Device Identifier: Optional identifier you provide (MAC address, UUID, etc.)
- Timestamp: When the activation occurred
- Metadata: Optional custom data
- Auditing license usage
- Detecting suspicious activity
- Providing customers with device management
- Debugging activation issues
Implementation Example
Here’s a complete example of license validation in a desktop application:API Endpoints Summary
Best Practices
Security
- Never expose your API key in client-side code
- Use API keys server-side only
- Validate licenses server-side before granting access
- Store license keys securely on the customer’s device
Device Identification
- Use unique, persistent device identifiers (MAC address, hardware UUID)
- Don’t use user-changeable identifiers (computer name, username)
- Consider platform-specific identifiers (Windows: machine GUID, macOS: hardware UUID)
Activation Management
- Check
can_activatebefore attempting activation - Display
activations_remainingto users - Implement device management UI for customers
- Handle activation errors gracefully
Validation Frequency
- Validate on application startup
- Re-validate periodically (e.g., every 24 hours)
- Cache validation results locally
- Implement offline grace period
Error Handling
- Handle network errors gracefully
- Provide clear error messages to users
- Implement retry logic with exponential backoff
- Log activation attempts for debugging
Related Resources
Products Guide
Create license-type products
Licenses API
View the complete Licenses API reference
Get License
Retrieve license details
Activate License
Activate on a device