Guides
Migration
Migrate your existing licenses from other platforms to Licentric with zero downtime.
1. Supported Platforms
Licentric supports importing licenses from these platforms via CSV export.
| Platform | Format | Fields Imported |
|---|---|---|
| Keygen | CSV export from Keygen dashboard | License key, policy, user email, status, created date, expiry |
| Cryptlex | CSV export from Cryptlex dashboard | License key, product, user email, status, activation count |
| LemonSqueezy | CSV export from LemonSqueezy dashboard | License key, product, customer email, status, variant |
2. Export from Source Platform
Export your licenses as a CSV file from the source platform's dashboard. Include all fields you want to preserve: keys, customer emails, statuses, and expiration dates.
3. Field Mapping
Licentric auto-maps common field names during import. You can review and adjust the mapping before confirming.
# Example field mapping (Keygen → Licentric)
#
# Source (Keygen) → Target (Licentric)
# ───────────────────── ──────────────────
# license.key → license.key (preserved)
# license.policy.name → policy.name
# license.user.email → customer.email
# license.status → license.status
# license.expiry → license.expiresAt
# license.maxMachines → policy.maxMachines
# license.metadata → license.metadata4. Import via Dashboard
Upload your CSV through the dashboard import wizard. Create matching products and policies first so licenses can be assigned correctly.
# Step 1: Export from source platform
# Download your licenses as CSV from the source dashboard
# Step 2: Prepare your Licentric account
# Create matching products and policies in Licentric first
# Step 3: Import via dashboard
# Dashboard → Settings → Import Data → Upload CSV
# Licentric auto-maps common fields and lets you adjust
# Step 4: Verify imported data
from licentric import Licentric
client = Licentric(api_key="lk_live_your_key_here")
# List imported licenses
licenses = client.licenses.list(limit=50)
for lic in licenses:
print(f"{lic.key} — {lic.status} — {lic.email}")5. Zero-Downtime Migration
For production systems, use a dual-write strategy: validate against both platforms during the migration period, then cut over to Licentric once all licenses are verified.
# Zero-downtime migration strategy
#
# Phase 1: Dual-write (1-2 weeks)
# ─────────────────────────────────
# Keep the old platform active while Licentric mirrors it.
# Your app validates against BOTH platforms.
def validate_during_migration(license_key: str) -> bool:
"""Validate against both platforms during migration."""
# Try Licentric first (new)
try:
result = licentric_client.validate(
key=license_key,
fingerprint=licentric_client.fingerprint()
)
if result.valid:
return True
except Exception:
pass
# Fall back to old platform
return old_platform_validate(license_key)
# Phase 2: Cutover
# ─────────────────
# Once all licenses are migrated and verified:
# 1. Update your app to validate only against Licentric
# 2. Disable the old platform
# 3. Monitor for any missed licenses6. Verify the Migration
After importing, verify that all licenses were migrated correctly by validating each one programmatically.
# Post-migration verification checklist
from licentric import Licentric
client = Licentric(api_key="lk_live_your_key_here")
def verify_migration():
"""Verify all licenses were migrated correctly."""
licenses = client.licenses.list(limit=100)
errors = []
for lic in licenses:
# Validate each migrated license
result = client.validate(key=lic.key)
if lic.status == "active" and not result.valid:
errors.append(f"{lic.key}: expected active, got {result.code}")
if errors:
print(f"Migration issues found: {len(errors)}")
for error in errors:
print(f" - {error}")
else:
print("All licenses verified successfully!")