SunLicenseSign in
For discord.js, discord.py and JDA developers

Premium for your Discord bot, one server per key.

Premium per guild. When a subscription ends, premium ends too.

Create free account

Free plan · No credit card · Set up in minutes

Coding with an AI agent? Paste one prompt
  • discord.js
  • discord.py
  • JavaJDA
  • Discord
  • Stripe
  • Gumroad
  • Lemon Squeezy
  • Ko-fi
  • BuiltByBit
What you get

Built for how you sell.

Premium per guild

The guild ID counts as the machine.

host: guildId

Subscriptions end on time

Stripe, Gumroad and Lemon Squeezy suspend ended ones.

Key-sharing alerts

A red alert with a Suspend button.

Premium roles

Buyers claim with their purchase email.

Move premium yourself

Buyers free a server slot, no ticket.

Self-hosted, one per buyer

Templates check at start and every 6 hours.

How it works

Premium live in an afternoon.

  1. 1Create a free account
  2. 2Connect Stripe or Gumroad
  3. 3Add a /premium command
premium.js
import { MessageFlags } from "discord.js";
import { SunLicense } from "sunlicense";

const sl = new SunLicense({ baseUrl: "https://api.sunlicense.com",
  token: process.env.SUNLICENSE_API_KEY });

// /premium activate key:AX8P-XXXX-XXXX-XXXX
export async function activate(interaction) {
  const key = interaction.options.getString("key", true);
  // the guild is the "machine": a 1-server policy stops sharing
  const r = await sl.validate(key, { host: interaction.guildId });
  if (r.valid) await premiumGuilds.save(interaction.guildId, key);
  await interaction.reply({ flags: MessageFlags.Ephemeral, content: r.valid
    ? "✓ Premium active in this server"
    : `This server has no premium license (${r.data?.code})` });
}
FAQ

Questions, answered.

How do I give premium to one Discord server instead of one user?

Pass the guild ID as the machine ID when you validate the key. The policy's machine limit then counts servers: 1 for a single-server tier, more for a multi-server tier. Store the key with the guild and re-check it every few hours, so a refund or an ended subscription reaches your bot.

Does it work with Patreon?

There's no Patreon integration today. Stripe Checkout, Gumroad memberships and Lemon Squeezy subscriptions suspend the key automatically when the subscription ends, and Ko-fi Shop orders issue keys too. For Patreon supporters you can issue keys from the dashboard or with /license issue in Discord, and revoke them by hand.

Will premium checks use up my plan?

Validate when a key is activated and cache the answer, re-checking every few hours rather than on every command. The Free plan includes 10,000 checks a month, and checks are never refused or slowed because you went over: Owners get an email at 80% and 100%.

Can I sell a self-hosted version of my bot?

Yes. Our discord.js and JDA templates on GitHub check the buyer's key when the bot starts, re-check it every 6 hours, fall back to a signed offline license file if SunLicense can't be reached, and log out when the key is revoked. Each key runs on as many machines as its policy allows. For discord.py, the Python SDK does the same check.

Charge for premium. Keep it paid.

  • Free plan
  • No credit card
  • Cancel any time