How to Connect Tebex to Discord and Automate Role Assignment
Tired of manually assigning donor roles? Learn how to connect your Tebex store to Discord and automate everything with Heimdall.
How to Connect Tebex to Discord and Automate Role Assignment
If you run a game server with a Tebex store, you know the drill. Someone buys a rank or a perk, then they message you on Discord asking when they'll get their role. You check Tebex, confirm the purchase, manually assign the role, and move on. Until the next purchase. And the next.
It's tedious, error-prone, and completely unnecessary.
Connecting Tebex to Discord so that roles are assigned automatically saves you hours of manual work every week. It also gives your buyers instant gratification — they purchase a rank and see it reflected on Discord within seconds. No waiting, no tickets, no frustrated DMs.
Here's how to set it up.
The Problem With Manual Tebex Management
Let's be honest about why this matters. If you're running a small server with a couple purchases a week, manual role assignment is annoying but manageable. But the moment your store starts getting consistent traffic — and especially if you run a FiveM server where donation packages are a primary revenue stream — manual management becomes a real problem.
Here's what goes wrong:
Delayed role assignment. A player buys a VIP package at 2 AM. Your staff is asleep. The player doesn't get their role until morning. They've already complained in general chat, opened a ticket, and DM'd two moderators.
Missed purchases. With no automation, a purchase can easily slip through the cracks. The buyer gets frustrated. They might even open a chargeback because they feel they didn't receive what they paid for. That costs you money and reputation.
Staff burnout. Assigning donor roles is mind-numbing work. Your moderators signed up to moderate, not to copy-paste role assignments from Tebex all day.
No purchase verification. When someone claims they bought a rank but didn't get it, how do you verify? Without a connected system, you're digging through Tebex transaction logs manually. With automation, the system handles it — or at the very least, gives you a clear audit trail.
What You Need
The setup is straightforward. You need:
- A Tebex store with at least one package configured. This works with both Tebex.io storefronts and custom-domain stores.
- A Discord server where your community lives.
- Heimdall — which handles the Tebex-to-Discord connection and automates role assignment.
Heimdall's Tebex integration works with all types of Tebex stores, including FiveM, Minecraft, Rust, and other game servers. If Tebex supports your game, Heimdall can automate the Discord side.
Step-by-Step Setup
Step 1: Invite Heimdall
If Heimdall isn't already in your Discord server, invite it from the landing page. Authorize the basic permissions, and you'll get access to the web dashboard.
Step 2: Connect Your Tebex Store
In the Heimdall dashboard, navigate to the Tebex integration section. You'll need your Tebex server secret key, which you can find in your Tebex control panel under "Integrations" or "API Keys."
Paste the key into Heimdall's dashboard and click "Connect." Heimdall will verify the connection and pull in your store's package list.
This takes about 30 seconds. You'll see a green checkmark when the connection is live.
Step 3: Map Packages to Discord Roles
This is the core of the setup. For each Tebex package, you assign a corresponding Discord role.
For example:
| Tebex Package | Discord Role |
|---|---|
| VIP Rank | @VIP |
| MVP Rank | @MVP |
| Legendary Rank | @Legendary |
| $10 Donation | @Donor |
Create these roles in Discord first if they don't exist, then map them in the dashboard. Heimdall will automatically assign the correct role when a purchase is detected.
You can map multiple roles to a single package. If your "Legendary" package should also grant the "VIP" and "MVP" roles, configure all three.
Step 4: Configure Webhooks
Heimdall uses Tebex webhooks to detect purchases in real time. In the dashboard, you'll see a webhook URL. Copy this URL and add it to your Tebex control panel under "Webhooks."
When a customer completes a purchase, Tebex sends a notification to Heimdall, which processes it and assigns the role immediately.
The whole pipeline — purchase to role assignment — typically takes less than 10 seconds.
Step 5: Test the Connection
Make a test purchase on your Tebex store (most Tebex setups allow test transactions). Verify that:
- Heimdall receives the webhook.
- The correct Discord role is assigned.
- The transaction appears in Heimdall's log.
If something isn't working, check the webhook URL and your Tebex secret key. The Heimdall dashboard shows a detailed event log that helps you pinpoint issues.
FiveM-Specific Setup
FiveM servers deserve a special mention because Tebex integration is particularly important for the FiveM ecosystem. Most FiveM servers rely on donations and rank purchases as their primary funding source. The volume of transactions tends to be higher, and players expect instant delivery.
Here's what FiveM server owners should know:
Tebex is the standard. Nearly every FiveM server uses Tebex (or its FiveM-specific version, formerly known as the Tebex Game Store). Heimdall's integration works with all Tebex configurations, including custom FiveM store themes.
Role hierarchy matters. FiveM communities often have complex role structures — Civilian, EMS, Police, VIP, Donator, Staff — with specific permissions tied to each. Make sure your role mapping in Heimdall matches your server's hierarchy. Test that higher-tier purchases correctly grant all lower-tier roles too.
Combine with other integrations. If you're using Heimdall for tickets too, your staff can see a player's Tebex purchase history right inside a support ticket. When someone opens a ticket saying "I bought VIP but didn't get it," your staff can verify the purchase without leaving Discord.
Subscription packages. If you sell monthly subscriptions through Tebex, Heimdall handles renewals and expirations automatically. When a subscription renews, the role stays. When it expires, the role is removed. No manual intervention needed.
Handling Edge Cases
Automation is great until something unexpected happens. Here's how Heimdall handles the common edge cases:
Chargebacks. When a Tebex purchase is charged back, Heimdall can automatically remove the associated Discord role. This protects your server from people who buy a rank and then reverse the charge.
Refunds. Same as chargebacks — if you process a refund through Tebex, Heimdall detects it and removes the role. Clean and automatic.
Multiple purchases. If a player buys multiple packages, all corresponding roles are assigned. If they later upgrade from VIP to MVP, you can configure whether the old role is kept or removed.
Account linking. For the Tebex-to-Discord connection to work, players need to have their accounts linked. Heimdall handles this through a simple verification flow. Players link their game account and Discord account, and purchases are matched automatically.
Common Questions
Does this work with all Tebex payment methods?
Yes. Heimdall processes webhooks from Tebex regardless of the payment method. PayPal, Stripe, gift cards — if Tebex accepts it and sends a webhook, Heimdall handles it.
What happens if Heimdall goes offline during a purchase?
Tebex retries failed webhooks. When Heimdall comes back online, it processes any queued events. No purchases are lost.
Can I set up role assignment without Tebex webhooks?
Heimdall also supports periodic sync, where it checks Tebex for new transactions on a schedule. Webhooks are faster and recommended, but periodic sync works as a backup.
How does this compare to Tebex's built-in Discord bot?
Tebex offers a basic Discord integration, but it's limited to simple role assignment. Heimdall adds purchase verification in tickets, chargeback handling, subscription management, and integration with other features like Minecraft whitelisting. It's a more complete solution.
What's the pricing?
The Tebex integration is included in Heimdall's free plan for servers up to 500 members. Larger servers can upgrade for additional capacity and priority support.
Stop Doing It By Hand
Every manual role assignment is a chance for error, a source of delay, and a drain on your staff's time. If you're selling anything through Tebex — ranks, perks, subscriptions, cosmetics — the Discord side should be automated.
Heimdall's Tebex integration connects your store to your Discord server and handles everything in real time. Purchases trigger instant role assignment. Refunds and chargebacks trigger automatic removal. And your staff can focus on actually running the community.
Get started with Heimdall — it's free for servers up to 500 members, and the Tebex integration takes about 10 minutes to configure.
