Java & Minecraft Plugins SDK
Zero Dependencies - Java 8+Designed specifically for Paper, Spigot, Purpur, Velocity, and BungeeCord servers. Drop a single class into your plugin to enforce licenses and prevent server theft with automatic plugin disabling on rejection.
Offline Grace Period (48 Hours)
When online verification succeeds, Devlio issues a cryptographically signed lease token valid for 48 hours. If the customer server experiences internet downtime or Devlio undergoes scheduled maintenance, the plugin continues operating smoothly without interrupting active players.
1. Quick Drop-in Setup
Copy DevlioLicense.java into your plugin project under package store.devlio.license.
package com.example.myplugin;
import org.bukkit.plugin.java.JavaPlugin;
import store.devlio.license.DevlioLicense;
public final class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
saveDefaultConfig();
String licenseKey = getConfig().getString("license-key", "");
// Two-line automatic verification and enforcement
DevlioLicense.protect(this, licenseKey, "my-plugin-slug");
getLogger().info("Plugin features loaded successfully!");
}
}
2. Checking for Plugin Updates
DevlioLicense lic = DevlioLicense.builder()
.licenseKey(getConfig().getString("license-key"))
.projectSlug("my-plugin-slug")
.build();
DevlioLicense.UpdateInfo update = lic.checkUpdate(getDescription().getVersion());
if (update.isUpdateAvailable()) {
getLogger().warning("[Devlio] New version available: v" + update.getLatestVersion());
getLogger().warning("[Devlio] Download at: " + update.getDownloadUrl());
}
PHP SDK for Paymenter & Pterodactyl
PHP 7.4+ or 8.0+Lightweight client for Paymenter billing extensions, Pterodactyl panel addons, WordPress plugins, and custom PHP web applications.
1. Single-File Drop-in Usage
Include DevlioClient.php directly without needing Composer:
<?php
require_once __DIR__ . '/DevlioClient.php';
use Devlio\DevlioClient;
$client = new DevlioClient();
// Enforce license on domain; terminates with HTTP 403 if invalid
$client->enforce(
'DEV-XXXX-XXXX-XXXX',
'my-extension-slug'
);
// Addon execution continues here
2. Paymenter Extension Integration
use Devlio\DevlioClient;
$client = new DevlioClient(null, storage_path('app/.devlio_lease.json'), 48);
$res = $client->verifyLicense(config('paymenter.addon.key'), 'paymenter-gateway-slug');
if (!$res['valid']) {
\Log::error('[Devlio] License invalid: ' . $res['message']);
return false;
}
Node.js SDK & Discord Bot Protection
npm install devlio-sdkProtect Discord bots, Express web apps, Electron desktop software, and Node.js microservices with devlio-sdk.
1. Installation
npm install devlio-sdk
2. Protecting a Discord Bot (discord.js)
const { Client, GatewayIntentBits } = require('discord.js');
const DevlioLicense = require('devlio-sdk');
const license = new DevlioLicense('my-discord-bot-slug');
async function startBot() {
const licenseKey = process.env.DEVLIO_LICENSE_KEY;
console.log('[Devlio] Verifying license...');
const res = await license.verify(licenseKey);
if (!res.valid) {
console.error(`[Devlio] License rejected: ${res.status}`);
process.exit(1);
}
console.log('[Devlio] License valid! Starting Discord client...');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.once('ready', () => {
console.log(`Bot logged in as ${client.user.tag}`);
});
client.login(process.env.DISCORD_BOT_TOKEN);
}
startBot();
3. Feature Flags & Entitlements
Check if the customer purchased a specific feature tier (e.g. Pro, 4K export, or unlimited exports):
if (license.hasFeature('export_4k')) {
// Allow high-res export
}
const tier = license.getMetadata('tier', 'standard');
console.log(`Current license tier: ${tier}`);
4. Webhook Signature Verification
Verify Devlio webhook payloads in Express / Fastify to handle real-time order and license events securely:
const { Webhooks } = require('devlio-sdk');
app.post('/webhooks/devlio', (req, res) => {
try {
const event = Webhooks.constructEvent(
req.body,
req.headers['x-devlio-signature'],
process.env.DEVLIO_WEBHOOK_SECRET
);
if (event.event === 'license.revoked') {
console.log(`License ${event.license_key} was revoked.`);
}
res.json({ received: true });
} catch (err) {
res.status(400).send(`Webhook Error: ${err.message}`);
}
});
Python SDK & Discord Bot Protection
pip install devlioProtect python scripts, discord.py bots, FastAPI backends, and PySide desktop software.
1. Installation
pip install devlio
2. Protecting a Discord Bot (discord.py)
import os
import sys
import discord
from devlio import DevlioLicense
lic = DevlioLicense("my-python-bot-slug")
res = lic.verify(os.getenv("DEVLIO_LICENSE_KEY"))
if not res.get("valid"):
print(f"[Devlio] License check failed: {res.get('status')}")
sys.exit(1)
print("[Devlio] License validated! Starting bot...")
bot = discord.Client(intents=discord.Intents.default())
@bot.event
async def on_ready():
print(f"Logged in as {bot.user}")
bot.run(os.getenv("DISCORD_BOT_TOKEN"))
3. Feature Flags & Entitlements
Verify if a license key includes specific features or subscription modules:
if lic.has_feature("analytics_export"):
export_report()
plan = lic.get_metadata("tier", default="starter")
print(f"Customer plan: {plan}")
4. Webhook Signature Verification
Verify and parse incoming Devlio webhook events in FastAPI or Flask:
from fastapi import FastAPI, Request, HTTPException
from devlio import Webhooks, WebhookSignatureError
app = FastAPI()
@app.post("/webhooks/devlio")
async def devlio_webhook(request: Request):
payload = await request.body()
sig = request.headers.get("X-Devlio-Signature")
secret = os.getenv("DEVLIO_WEBHOOK_SECRET")
try:
event = Webhooks.construct_event(payload, sig, secret)
except WebhookSignatureError as e:
raise HTTPException(status_code=400, detail=str(e))
if event.get("event") == "order.completed":
handle_new_order(event)
return {"status": "ok"}
REST API & cURL Reference
JSON APIAny programming language (C#, Go, Rust, Ruby, C++) can interact directly with the Devlio License REST endpoints.
1. Verify License Endpoint
curl -X POST "https://devlio.store/api/v1/licenses/verify" \
-H "Content-Type: application/json" \
-d '{
"license_key": "DEV-XXXX-XXXX-XXXX",
"project_slug": "my-plugin-slug",
"domain": "play.myserver.net"
}'
2. Check Project Updates Endpoint
curl -X GET "https://devlio.store/api/v1/projects/my-plugin-slug/update-check?current_version=1.0.0"
Want to test your keys live before writing code?
Use the Interactive License Tester Playground to simulate activations and checks.