Dev.to WebDev 🛠 Dev 👁 0 📖 4 min read

How to Sell Paid Access in a Discord Server with Stripe

If you run a Discord server and want members to pay for part of it, the job comes down to three things. Take a payment, give the buyer a role that unlocks the paid channels, and take that role away when they stop paying.

If you run a Discord server and want members to pay for part of it, the job comes down to three things. Take a payment, give the buyer a role that unlocks the paid channels, and take that role away when they stop paying. Everything else is polish.

There are two ways to get there. You can wire Stripe to a Discord bot yourself, or you can install a bot that already does it. I build one of the second kind, so weigh what follows with that in mind. I'll still walk through the first route honestly, because for some servers it's the right call.

Route 1: build it yourself

The do-it-yourself version has four moving parts.

  1. A Stripe Checkout session. Your bot or a small web page creates a Checkout session for a price you set up in Stripe. Put the buyer's Discord user ID in the session metadata so you know who paid.
  2. A webhook endpoint. Stripe calls it when a payment succeeds, when a subscription renews, and when one is cancelled or refunded. You need a server that is always up to receive these, and you need to verify each event's signature.
  3. Role changes. On a successful payment, your bot calls Discord's API to add the role. On a cancel, a failed renewal or a refund, it removes the role. The bot's own role has to sit above the roles it hands out, or Discord refuses the change.
  4. Linking accounts. Buyers who pay from outside Discord need a way to connect the payment to their Discord account, which usually means a Discord sign-in step before checkout.

This is a weekend project for a working version. The ongoing cost is the part people underestimate. Webhooks fail and need retries. Members leave and rejoin the server and expect their role back. Someone asks for a refund in a DM. Stripe changes an API version. If you enjoy that kind of maintenance, building it yourself gives you full control and no fee beyond Stripe's.

Route 2: install a payment bot

A payment bot does the four parts above for you. With PayBot, the setup looks like this.

  1. Add PayBot to your server. That opens a dashboard with a checklist.
  2. Connect your Stripe account, or create one in the same step. Payments go to that account, so the money never sits with PayBot.
  3. Create a product. It can be lifetime access sold once, a monthly or yearly subscription, access that expires after a set number of days, or a paid live event. Pick the role it grants. Subscriptions can be grouped into tiers that members upgrade between.
  4. Share the payment page. Put the link in your bio or welcome channel, or post a Get Access button in the server.

When a payment clears, the member gets the role and a welcome DM. Cancels and refunds take the role back on their own. Members manage their own subscription with /subscription inside Discord, so billing questions don't land in your DMs. If you'd rather not leave Discord at all, /setup does the same steps from inside the server.

Buyers who come from outside Discord sign in with Discord, pay, and get added to the server when the payment clears.

What each route costs

The build-it-yourself route costs only Stripe's processing fees (usually 2.9% + 30 cents for a domestic card) plus your time and hosting.

PayBot has no monthly fee. It takes 3% of each sale, and Stripe's processing fees apply separately. The full breakdown is on the pricing page.

So the trade is simple. If your server earns a few hundred dollars a month, 3% is a small price for not maintaining webhook code. If you're a developer who wants every detail under your control, build it.

A few things that apply either way

  • Put the paid channels behind a role, not a password. Roles are easy to grant and remove automatically. Shared passwords leak.
  • Sell the community, not monthly access. A monthly fee for entry churns. People join on a burst of motivation and cancel the first slow month. A sturdier base is lifetime entry sold once, priced near what an average member would have paid over their whole stay (ten months at $50 is $500). Put the recurring tiers on top, like a VIP group with direct access to you, where your most committed members pay monthly.
  • Give people a reason to show up every day. Charts to post in a trading server, macros to log in a fitness one. Add a ladder to climb, with ranks or roles people earn. A room people come back to sells itself.
  • Watch failed renewals on the recurring tiers. A card that fails on renewal is a common reason a paying member drops off. Make sure your setup removes access only after Stripe gives up retrying.

If you want to see the install-a-bot route end to end, the how it works page walks through every step.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.