Are you looking to monetize your community, increase engagement, and offer exclusive content to your most dedicated members? You're in the right place! This tutorial will walk you through the process of setting up a paid membership system for your Discord server using Buildship. 200M people use Discord daily!
Buildship has a growing library of workflows that you can use to create AI-powered perks, AI automation, integrations, and more, for your membership.
But first you need to get started, let’s get into it!
What You'll Learn
In this guide, we'll cover:
How to integrate Discord with Buildship
How to power a Discord bot with Railway to manage your Discord memberships
Setting up Stripe for payment processing
Customizing your membership tiers
Who This Tutorial Is For
This guide is perfect for:
Community managers looking to monetize their Discord server
Content creators wanting to offer exclusive perks to subscribers
Entrepreneurs aiming to build a paid community around their expertise
. This template creates 3 private channels that we’ll assign to the 3 tiers of the membership in Stripe later. You can also use your existing Discord server with 3 private channels you want to include in this integration.
Once the server is created, turn on Developer Mode in Discord to access important information such as your GUILD_ID and the ROLE_ID and CHANNEL_ID for three specific roles and channels. These details will be essential when inputting values into Buildship nodes.
Right-click on the channel and server to obtain their IDs, and for role IDs, go to the server settings, navigate to the roles section, and click the three dots next to a role to obtain its ID.
Turning on Developer mode:
Get role ID:
Step 2—Install your Discord bot on your server
Install your Discord bot to the server and assign the roles with the necessary permissions: manage roles, view channels, create instant invites, and create events. This setup will streamline the management of your tiered server structure.
Go back to the dashboard for the Discord app you created earlier, and visit the Installation settings tab to copy the install link:
Visit the install link (paste it in your browser) to add your bot to your Discord server.
Use Buildship Workflow to create Stripe Product and Prices
Step 1—Create a Stripe subscription
We’re going to use Stripe so you can sell memberships to your Discord.
Use the Create Product and Prices Buildship workflow to set up a Stripe product with three subscription plans. You can do this by pressing the Test button in the top right of Buildship:
Be sure to input the Discord IDs for the guild, channels, and roles into the workflow's variables, defining the tier prices in cents for each plan. Once configured, generate a payment link for users to subscribe. The Discord IDs will be stored in the metadata of each Stripe Price for future integration with Discord roles and channels.
This workflow creates a Stripe Product with three pricing tiers, each corresponding to a different price.
Step 2—Setup the payment link to collect payment
Create a Stripe Payment Link for the Paid Discord Membership:
Remix the Buildship Template
Step 1—Modify Stripe Listener for Stripe events
If the checkout.session.completed event is not included in the Stripe Webhook events, make sure to manually add it. Once a checkout session is successfully completed, a Discord invite link will be generated to allow the user to join the guild. The invite code will then be stored within the created subscription, enabling you to later retrieve the subscription based on the invite code used to join the guild.
The workflow is also designed to listen for customer.subscription.updated and customer.subscription.deleted events from Stripe, enabling dynamic management of user roles. When these events occur, the user's role can be automatically adjusted based on the changes made to their subscription. This functionality ensures that users maintain access to the appropriate resources and permissions corresponding to their current subscription status.
checkout.session.completed Branch:
The channel ID is extracted from the price plan of the subscription, allowing for the creation of an invite code that customers can use to join the Discord server.
Store the Discord invite code in the subscription's metadata for future reference and access.
customer.subscription.updated Branch:
This node checks if a subscription is being updated due to a change in its plan, and return the corresponding Discord data accordingly.
If the subscription plan has been updated, this node utilizes the Discord data to remove the old role from the member's Discord role array and add the new role. This change ensures that the member gains access to the private channel associated with their new tier while preventing access to the private channel of the previous tier.
If the plan status has been updated—whether it transitions to inactive, becomes active, or experiences a pause or unpause in payment collection—this node will appropriately add or remove roles from the member. This ensures that the member's access aligns with their current subscription status, granting or revoking access to the relevant channels as necessary.
customer.subscription.deleted Branch:
When the customer.subscription.deleted event is triggered, the role associated with the canceled tiered subscription will be removed from the user's Discord role array. This action effectively prevents the user from accessing the private channel designated for that subscription tier, ensuring that their permissions within the Discord server are accurately aligned with their subscription status.
Step 2—Modify Event Listener for Discord Bot
Create a bot listener event to monitor when a new member joins the guild. Upon detecting a new member, the bot will send the member object to a Buildship endpoint designed to handle the logic for assigning the appropriate role to the new member. This ensures a seamless onboarding process and proper role management within the server.
The data sent to the Buildship workflow will look like this:
Step 3—Modify Buildship Workflow to add role to new member
This Buildship endpoint is designed to process data sent by the Discord bot when a new member joins the guild. Upon receiving this information, the endpoint will identify the invite code used by the new member and utilize it to locate the corresponding subscription that contains this invite code within its metadata. From this subscription, the associated Discord role ID will be retrieved from the price metadata. The user's Discord member ID will also be stored in the subscription for future reference. Subsequently, the user's roles will be updated by adding the new role to their existing roles array, thereby granting them access to the private channel linked to the tier they have subscribed to.
This nodes fetches invite code the user used to join the guild.
This node is designed to locate the subscription by searching for the subscription that includes the invite code used in its metadata. In addition to identifying the subscription, it will also store the Discord user's ID within the subscription's metadata for future reference. This ensures that the necessary user information is readily available for any subsequent operations or logic that may require it.
This node updates the new user's role to include the tier to which they have subscribed, granting them access to the private channel associated with that tier. By modifying the user's roles, it ensures that they can participate in exclusive content and interactions specific to their subscription level.
Congratulations! 🎉
You've successfully integrated Discord with Buildship with 24/7 hosting that’s free for 7 months, opening up a world of possibilities for your online community that no other platform or integration can match! Let's recap what you've accomplished and explore the exciting road ahead:
Set up a paid Discord membership
Integrated Discord with Buildship for enhanced functionality
Connected Stripe for seamless payment collection
With this foundation, you're now ready to:
Leverage AI to enhance member experiences
Create interactive learning opportunities
Develop unique features using Buildship's AI nodes
Remember, building a thriving community takes time and effort. Keep experimenting with new ideas, listen to your members' feedback, and don't hesitate to
Ready to take your Discord community to the next level? Start implementing these tools today and watch your community engagement grow and paid membership grow!