Automatically deliver license keys, downloadable files, feature flags, and access to platforms like Discord, GitHub, Telegram, Framer, and Notion when customers pay.
Entitlements turn a successful payment or active subscription into real access: a license key in your customer’s inbox, a feature flag your app checks, a Discord role, a GitHub repository, a Notion template, a Framer remix link, a Telegram chat invite, or a downloadable file bundle. Dodo Payments issues, tracks, and revokes that access automatically as the payment lifecycle changes.
The Entitlements dashboard. Each entitlement is a reusable template; the right pane shows individual customer grants.
An entitlement is a reusable definition of something you deliver to a customer: a Pro license key, a “Patrons” Discord role, access to your private GitHub repository, a downloadable e-book bundle. You attach entitlements to products, and Dodo Payments handles the rest.When a customer purchases the product, Dodo Payments creates a grant, a single customer’s issuance of that entitlement. Grants move through a small set of statuses: Pending while delivery is in progress, Delivered once the customer has access, Failed if delivery could not complete, and Revoked when access is withdrawn.
Entitlements gate fulfillment (does the customer have access?). Credits gate consumption (how much of it can they use?). Both can be attached to the same product. See Credit-Based Billing for credits.
Grants are driven by the same payment and subscription events you already receive as webhooks. You don’t need to call the grant API yourself for purchases. Dodo Payments creates and revokes grants automatically based on the underlying payment lifecycle.
जब कोई payment पूरा होता है या कोई subscription active हो जाता है, तब grant बनाया जाता है। Feature flags सीधे Delivered पर पहुँच जाते हैं। License keys भी सीधे fulfillment_mode: auto (default) का उपयोग करने पर Delivered पर पहुँच जाती हैं; fulfillment_mode: manual के अंतर्गत grant, Pending में बिना किसी key के बनाया जाता है, जब तक कि आप Fulfill License Key Grant के माध्यम से कोई key प्रदान नहीं करते। हर अन्य integration Pending में शुरू होता है। OAuth-based integrations (Discord, GitHub, Notion) एक oauth_url उपलब्ध कराते हैं, जिस पर customer को consent पूरा करने के लिए जाना होता है; नए बनाए गए grant पर यह field null होता है और customer के delivery email या customer portal से accept flow शुरू करने के बाद इसमें मान भर जाता है। Platform-direct integrations (Telegram, Framer, Digital Files) delivery provision होने के दौरान थोड़े समय के लिए केवल Pending में रहते हैं, फिर Delivered पर चले जाते हैं।
2
Delivered
Once delivery completes (license key generated, role assigned, repository access granted, file links resolved, OAuth completed), the grant moves to Delivered and delivered_at is set.
3
Failed
If the integration call returns a non-retryable error (revoked OAuth token, denied permission, file no longer exists), the grant moves to Failed. The error_code and error_message fields capture the reason.
4
Revoked
When access is withdrawn (subscription cancelled, refund issued, or merchant-initiated revoke), the grant moves to Revoked. The revocation_reason field records the trigger.
No-op। Grants नीचे दिए गए subscription event से संचालित होते हैं।
subscription.active
ऐसे सभी संलग्न entitlements के लिए grants जारी करें जिनके पास पहले से grant नहीं है। उसी subscription के लिए पहले revoke किए गए grants को फिर से grant करें।
subscription.renewed
No-op। Renewals के दौरान मौजूदा grants बने रहते हैं।
subscription.on_hold
सभी delivered और pending grants revoke करें। revocation_reason: subscription_on_hold।
subscription.paused
सभी delivered और pending grants revoke करें। revocation_reason: SubscriptionPaused।
subscription.unpaused
उसी subscription के लिए पहले revoke किए गए grants को फिर से grant करें, ठीक वैसे ही जैसे subscription.active करता है।
subscription.cancelled
सभी revoke करें। revocation_reason: subscription_cancelled।
subscription.expired
सभी revoke करें। revocation_reason: subscription_expired।
subscription.plan_changed
सभी मौजूदा grants revoke करें, फिर नए plan के entitlements के लिए grants जारी करें। revocation_reason: plan_changed।
refund.succeeded (one-time payment)
उस payment के grants revoke करें। revocation_reason: refund।
Manual API revoke
revocation_reason: manual के साथ revoke करें। Subscription renewal पर Manual revokes अपने-आप फिर से grant नहीं किए जाते।
License key disabled
License-key grants के लिए, underlying key को disable करने पर grant को revocation_reason: license_key_disabled के साथ revoke किया जाता है। Key को फिर से enable करने पर grant अपने-आप re-activate हो जाता है।
Platform drift detected
यदि किसी integration का platform side sync से बाहर हो जाता है (किसी Discord role को manually हटाया जाना, GitHub App का repository access खो देना, या reconciliation pass द्वारा missing target का पता लगाना), तो grant को revocation_reason: platform_external के साथ revoke किया जाता है। Underlying platform issue का समाधान होने तक subscription renewal पर इसे अपने-आप फिर से grant नहीं किया जाता।
Subscription-driven grants are idempotent per (entitlement, customer, subscription); renewals and re-activations do not create duplicate grants. One-time grants are idempotent per (entitlement, customer, payment).
Go to Entitlements in your Dodo Payments dashboard and click + to create a new entitlement.
2
Pick an integration
एकीकरण का प्रकार चुनें: License Key, Digital Files, Feature Flag, Discord, GitHub, Telegram, Figma, Framer, या Notion। Platform integrations के लिए, यदि आपने अभी तक अपना account connect नहीं किया है, तो पहले उसे connect करें।
3
Configure delivery
Fill in the integration-specific fields. For example, GitHub asks for a repository and a permission level; Discord asks for a server and an optional role; License Key asks for activation limits and expiry.
Creating a GitHub entitlement. Each integration shows the fields it needs.
4
Save
Save the entitlement. You can now attach it to any product.
Open a product, expand Advanced Settings → Entitlements & Credits, and select the entitlements that should be delivered when the product is purchased. A single product can deliver multiple entitlements at once. For example, a Pro plan can include a license key, GitHub access, and a Discord role.
Attaching entitlements to a product. Selected entitlements are delivered on every successful purchase or active subscription.
Customers receive a delivery email after purchase containing the license key, download links, OAuth invitation links, or platform invite, whichever applies to the entitlements on the product. The same details remain available indefinitely from the Customer Portal under their order history.
Discord, GitHub, and Notion subscriber access require the customer to authorize Dodo Payments to grant them access. These grants stay in Pending status until the customer completes the OAuth flow using the link from their email or customer portal. Once they authorize, the grant moves to Delivered and the platform access is provisioned immediately.
Revoked grants are removed at the platform level: the Discord role is removed, the GitHub collaborator is removed, the license key is disabled. Customers see the change reflected in the customer portal.
For Digital Files, revocation removes access to the presigned URLs going forward but does not invalidate copies a customer has already downloaded. Plan content gating accordingly.
Open any entitlement from the dashboard to see its grants. The grant detail panel shows total grants, status filters, customer information, delivery dates, and a revoke action.You can also manage grants programmatically:
import DodoPayments from 'dodopayments';const client = new DodoPayments({ bearerToken: process.env['DODO_PAYMENTS_API_KEY'],});// List grants for an entitlementconst grants = await client.entitlements.grants.list('ent_abc123', { status: 'Delivered',});// Revoke a single grantawait client.entitlements.grants.revoke('entg_xyz789', { id: 'ent_abc123',});
Dodo Payments fires four webhook events for the grant lifecycle. Subscribe to these events to keep your application in sync with what each customer can access.
Event
Fires when
entitlement_grant.created
A new grant is created. License-key grants arrive Delivered under auto fulfillment and Pending under manual fulfillment; every other integration arrives Pending and transitions to Delivered once the platform call succeeds (or, for OAuth-based integrations, once the customer authorizes).
entitlement_grant.delivered
The grant transitions to delivered. The customer now has access.
entitlement_grant.failed
The grant could not be delivered. Inspect error_code and error_message.
entitlement_grant.revoked
Access has been withdrawn. Inspect revocation_reason.
Entitlement Grant Webhook Payloads
View the full payload schema, sample events, and revocation_reason reference.
हर delivery channel के लिए एक entitlement का उपयोग करें। अलग-अलग role intentions वाले products के बीच एक ही Discord entitlement साझा न करें; clean revocation के लिए हर role के लिए एक entitlement बनाएँ।
पहले test mode में परीक्षण करें। Entitlement बनाएँ, उसे किसी test product से attach करें, checkout चलाएँ और grant को Pending → Delivered के माध्यम से transition होते देखें। पुष्टि करें कि test subscription cancel करने पर grant revoke हो जाता है।
entitlement_grant.delivered को सुनें, payment.succeeded को नहीं। Fulfilment पूरा होने से पहले payment सफल हो सकता है (विशेषकर OAuth flows में)। अपने systems में dependent features unlock करने से पहले delivered event की प्रतीक्षा करें।
entitlement_grant.failed को actionable मानें। Failed grant का अर्थ है कि customer ने payment किया, लेकिन उसे access नहीं मिला। इन्हें अपनी support team के सामने रखें या regrant trigger करें।
revocation_reason को अपने retention flows से map करें।subscription_on_hold revoke recoverable होता है (customer अपना card update कर सकता है)। manual revoke intentional होता है। Customer comms में इनके साथ अलग-अलग व्यवहार करें।