How to Automate Minecraft Plugin Licensing with Polymart & BuiltByBit

Stop manually creating license keys for every customer. Learn how to automate key generation and delivery through Polymart and BuiltByBit marketplaces.

The Manual License Problem

You've uploaded your plugin to Polymart or BuiltByBit. A customer buys it. Now what?

Typically, you manually create a license key and send it to them via message or email. They wait. You're asleep. They give up and ask for a refund. Or you forget to send it entirely.

This workflow breaks at scale. Once you've got 10, 20, or 50 customers, managing keys manually becomes a nightmare:

  • Customers wait hours (or days) for their license key
  • You can't scale without hiring someone to manage keys
  • Human error: wrong key, forgotten customer, typo in email
  • No audit trail: you forget who got what, when
  • Refunds are complicated: did you revoke the key? Is it still in use?

There's a better way. Both Polymart and BuiltByBit support automatic license key injection at download time. You set it up once, and every purchase automatically gets a valid, unique license key embedded in the plugin. Zero manual work.

How Marketplace Automation Works

Both Polymart and BuiltByBit use a placeholder system. When a customer downloads your plugin, the marketplace intercepts the file and injects a dynamically generated license key before they receive it.

Polymart: Direct Key Injection

Polymart lets you define a placeholder string in your plugin. When a customer downloads, Polymart replaces that placeholder with a unique license key:

// In your Java code:
String licenseKey = "%%__LICENSE__%%";

// Customer downloads from Polymart
// Polymart sees this placeholder and replaces it with: ABC123-DEF456-GHI789
// They receive:
String licenseKey = "ABC123-DEF456-GHI789";

The license key is unique per purchase and is already inside the JAR they download. No extra step required.

BuiltByBit: Webhook-Based License Generation

BuiltByBit takes a different approach. It supports an "External License Key" placeholder that calls an API endpoint (yours) to fetch the license key dynamically:

// In your Java code:
String licenseKey = "%%__BBB_LICENSE__%%";

// Customer downloads from BuiltByBit
// BuiltByBit sees this placeholder and calls your API:
// GET /api/license/builtbybit?resource=123&buyer=john
// Your API returns: ABC123-DEF456-GHI789
// BuiltByBit injects it and they receive:
String licenseKey = "ABC123-DEF456-GHI789";

This approach gives you more control. Every download triggers a unique key generation, and you have a record of who got what.

The Result

In both cases: customer buys, downloads, and their copy already has a valid license key baked in. No manual intervention. No waiting. No human error.

Setting Up Polymart Automation

Here's how to connect ILicence to your Polymart listing:

Step 1: Get Your Polymart API Key

Head to polymart.org/account and generate an API key. Copy it.

Step 2: Add It to ILicence Dashboard

Go to your ILicence dashboard and navigate to Settings. Paste your Polymart API key. ILicence will now connect to your Polymart account and watch for new purchases.

Step 3: Create a Plugin Entry in ILicence

In your ILicence dashboard, create a new plugin. Set:

  • Name: Your plugin name (e.g., "Super Items")
  • Slug: A unique identifier (e.g., "super-items")
  • Marketplace: Polymart
  • Resource ID: Your Polymart resource ID (find it in your Polymart listing URL)

Step 4: Use the Placeholder in Your Code

In your plugin's onEnable() method, use the Polymart placeholder:

@Override
public void onEnable() {
  String licenseKey = "%%__LICENSE__%%";

  boolean isValid = ILicence.verify(
    this,
    licenseKey,
    "super-items"  // Your plugin slug
  );

  if (!isValid) {
    getLogger().severe("Invalid license. Plugin disabled.");
    Bukkit.getPluginManager().disablePlugin(this);
    return;
  }

  getLogger().info("License verified. Plugin loaded.");
}

Step 5: Upload to Polymart

Package your plugin and upload it to Polymart as usual. Make sure to tell Polymart that you're using license key placeholders so they enable the injection feature for your resource.

That's It!

From now on, every download automatically includes a unique, valid license key. You'll see all generated keys in your ILicence dashboard, including which customer got what, when, and from which IP.

Setting Up BuiltByBit Automation

BuiltByBit's approach is slightly different. Instead of Polymart's direct injection, BuiltByBit calls your API when a download happens. Here's how to set it up:

Step 1: Generate a Webhook Secret in ILicence

In your ILicence dashboard, go to Settings and generate a new webhook secret for BuiltByBit. This is used to sign webhook requests so you can verify they're from BuiltByBit.

Step 2: Create a Plugin Entry in ILicence

Create a new plugin entry:

  • Name: Your plugin name
  • Slug: A unique identifier
  • Marketplace: BuiltByBit
  • Resource ID: Your BuiltByBit resource ID

Step 3: Set Up the BuiltByBit Placeholder

Go to builtbybit.com/placeholders/ and create an "External License Key" placeholder:

  • Name: "License Key"
  • Placeholder: %%__BBB_LICENSE__%%
  • Type: External (API)
  • API Endpoint: https://ilicence.ch/api/license/builtbybit

BuiltByBit will call this endpoint with query parameters for the resource ID and buyer info.

Step 4: Use the Placeholder in Your Code

In your plugin:

@Override
public void onEnable() {
  String licenseKey = "%%__BBB_LICENSE__%%";

  boolean isValid = ILicence.verify(
    this,
    licenseKey,
    "super-items"
  );

  if (!isValid) {
    getLogger().severe("Invalid license. Plugin disabled.");
    Bukkit.getPluginManager().disablePlugin(this);
    return;
  }

  getLogger().info("License verified. Plugin loaded.");
}

Step 5: Upload to BuiltByBit

Upload your plugin to BuiltByBit. In the resource settings, enable the "License Key" placeholder you just created.

Done

Every download now triggers ILicence to generate a unique key. BuiltByBit injects it into the JAR before the customer receives it.

Managing Marketplace Licenses

All auto-generated marketplace licenses appear in your ILicence dashboard. You have full control:

View Purchase History

See every purchase, the buyer's username, when they bought it, and which license key was issued.

Revoke Keys Anytime

If a customer didn't pay (payment failed), or violated the terms, you can revoke their key. It stops working on the next heartbeat check.

Set Expiration Dates

Want to offer monthly or yearly subscriptions? Set expiration dates on generated keys. After expiry, the license stops working.

Verification Logs

Every time a server verifies a license, it's logged. See which servers are using your plugin, how often they verify, and catch suspicious patterns (e.g., a key being used from 50 different IPs).

IP Blacklist

If you detect pirated servers using your plugin, you can add their IPs to a blacklist. Any verification from those IPs will fail immediately.

What's Next

Marketplace automation is just the start. Here are the next steps:

Read the Full Documentation

For complete API references, webhook signatures, and advanced configurations, check out the marketplace guides:

Add Discord Bot for Self-Service

Once you've set up marketplace automation, layer on the Discord bot. Your buyers can use /link to manage licenses directly from Discord, and you can use /revoke and /licenses commands to manage them admin-side. Read the full guide:

Get Started Now

Sign up for ILicence and connect your Polymart or BuiltByBit listing today. Automate your license management in minutes.

Summary

Manual license key management doesn't scale. Both Polymart and BuiltByBit support automatic license injection, and ILicence makes it seamless:

  • Every purchase automatically generates a unique license key.
  • The key is embedded in the JAR before download.
  • Customers get it instantly, no waiting or manual steps.
  • You control everything from your ILicence dashboard.
  • Full audit trail, revocation, IP binding, and expiration dates.

Whether you're selling on Polymart, BuiltByBit, or both, ILicence automates the licensing overhead so you can focus on building great plugins.

Ready to automate your marketplace sales?

Connect your Polymart or BuiltByBit listing to ILicence in minutes. Free tier includes 1 plugin and automatic marketplace integration.