Discord Integration
The Discord integration is complete and will be available to merchants shortly. This page documents the setup flow for when it launches.
Discord communities, DAOs, and content creators can gate Discord roles behind an on-chain amser subscription. When a subscriber's payment executes, the amser bot automatically grants the configured role. When the subscription lapses, the role is revoked. No bot hosting, no webhook infrastructure, and no code required on the merchant's side.
How it works
amser runs a single hosted bot that serves all merchants. Merchants invite it to their server via a Discord OAuth link generated in the amser dashboard. Role grant and revocation are triggered by payment events from the amser protocol — the same events that fire webhooks. The bot also runs a periodic polling check against the amser API to catch any state drift in case an event was missed.
The wallet-to-Discord-user link is established through a SIWE verification flow. A user runs /verify in the Discord server, receives a link to the amser verification page, connects their wallet, and signs a message proving ownership. This links their wallet address to their Discord user ID in the amser platform. From that point on, subscription state is checked against their wallet automatically.
Setup
Step 1 — Connect your Discord server
In the amser dashboard, go to Settings → Discord and click Connect Server. This opens a Discord OAuth flow. Select the server you want to connect and grant the amser bot the Manage Roles permission.
The amser bot's role in your server must be positioned above the subscription role it will manage in Discord's role hierarchy. If it isn't, Discord will reject the role grant. You can reorder roles in your server's Settings → Roles.
Step 2 — Configure plan-to-role mapping
Back in the amser dashboard, select which plan gates which role. You'll see your server's roles listed — select the role you want granted to active subscribers of each plan. One plan maps to one role.
Step 3 — Tell your users to verify
Users run /verify in your Discord server. The bot replies with a private message containing a verification link. The user opens the link, connects their wallet, and signs a SIWE message. No gas is spent. Once verified, their wallet address is linked to their Discord account in the amser platform.
Step 4 — Test it
Subscribe to the plan using the verified wallet via the hosted checkout. Within a few seconds of the first payment executing, the bot should grant the role. Check the amser dashboard under Settings → Discord to see the sync status and any errors.
Role sync
Role changes are driven by payment events. When payment.succeeded fires, the bot looks up the Discord user linked to the subscriber's wallet and grants the role. When payment.failed, subscription.paused, or subscription.cancelled fires, the role is revoked.
In addition, the bot runs a periodic check against GET /v0/auth/check for all linked users in connected servers. This catches any state that event delivery may have missed — for example, if the bot was briefly unavailable when a payment event fired. The polling interval is managed by amser and requires no configuration.
Limitations
- One Discord server per merchant module at launch
- One plan-to-role mapping per server at launch — multiple plan tiers mapping to different roles is on the roadmap
- Users must complete the
/verifyflow before their subscription state is checked — subscribing before verifying will not automatically grant the role retroactively (they can run/verifyafter subscribing to trigger a sync)
Next steps
- Merchant Integration — Full end-to-end setup guide
- Hosted Checkout — Pre-built checkout page for subscriptions
- Webhooks — The Discord integration uses the same event system