License & billing API

Connect WHMCS or your own billing system to create, suspend, renew and terminate licenses automatically.

Authentication

Billing endpoints need an API token created by an administrator under Admin → API Tokens. Send it as a Bearer token. Tokens can be limited to specific IP addresses.

curl https://flametop-up.top/api/v1/admin/plans \
  -H "Authorization: Bearer hgk_your_token" \
  -H "Accept: application/json"

Base URL: https://flametop-up.top/api/v1. All responses are JSON with a success field.

List plans

GET /admin/plans — returns active plans with their slug, price, billing period and account limit (null = unlimited).

Create a license

POST /admin/licenses

FieldDescription
emailCustomer email. The customer account is created if it does not exist.
planPlan slug, e.g. yearly.
nameOptional customer name.
ipOptional server IP to bind immediately.
curl -X POST https://flametop-up.top/api/v1/admin/licenses \
  -H "Authorization: Bearer hgk_your_token" -H "Accept: application/json" \
  -d email=customer@example.com -d plan=yearly

{"success":true,"license":{"key":"HOSTGI-ABCDE-FGHJK-LMNPQ-RSTUV","status":"active","plan":"yearly",…}}

Manage a license

RequestAction
GET /admin/licenses/{key}Status, plan, IP and expiry
POST /admin/licenses/{key}/suspendSuspend (optional reason)
POST /admin/licenses/{key}/unsuspendReactivate
POST /admin/licenses/{key}/renewExtend by one plan period
POST /admin/licenses/{key}/change-planChange plan (plan slug)
POST /admin/licenses/{key}/reset-ipClear the server binding
POST /admin/licenses/{key}/terminateTerminate permanently

Server endpoints

These are called by the installer and by installed panels. They need no token; the license key and the caller's IP address are checked.

RequestPurpose
POST /license/activateBind a license to the calling server (license_key, hostname, os)
POST /license/verifyPeriodic check (license_key, panel_version, accounts_used)
GET /release/latestLatest published version and checksum
POST /release/downloadDownload the release (activated license required)
GET /public-keyEd25519 public key for verifying signed responses

Verifying responses

License responses include signed.data (a JSON string) and signed.signature (base64 Ed25519). Panels verify the signature with the public key so a fake license server cannot unlock them.

$ok = sodium_crypto_sign_verify_detached(
    base64_decode($resp['signed']['signature']),
    $resp['signed']['data'],
    base64_decode($publicKey)
);