title: Server Setup Guide description: Complete guide for Discord server owners to set up the bot and start selling paid roles
Welcome! This guide will walk you through setting up the bot in your Discord server to sell paid roles and subscriptions.
Minimum setup to get started:
/server_config to configure your server/register_stripe to connect Stripe payments/create_sub to create a role package/push_sub_to to publish it to a channelThat's it! Users can now purchase roles in your server.
Required Permissions:
The bot needs these permissions to work properly: - ✅ Manage Roles - So it can assign/remove roles after payment - ✅ Send Messages - To post your role offers in channels - ✅ Embed Links - To create those nice-looking purchase embeds - ✅ Read Message History - To read slash commands - ✅ Use External Emojis - Makes everything look better!
How to Invite:
⚠️ Important: The bot's role must be higher in the hierarchy than any role it will assign! If the bot's role is below the role you want to sell, it won't be able to give it to users. Just drag the bot's role higher in Server Settings → Roles.
Run the /server_config command to set up your server settings.
What you'll configure:
Log Channel - This is super useful! Set up a channel where you'll get real-time notifications about payments. You'll see when someone starts a payment, when it completes, and if anything goes wrong. (Optional but highly recommended)
Creator Role - Give trusted members the ability to create role packages without giving them full admin. (Optional)
Broadcast Channel - If you want automated ads for your role packages. (Optional)
Example:
/server_config
Then use the dropdown menus to select your log channel and creator role.
Why the Log Channel is Awesome:
When someone clicks "Purchase Role", you'll immediately see a notification in your log channel. As the payment progresses, it updates automatically:
The notifications also show timelines, so you can see exactly when each step happened. Plus, if a payment doesn't complete within 5 minutes, the notification automatically gets deleted to keep your channel clean.
Pro Tip: Set this up early so you can monitor all your payments in one place!
To accept payments, you'll need to connect your Stripe account. Don't worry - it's free to set up and you only pay fees when you get paid!
Stripe offers two types of API keys: Secret Keys and Restricted Keys. Both are supported and stored securely encrypted in the database.
Test Mode:
1. Go to https://dashboard.stripe.com/apikeys
2. Make sure you're in Test Mode (toggle in top right)
3. Click "Reveal test key" next to "Secret key"
4. Copy the key (starts with sk_test_...)
Live Mode (Production):
- Switch to Live Mode in Stripe Dashboard
- Get your live API key (starts with sk_live_...)
- ⚠️ Only use live keys when you're ready for real payments!
Restricted keys are safer because they only have the permissions your bot actually needs. It's like giving someone a key that only opens the doors they need - much safer!
To create a Restricted Key:
rk_test_... for test mode or rk_live_... for live mode)Test Mode Restricted Key: rk_test_...
Live Mode Restricted Key: rk_live_...
| Key Type | Prefix | Access Level | Security | Use Case |
|---|---|---|---|---|
| Secret Key (Test) | sk_test_ |
Full access to test account | Standard | Development & testing |
| Secret Key (Live) | sk_live_ |
Full access to live account | Standard | Production (not recommended) |
| Restricted Key (Test) | rk_test_ |
Limited permissions (test) | Higher | Recommended for testing |
| Restricted Key (Live) | rk_live_ |
Limited permissions (live) | Highest | Recommended for production |
Why Use Restricted Keys?
Important Notes:
- All API keys (both sk_ and rk_ types) are securely encrypted before being stored in the database
- Your keys are encrypted separately for each server for extra security
- Never share your API keys publicly or commit them to version control
- You can use either secret keys or restricted keys - the bot supports both
Webhooks are how Stripe tells your bot "hey, this payment completed!" so it can automatically assign roles. Without this, the bot wouldn't know when to give roles.
https://yourdomain.com/webhooks/stripe)checkout.session.completedpayment_intent.succeededcharge.succeededinvoice.payment_succeededcharge.refundedpayment_intent.payment_failedcustomer.subscription.deletedcustomer.subscription.updatedwhsec_...)Run the /register_stripe command:
Using a Secret Key:
/register_stripe api_key:sk_test_... webhook_secret:whsec_...
Using a Restricted Key (Recommended):
/register_stripe api_key:rk_test_... webhook_secret:whsec_...
What this does:
- Encrypts and securely stores your Stripe API key (supports sk_live_, sk_test_, rk_live_, and rk_test_ keys)
- Your keys are securely encrypted before storage in the database
- Each server's keys are encrypted separately for additional security
- Configures webhooks for automatic payment processing
- Enables the bot to create checkout sessions and verify payments
Security Features: - 🔐 All API keys are encrypted at rest in the database - 🔑 Each server has its own separate encryption for extra protection - 🛡️ Uses industry-standard encryption methods - 🔒 Webhook secrets are also encrypted before storage
Check Status:
Run /stripe_api_status to verify your Stripe connection is working.
Ready to create your first paid role? Let's do it step by step!
Run /create_sub and an interactive form will pop up. Super easy!
What you'll need to fill in:
Subscription (weekly, monthly, or yearly recurring payment)
Basic Info:
Benefits (bullet points of perks they'll receive)
Role Selection:
Users get these roles after payment completes
Pricing:
For subscriptions: billing period (weekly/monthly/yearly)
Button Text:
Here's how it works:
You: /create_sub
Bot: [Interactive form appears with dropdowns and text fields]
You: Fill in title, description, select role, set price
Bot: ✅ Role package created! Use /push_sub_to to publish it.
That's it! Your package is created and ready to publish.
Now let's get it in front of your community!
Run /push_sub_to to publish your package to a channel:
What users will see: - Nice-looking embed with all your package details - Purchase button that opens Stripe checkout - Clear pricing and benefits listed
Users can purchase two ways:
- Clicking the button on the published embed
- Running /purchase_role and selecting the package
The easiest way to test is using the built-in test command:
Run /test_payment_flow - This automatically:
- Creates a test role for you
- Creates a test package ready to go
- Sets everything up so you can test right away
Then follow these steps:
/push_sub_to and select "Test Package"4242 4242 4242 4242Pro Tip: Watch your log channel (if you set one up) to see the payment notification update in real-time!
If you want to test with your own setup instead:
Step 1: Create a test role - Go to Server Settings → Roles → Create Role - Name it "Test Premium" or something similar - Make sure bot's role is above it in the hierarchy
Step 2: Create a test package
- Run /create_sub
- Select your test role
- Set price to $1.00 (or the minimum allowed)
- Use your test Stripe API key (sk_test_... or rk_test_...)
Step 3: Publish and test
- Run /push_sub_to and select your test package
- Click the purchase button
- Use test card: 4242 4242 4242 4242
- Verify the role gets assigned
If a role wasn't assigned after payment:
Check if there are any error messages shown
Run /debug_purchase:
Provides fix buttons if possible
Check common issues:
Once you set up your log channel (in Step 2), you'll get real-time notifications every time someone tries to purchase a role in your server. It's like having a dashboard that shows you everything happening with payments!
When someone clicks "Purchase Role", here's what you'll see:
🔵 Payment Session Created - This shows up immediately when someone clicks the purchase button - You'll see who's trying to buy, what package they want, and the price - Includes a purchase ID you can use for debugging if needed
⏳ Payment In Progress - The notification automatically updates when Stripe confirms the payment - You'll see the exact time when payment was confirmed
✅ Payment Successful - Final update shows roles were assigned successfully - You'll see which roles were given and when - Includes a complete timeline of the payment process
❌ Payment Failed - If something goes wrong, you'll see the error details - Shows what failed (role assignment, permissions, etc.) - Helps you quickly identify and fix issues
⌛ Payment Timed Out - If someone doesn't complete payment within 5 minutes, the notification gets deleted automatically - This keeps your log channel clean and focused on active payments - The purchase record is marked as "timeout" in the system
Each notification shows a timeline of events:
All timestamps use Discord's relative time format (like "2 minutes ago"), so you can quickly see how fresh the information is.
The bot automatically cleans up timed-out payments after 5 minutes. This means:
Once you've created some packages, you'll want to manage them. Here's how!
Run /manage_subs to see everything you've created:
- Lists all your role packages
- Shows package details at a glance
- Lets you edit or delete packages easily
Need to change something? No problem!
/manage_subsCommon edits: - Updating pricing - Adding new benefits - Changing subscription duration - Fixing typos in descriptions
Sometimes you need to remove a package entirely.
/manage_subs⚠️ Important Warning: Deleting a package doesn't refund existing purchases or remove roles from users who already bought it. They keep what they paid for! Only delete if you're sure you don't want to sell it anymore.
Want to see how your packages are performing?
Run /role_analytics to see:
- Total revenue per package (see what's selling!)
- Number of purchases (how popular each package is)
- Active subscriptions (who's subscribed right now)
- Revenue over time (track your growth)
This is super useful for understanding what your community likes and making decisions about pricing and packages!
Having issues? Don't worry, we've got you covered! Here are the most common problems and how to fix them.
Problem: Payment went through but the role wasn't assigned
Solutions (try these in order):
This is usually the fastest way to see what went wrong!
Check bot permissions
Go to Server Settings → Roles and drag bot's role higher in the list
Run /debug_purchase
Shows full purchase status
Check webhook configuration
/stripe_api_status to verify everything is connectedCheck Stripe Dashboard → Webhooks for any errors
Wait a bit
Problem: Slash commands don't show up when you type /
Solutions:
applications.commands scopeProblem: /stripe_api_status shows errors or won't connect
Solutions:
sk_test_, sk_live_, rk_test_, or rk_live_rk_), double-check it has the required permissionsTry regenerating it in Stripe Dashboard
Check your webhook secret
whsec_Try re-registering with /register_stripe
Test vs Live Mode
sk_test_ or rk_test_) in test modeProblem: Checkout opens but payment doesn't complete
Solutions:
The log channel will show you exactly where the process stopped
Check webhook URL
Contact bot owner if you're not sure about this
Check Stripe Dashboard
Look for any error messages
Run /debug_purchase
Problem: Can't find your package in /push_sub_to or /purchase_role
Solutions:
/manage_subs to see all your packagesVerify the package actually exists in the list
Check permissions
Make sure you have admin permissions on the server
Try creating again
/create_sub again from the beginning| Command | Description | Who Can Use |
|---|---|---|
/server_config |
Configure server settings (log channel, creator role) | Server Admin |
/register_stripe |
Connect Stripe API key and webhook secret | Server Admin |
/remove_stripe |
Disconnect Stripe account | Server Admin |
/stripe_api_status |
Check Stripe connection status | Server Admin |
| Command | Description | Who Can Use |
|---|---|---|
/create_sub |
Create a new paid role package | Admin (Premium required) |
/manage_subs |
Edit or delete role packages | Admin (Premium required) |
/push_sub_to |
Publish role package to a channel | Admin (Premium required) |
/purchase_role |
Purchase a role package | Anyone |
/role_analytics |
View purchase stats and revenue | Admin |
| Command | Description | Who Can Use |
|---|---|---|
/test_payment_flow |
Quick test setup (creates test role & package) | Admin |
/debug_purchase |
Debug why a role wasn't assigned | Admin |
| Command | Description | Who Can Use |
|---|---|---|
/onboard |
Interactive guided setup walkthrough | Anyone |
/faq |
Common questions and tutorials | Anyone |
rk_live_ / rk_test_) for better security (recommended)/role_analytics for suspicious activity/debug_purchase when you need more detailed infoStuck on something? Here's how to get help:
/faq - Answers to the most common questions/onboard - Interactive setup guide that walks you through everything/stripe_api_status - Verify your Stripe connection is working/debug_purchase - Debug specific payment issues with detailed infoAwesome! You're all set up. Here's what to do next:
/role_analytics to see what's workingYou're ready to start selling! Happy selling! 🎉