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.
Selecting the License Key entitlement in the product entitlements panel.
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.
Fulfillment mode
Every License Key entitlement has afulfillment_mode that controls who supplies the key:
auto(default): Dodo Payments generates and emails the key automatically on payment or subscription. This is the behavior described above and applies whenfulfillment_modeis omitted.manual: The purchase creates aPendinggrant with no key, and you supply each key value yourself. See Manual Fulfillment below.
Manual Fulfillment
By default, Dodo Payments generates and emails a license key the moment a customer pays. With manual fulfillment you supply the key yourself: the purchase creates aPending grant with no key, notifies you, and waits for you to submit the key value. Use it when keys come from your own system, a third-party vendor, or a finite pool of pre-printed codes.
Looking for a step-by-step build? See the Manual License Key Fulfillment Integration Guide for an end-to-end walkthrough from product creation to delivering the key.
When to use it
Auto fulfillment is the right default for most software licensing. Choose manual fulfillment when Dodo Payments cannot mint the key itself:- Bring-your-own-keys: The key is generated by your application, a desktop product, or your own license server.
- Third-party vendors: You resell keys issued by an upstream provider (a game key, an API credential, a partner platform).
- Finite inventory: You hand out codes from a pre-allocated pool and want to assign them one at a time.
- Human review: You want to vet a purchase before releasing access.
Enable manual fulfillment
Setfulfillment_mode: "manual" on the License Key entitlement’s integration config:
fulfillment_mode is backward compatible. Entitlements created before this setting existed have no fulfillment_mode and continue to behave as auto. Switching to manual only affects grants created after the change; keys already delivered are untouched.Find grants awaiting fulfillment
When a customer buys a manual-mode product, the grant is created inPending status with no key and an entitlement_grant.created webhook fires with integration_type: "license_key" and status: "Pending". You can react to that webhook, or poll the List Customer Grants endpoint with the integration_type and status filters:
Deliver the key
Submit the key with the Fulfill License Key Grant endpoint. The grant moves toDelivered and the customer is sent the key automatically — the same email they would receive under auto fulfillment.
cURL
activations_limit and expires_at are optional and fall back to the entitlement config when omitted. Each grant can be fulfilled once; retrying an already-fulfilled grant returns 409 rather than issuing a second key.
You do not need to email the key yourself — delivery happens automatically when the grant is fulfilled. This differs from importing keys via
POST /license_keys, which intentionally does not notify the customer.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
Open the License Key entitlement from your dashboard to see every grant (one row per customer key) with delivery date, activation count, and a revoke action. Each grant detail surfaces the underlying license key, expiry, activations used, and the activations limit. You can also list grants programmatically: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 keys differ by source
license-key 레코드의
source 필드를 사용하면 조정 또는 감사 시 마이그레이션된 inventory와 수동으로 fulfilled된 키를 자동으로 발급된 키와 구분할 수 있습니다. List Grants에서 반환되는 grant의 license_key 객체에서 해당 값을 읽을 수 있습니다. 레거시 GET /license_keys endpoint는 deprecated되었습니다.
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
새 license key를 생성하거나 기존 키를 import합니다.
List License Keys
상태 및 사용량 세부 정보와 함께 모든 키를 확인합니다.
Get License Key
특정 키와 해당 메타데이터를 조회합니다.
Update License Key
만료, activation limit 또는 키 활성화/비활성화를 수정합니다.
Entitlement Management
Entitlement Management
License Key entitlement 자체를 관리합니다. activation limit, duration 및 instructions를 설정할 수 있습니다.
Create Entitlement
License Key entitlement를 생성합니다.
Update Entitlement
entitlement의 구성을 업데이트합니다.
List Grants
entitlement에 발급된 키를 나열합니다.
Revoke Grant
고객의 키를 수동으로 revoke합니다.
Webhooks
License-key delivery 및 revocation은 네 가지entitlement_grant.* webhook events를 발생시킵니다. grant payload에는 키, 만료, 사용된 activations 및 limit이 입력된 license_key 객체가 포함됩니다.
레거시 license_key.* events(license_key.created)는 기본 license-key 레코드 lifecycle에 대해 계속 발생합니다. 자세한 내용은 License Key webhook payload page를 참조하세요.
Legacy License Keys
이전
license_key_enabled flag를 사용하여 생성된 product는 License Key entitlement로 자동 마이그레이션되었습니다. 마이그레이션은 투명하게 진행됩니다. 기존 고객의 키는 변경 없이 계속 작동하고, public /licenses/activate, /licenses/validate, /licenses/deactivate endpoint는 계속 작동하며, /license_keys/* API endpoint는 동일한 key store에서 계속 읽고 씁니다.독립적인 License Keys dashboard section은 발급된 모든 키의 flat list로 계속 제공되며 감사 및 검색에 유용합니다. 새로운 구성(activation limit, duration 또는 instructions 변경)은 Entitlements에서 마이그레이션된 License Key entitlement를 편집하여 수행해야 합니다.Best Practices
- activation limit을 명확하게 유지하세요: 합리적인 기본값(단일 사용자 앱은 1, 팀 라이선스는 3–5)을 선택하고 문서화하세요.
- 정확한 activation instructions를 제공하세요: 고객은 이메일에서 이를 복사하므로 정확한 경로와 명령어를 제공하면 support ticket을 줄일 수 있습니다.
- server-side에서 키를 검증하세요: 네트워크에 연결된 product의 경우 activation을 로컬에 caching하는 대신
/licenses/validate를 통해 검증하세요. - revocation에는 webhooks를 사용하세요: 고객이 취소하거나 환불할 때 앱 내 기능을 즉시 비활성화하려면
entitlement_grant.revoked를 수신 대기하세요. - subscription 및 일회성 결제로 테스트하세요: 두 경우의 license key 동작에는 미묘한 차이가 있으므로 live 전 두 경우 모두 테스트하세요.