License keys are the License Key entitlement type. Create a License Key entitlement once with the activation limit, expiry, and instructions you want, attach it to any product, and Dodo Payments generates and delivers a key per purchase or subscription seat, automatically.
What are License Keys?
License keys are unique tokens that authorize access to your product. They’re ideal for:- Software licensing: Desktop apps, plugins, and CLIs
- Per-seat controls: Limit activations per user or device
- Digital goods: Gate downloads, updates, or premium features
Create a License Key Entitlement
1
Open Entitlements
Go to Entitlements in your Dodo Payments dashboard and click + to create a new entitlement.
2
Choose License Key
Select License Key as the integration. Configure how each issued key behaves:
- Activations Limit: Maximum concurrent activations per key (e.g.,
1for single-user,5for team licenses, leave blank for unlimited). - Duration: How long the key stays valid after issuance (e.g., 30 days, 1 year). For subscription-issued keys, leave blank; keys remain valid as long as the subscription is active.
- Activation Instructions: Customer-facing instructions emailed with the key. Examples:
Paste the key in Settings → LicenseorRun: mycli activate <key>.

3
Save the entitlement
Save. The entitlement is now available to attach to any product.
Attach to Products
Open a product, expand Advanced Settings → Entitlements & Credits, and select your License Key entitlement. A single product can deliver a license key alongside other entitlements (Discord access, file downloads, GitHub repo access, etc.) on the same purchase.
How Keys Are Issued
Key issuance follows the standard grant lifecycle:Quantity behavior
- Subscription products issue one key per seat (
subscriptions.quantity). - One-time products issue one key per cart line item (
product_cart.quantity). - Manual API grants issue exactly one key.
Activation, Validation, Deactivation
The activation/validation/deactivation API endpoints are public and require no API key. Use them directly from desktop software, CLIs, or browser-based clients to verify keys at runtime.Public Endpoints: The activate, deactivate, and validate license endpoints are public and do not require an API key. Call them directly from your client applications without exposing your API credentials.
Activate a license
Validate a license
Deactivate an activation instance
Manage Keys
जब कोई ग्राहक मैनुअल-मोड उत्पाद खरीदता है, तो अनुदानpending स्थिति में बिना किसी कुंजी के बनता है और एक entitlement_grant.created webhook फायर करता है integration_type: "license_key" और status: "pending" के साथ। आप उस webhook पर प्रतिक्रिया कर सकते हैं, या integration_type और status फ़िल्टर के साथ List Customer Grants endpoint को पोल कर सकते हैं:
Import Existing License Keys via API
Already have license keys in another system? Use the Create License Key API to import them into Dodo Payments. This lets you migrate existing keys without disrupting your customers — they continue to activate, validate, and deactivate against the same key strings without re-issuance.How imported keys differ from auto-generated keys
Use the
source field on GET /license_keys responses to distinguish migrated inventory from organically issued keys when reconciling or auditing.
License Keys in Return URL
When a customer completes a purchase for a product with a License Key entitlement, the generated key is automatically appended to yourreturn_url as a query parameter. This lets you display the key immediately on your success page without making an extra API call.
subscription_id is used instead of payment_id:
API Management
Lifecycle Operations (Public Endpoints)
Lifecycle Operations (Public Endpoints)
Activation, deactivation, and validation are public; no API key required.
Activate License
Create or record an activation instance for a license key.
Deactivate License
Revoke a prior activation to free up capacity.
Validate License
Check authenticity, status, and constraints before granting access.
License Key Management
License Key Management
Create, list, retrieve, and update individual license key records. Use these to import existing keys or fetch usage details.
Create License Key
Create a new license key or import an existing one.
Get License Key
Retrieve a specific key and its metadata.
Update License Key
Modify expiry, activation limits, or enable/disable a key.
Entitlement Management
Entitlement Management
Manage the License Key entitlement itself: its activation limit, duration, and instructions.
Create Entitlement
Create a License Key entitlement.
Update Entitlement
Update the entitlement’s configuration.
List Grants
List the keys issued for an entitlement.
Revoke Grant
Manually revoke a customer’s key.
Webhooks
License-key delivery and revocation fire the fourentitlement_grant.* webhook events. The grant payload includes a populated license_key object with the key, expiry, activations used, and limit.
The legacy license_key.* events (license_key.created) continue to fire for the underlying license-key record lifecycle; see the License Key webhook payload page.
Legacy License Keys
Products created with the older
license_key_enabled flag have been automatically migrated to a License Key entitlement. The migration is transparent: existing customers’ keys continue to work unchanged, the public /licenses/activate, /licenses/validate, /licenses/deactivate endpoints continue to function, and the /license_keys/* API endpoints continue to read and write to the same key store.The standalone License Keys dashboard section remains available as a flat list of every key issued, useful for audit and search. New configuration (changing activation limits, durations, or instructions) should be done by editing the migrated License Key entitlement under Entitlements.Best Practices
- Keep activation limits clear: Choose sensible defaults (1 for single-user apps, 3–5 for team licenses) and document them.
- Provide precise activation instructions: Customers paste these from their email, so exact paths and commands save support tickets.
- Validate keys server-side: For network-connected products, validate via
/licenses/validaterather than caching activation locally. - Use webhooks for revocation: Listen to
entitlement_grant.revokedto disable in-app features immediately when a customer cancels or refunds. - Test with subscriptions and one-times: License key behavior differs subtly between the two, so test both before going live.
API प्रबंधन
Lifecycle Operations (Public Endpoints)
Lifecycle Operations (Public Endpoints)
सक्रियकरण, निष्क्रियता, और प्रमाणीकरण सार्वजनिक हैं; API कुंजी की आवश्यकता नहीं है।
Activate License
लाइसेंस कुंजी के लिए एक सक्रियण उदाहरण बनाएं या रिकॉर्ड करें।
Deactivate License
क्षमता खाली करने के लिए पिछला सक्रियण रद्द करें।
Validate License
पहुँच देने से पहले प्रामाणिकता, स्थिति, और प्रतिबंध जाँचें।
License Key Management
License Key Management
व्यक्तिगत लाइसेंस कुंजी रिकॉर्ड बनाएं, सूचीबद्ध करें, पुनः प्राप्त करें, और अपडेट करें। मौजूदा कुंजियों को आयात करने या उपयोग विवरण प्राप्त करने के लिए इनका उपयोग करें।
Create License Key
एक नई लाइसेंस कुंजी बनाएं या मौजूदा को आयात करें।
List License Keys
स्थिति और उपयोग विवरण के साथ सभी कुंजियों को ब्राउज़ करें।
Get License Key
किसी विशेष कुंजी और उसके मेटाडेटा को पुनः प्राप्त करें।
Update License Key
समाप्ति, सक्रियता सीमाएं संशोधित करें, या कुंजी को सक्षम/निष्क्रिय करें।
Entitlement Management
Entitlement Management
लाइसेंस कुंजी अधिकार स्वयं प्रबंधित करें: इसकी सक्रियता सीमा, अवधि, और निर्देश।
Create Entitlement
लाइसेंस कुंजी अधिकार बनाएं।
Update Entitlement
अधिकार के कॉन्फ़िगरेशन को अपडेट करें।
List Grants
अधिकार के लिए जारी कुंजियों की सूची बनाएं।
Revoke Grant
ग्राहक की कुंजी को मैन्युअल रूप से रद्द करें।
Webhooks
लाइसेंस-कुंजी वितरण और रद्दीकरण चारentitlement_grant.* webhook इवेंट्स को ट्रिगर करते हैं। अनुदान पेलोड में कुंजी, समाप्ति, उपयोग की गई सक्रियता, और सीमा के साथ एक भरा हुआ license_key ऑब्जेक्ट शामिल होता है।
विरासत license_key.* इवेंट्स (license_key.created) अंतर्निहित लाइसेंस-कुंजी रिकॉर्ड जीवनचक्र के लिए फायर होते रहते हैं; देखें लाइसेंस कुंजी webhook पेलोड पेज।
पुरानी लाइसेंस कुंजियाँ
पुराने
license_key_enabled ध्वज के साथ बनाए गए उत्पाद स्वतः माइग्रेट हो गए हैं लाइसेंस कुंजी अधिकार में। माइग्रेशन पारदर्शी है: मौजूदा ग्राहकों की कुंजियाँ बिना बदले काम करती रहती हैं, सार्वजनिक /licenses/activate, /licenses/validate, /licenses/deactivate एंडपॉइंट्स चालू रहते हैं, और /license_keys/* API एंडपॉइंट्स उसी कुंजी स्टोर को पढ़ते और लिखते रहते हैं।स्वतंत्र लाइसेंस कुंजियाँ डैशबोर्ड अनुभाग हर जारी की गई कुंजी की एक समतल सूची के रूप में उपलब्ध रहता है, जो ऑडिट और खोज के लिए उपयोगी है। नई कॉन्फ़िगरेशन (सक्रियता सीमाएं, अवधि, या निर्देश बदलना) अधिकारों के तहत माइग्रेटेड लाइसेंस कुंजी अधिकार को संपादित करके किया जाना चाहिए।सर्वोत्तम प्रथाएँ
- सक्रियता सीमाएं स्पष्ट रखें: उचित डिफ़ॉल्ट चुनें (एकल-उपयोगकर्ता ऐप्स के लिए 1, टीम लाइसेंस के लिए 3-5) और उन्हें दस्तावेज करें।
- सटीक सक्रियता निर्देश प्रदान करें: ग्राहक इन्हें अपने ईमेल से कॉपी करते हैं, इसलिए सटीक पथ और कमांड समर्थन टिकट बचाते हैं।
- कुंजियों को सर्वर-साइड सत्यापित करें: नेटवर्क से जुड़े उत्पादों के लिए, इसे लोकल सक्रियता कैश करने के बजाय
/licenses/validateके माध्यम से सत्यापित करें। - रद्दीकरण के लिए webhooks का उपयोग करें:
entitlement_grant.revokedको सुनें जब ग्राहक रद्द करते हैं या धनवापसी करते हैं तो ऐप फीचर्स को तुरंत अक्षम करने के लिए। - सदस्यताओं और एकबारगी के साथ परीक्षण करें: लाइसेंस कुंजी का व्यवहार दोनों के बीच मामूली रूप से भिन्न होता है, इसलिए लाइव जाने से पहले दोनों का परीक्षण करें।