Discord-gated discount codes: the code only members can redeem

2026-10-04 · Bazyl

A member-only discount code is a code that stops working the moment the buyer isn't in your Discord server. By the end of this post you'll know how to get one, what your members see when it works, and the three messages they see when it doesn't.

The thing most groups get wrong is treating the code itself as the secret. A code is a string, and strings get pasted. The gate makes the string worthless outside the server, because what we check at checkout is membership, not whether someone knows the code.

The gate checks membership, live, at checkout

The check happens at the moment of payment, not when the code was created. The buyer's Basil account has to have a Discord account linked to it, and that Discord account has to be a member of your server right then. Both, or the code is refused.

A positive answer is cached for 5 minutes, a negative one for 60 seconds. So a member who leaves your server can still redeem for up to five minutes afterwards, and someone who was refused and then joins is through within a minute.

Example: a member leaves your server on Tuesday. On Wednesday they open checkout and type the code. It's refused, and the message tells them which server they need to be in.

What a member sees

There are exactly three refusals, and each tells the member what to do. Here they are, with X standing for your code and the server named the way you named it to us:

Code "X" is only available for accounts registered with Discord.

Code "X" is only available to members of <server>. Join the server with the Discord account linked to your dashboard, then try again.

Code "X" could not be verified — Discord verification is temporarily unavailable. Please try again in a minute.

The first means the buyer's Basil account has no Discord account linked. The second means the linked account isn't in your server. The third means we couldn't reach Discord to ask.

That third case matters. When verification is down the code is refused, full stop. We never fall through and charge the full price while the member thinks the code applied. They wait a minute and try again.

When the code is accepted, the price drops in the checkout summary and the member pays the lower number. The proxies they generate afterwards are identical to anyone else's. A code changes the price, never the product.

Setting one up takes one invite and one ticket

Three steps, and only one of them is ours:

  1. Your server admin invites the Basil bot into your server. The gate can't be set before the bot is a member, because the bot is what answers the membership question.
  2. Open a ticket in our Discord with the server, the discount you want, and any of the extra limits below.
  3. We create the code and set your server on it. You hand the code out however you like: a pinned message, a role-only channel, a welcome DM.

Members need one thing on their side: a Discord account linked to their Basil dashboard. The "registered with Discord" refusal above is what they see until that's done.

The other limits a code can carry

A gated code can carry four more flags, and they combine. Each is a separate switch we set on the code when you ask for it:

  • First payment only. The discount applies to the first charge; a subscription bought with it renews at full price.
  • One use per customer. When the code is gated, that means one use per Discord account.
  • New accounts only.
  • A minimum order value.

For a launch code, ask for gated plus first-payment-only plus one-per-Discord-account. For a standing member perk, gated and nothing else. Say which you want in the ticket.

Where the code works

The code works in both places a member can pay. On the website it goes in the discount field at checkout. In the bot's /buy flow, the confirm card has a "Have a discount code?" button that opens a one-field modal; the ISP branch uses one modal for the discount code and an optional cookgroup access code.

The same check runs in both. A member refused on the website for not being in the server gets the same refusal from the bot.

What the gate doesn't do

The gate stops outsiders, not a member's second account. Someone who is in your server can link a second Discord account to a second Basil account, join with it, and redeem again. One use per Discord account slows that down. Your own membership rules are what stop it.

A code also pays you nothing. It lowers the price your members pay, which is the perk. Treat it as a reason to be in the group, not as the group's income.

The code is one of three things a group can run on our side. The cook groups page lists the other two, and the ticket to ask for a code is the same ticket.

Common questions

What is a Discord-gated discount code?
A Basil discount code tied to a named Discord server. At checkout we check that the buyer's linked Discord account is a member of that server right now. Leave the server and the code stops working.
What does a non-member see when they try the code?
A refusal that names your server and tells them to join it with the Discord account linked to their dashboard, then try again. Nothing is charged.
What happens if Discord verification is down?
The code is refused with a message saying verification is temporarily unavailable and asking them to try again in a minute. The order is never placed at full price behind their back.
Who sets the gate up?
Your server admin invites the Basil bot into your server. We set the server on the code. You hand the code to your members.
Does a gated code work in the Discord /buy command?
Yes. The confirm card has a Have a discount code button that opens a one-field modal, and the same membership check runs there as on the website.