RoleLogic

HomeIntegrations › Referral Code Role

Referral Code Role icon

Grant Discord Roles via Redeemable Referral Codes

Generate codes, hand them out, and members redeem them for a Discord role. Build single-use, multi-use, or shared batches — with optional expiry, role-duration timers, max-redemption caps, and a custom invite URL.

Free plan available · No coding required Version 1.0.0 Updated 2026-04-21
referralcoderedeemqr codeqrbatchkickstarterpodcastgiveawayeventwristbandflyerinvitetime-limitedauto-expireredemptionadmin dashboardrolediscord serverdiscord role bot

What you can build with Referral Code Role

Real use cases that ship in production Discord servers using RoleLogic + redeemable codes.

Kickstarter and Patreon backer rewards

Generate one unique code per backer (unique-per-code batch). Backers redeem to unlock their backer role and channels — no manual approval queue, no reward spreadsheet.

Event wristbands and QR codes

Print one-time codes on physical badges or QR-coded flyers (shared batch or unique-per-code). Attendees scan, redeem, get the event role automatically. Set expiry to the event date.

Podcast and creator shout-outs

Drop a code in your latest episode or video (unique-per-user batch). Listeners who actually paid attention get a 'Listener' role, reusable up to your cap.

Time-limited access roles

Set role_duration_hours on the batch and the role auto-revokes after the timer — perfect for trial access, weekend events, or 24-hour beta windows. The expiry worker reaps roles on a one-to-two minute cadence.

Cross-server invites with redirect

Attach a Discord invite URL to the batch — the redemption page redirects users straight into the right server before granting the role.

Pending-redemption queue

If a member redeems before joining the Discord server, RoleLogic queues the role and grants it the moment they join. No second redemption, no follow-up DMs.

How Referral Code Role works

From install to live redeemable codes roles in a few minutes.

1

Create a batch

Choose batch kind: unique-per-code (one-shot codes), unique-per-user (each user redeems once, code reusable), or shared-unlimited (one code, many users). Set max redemptions, per-code cap, expiry, and optional role duration.

2

Distribute the codes

Hand them out via email, QR code, podcast script, livestream overlay, or wherever. Each redemption page lives at a stable share URL you can link or QR-encode.

3

Members redeem, role lands

Member signs in with Discord, enters the code, and the role is granted — even if they haven't joined the server yet. RoleLogic queues the role and applies it as soon as they join the guild.

Get started — it's free

Frequently asked questions

Common questions about Referral Code Role and RoleLogic.

What batch types are supported?

Three: unique-per-code (each code is single-use), unique-per-user (each user redeems once, code can be reused up to a cap), and shared-unlimited (one code, unlimited users until the batch cap or expiry).

Can codes expire?

Yes. Set a batch expiry timestamp, a max-redemption cap, or both. You can also set role_duration_hours so the granted role automatically revokes after a time window (precision is hours).

How big can a batch be?

RoleLogic's chunked role-link upload supports 100,000+ members per role link, so practical limits are very high. Real-world community batches run from a few dozen to hundreds of thousands.

What if a member redeems before joining the Discord server?

RoleLogic queues the role and a background worker grants it as soon as the member joins the guild — no second redemption needed, no DM follow-ups.

Is there abuse protection?

Yes — per-user rate limit (default 20 redeem attempts per hour), per-code redemption caps, and batch-level expiry. You can also lock a batch to a specific Discord server.

Ship Referral Code Role in 5 minutes

Free plan, no coding, real-time sync. Used by Discord servers of every size — from indie communities to verified gaming servers with hundreds of thousands of members.

Set up Referral Code Role