Grant your customers a role in your Discord server when they purchase, and revoke it automatically when their subscription ends.
The Discord entitlement adds a paying customer to your server (and optionally assigns them a role) the moment their subscription becomes active or their one-time purchase clears. Cancellation, refunds, and plan changes revoke the role automatically.
In your Dodo Payments dashboard, go to Entitlements and click + to start a new entitlement.
2
Pick Discord
Choose Discord Access as the integration. If you have not yet connected Discord for your business, you’ll be prompted to Connect Discord.
Connect Discord prompt before the OAuth handoff.
Clicking through opens Discord in a new tab. Sign in, pick the server you want to gate, and confirm the bot’s permissions (Manage Roles, Kick Members, Create Invite) on that server.
Discord OAuth: pick the server, then confirm the bot's permissions on it.
When Discord redirects back, you’ll see a confirmation that the server is connected.
Server connected — return to the Dodo Payments dashboard to continue.
3
Pick a server and role
Back in the dashboard, select the server (guild) you just connected. Optionally pick a role to assign on delivery, or leave it blank to grant server membership only. Give the entitlement a name and click Create Entitlement.
4
Save the entitlement
Save the entitlement. It’s now available to attach to any product.
Dodo Payments creates a grant in pending status with an oauth_url pointing to Discord.
The customer receives an email with a “Join the Discord” button (the OAuth link). The link is also visible in their customer portal.
After the customer authorizes, the bot adds them to the server and assigns the configured role. The grant moves to delivered.
If the subscription is cancelled, paused, or expires, or if the merchant manually revokes, the bot removes the role and the grant moves to revoked.
Make sure the Dodo Payments bot’s role is positioned above the role you grant. Discord prevents bots from assigning roles ranked higher than their own.
The grant is in pending until the customer completes the OAuth flow. Check the entitlement’s grants list and confirm whether they clicked the OAuth link. Resend the delivery email if needed.
Grant moves to failed with permission errors
Make sure the Dodo Payments bot remains in the server, has Manage Roles permission, and is positioned above the role being assigned. Re-saving the entitlement re-runs validation.
Customer cancelled but still has the role
Discord propagates role removals immediately, but the customer’s local Discord client may cache. They should reconnect or refresh; server-side state is correct.