Skip to main content

Guides

Migration

Migrate your existing licenses from other platforms to Licentric with zero downtime.

Back up your data
Always export and back up your data from the source platform before starting a migration. Licentric imports are additive and do not modify your source system, but having a backup ensures you can recover from any issues.

1. Supported Platforms

Licentric supports importing licenses from these platforms via CSV export.

PlatformFormatFields Imported
KeygenCSV export from Keygen dashboardLicense key, policy, user email, status, created date, expiry
CryptlexCSV export from Cryptlex dashboardLicense key, product, user email, status, activation count
LemonSqueezyCSV export from LemonSqueezy dashboardLicense 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.

Field mapping reference
# 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.metadata

4. Import via Dashboard

Upload your CSV through the dashboard import wizard. Create matching products and policies first so licenses can be assigned correctly.

import_steps.py
# 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.

dual_write.py
# 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 licenses

6. Verify the Migration

After importing, verify that all licenses were migrated correctly by validating each one programmatically.

verify.py
# 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!")
Preserve existing keys
Licentric preserves your existing license keys during import. Your customers do not need to update their keys — they continue working seamlessly after migration.