licensepanel.org
RESELLER REST API v1 · JSON OVER HTTPS

licensepanel.org API & Module Docs

Base URL: https://www.licensepanel.org/api/v1

1. Authentication (Sandbox & Live)

Use rk_test_... for free Sandbox testing (no wallet debit, supports simulate_status) or rk_live_... for Production fulfillment.

Method A: HMAC-SHA256 (Recommended)

Sign timestamp + "." + raw_json_body (empty string for GET) with your api_secret. Max clock skew: 300s.

X-RK-Api-Key: rk_test_...
X-RK-Timestamp: 1762345678
X-RK-Signature: hmac_sha256(timestamp + "." + raw_body, api_secret)
Method B: Direct Secret or Bearer Token

Send key & secret directly in headers or as a colon-separated Bearer token.

# Header Pair
X-RK-Api-Key: rk_test_...
X-RK-Api-Secret: rks_test_...

# Or Bearer Token
Authorization: Bearer rk_test_...:rks_test_...

2. API Endpoints Reference

GET /api/v1/account

Returns your reseller profile, current tier, currency, wallet balance, and CID points.

{
  "success": true,
  "mode": "live",
  "account": {
    "customer_id": 12,
    "email": "[email protected]",
    "tier": "gold",
    "currency": "USD",
    "wallet_balance": 250.00,
    "cid_points": 15
  }
}
GET /api/v1/account/transactions?per_page=20&page=1

Paginated wallet transactions (credits, order debits, refunds, crypto deposits). per_page accepts 1–100.

GET /api/v1/products?q=Windows · /api/v1/products/{productId}

Returns active products with wholesale prices already adjusted for your reseller tier discount. Filter with optional q (name or SKU).

POST /api/v1/orders

Places an idempotent license order. Reusing client_reference_id in the same mode returns the original order without double-charging.

// Request Body
{
  "product_id": 1,
  "quantity": 1,
  "extended_warranty": false,
  "instant_only": true,
  "client_reference_id": "ord-1001",
  "webhook_url": "https://your-site.com/webhook"
}
// Response (200 OK)
{
  "success": true,
  "mode": "live",
  "order_id": 45,
  "status": "complete",
  "total": 8.50,
  "items": [
    { "product_id": 1, "quantity": 1, "keys": ["XXXXX-YYYYY-ZZZZZ-11111-22222"] }
  ]
}
GET /api/v1/orders?per_page=20 · /api/v1/orders?client_reference_id=ord-1001 · /api/v1/orders/{orderId}

List orders, look up by client_reference_id, or fetch a single order with allocated license keys.

POST /api/v1/orders/{orderId}/replay-webhook

Re-queues the order.completed webhook delivery for an order with a configured webhook_url.

POST /api/v1/cid/generate · GET /api/v1/cid/history

Generates a Microsoft Confirmation ID (CID) from a 54-digit or 63-digit Installation ID ({"iid": "..."}). Consumes 1 CID point in live mode.

3. Error Codes

Status Codes
401 missing_api_key, invalid_api_key, timestamp_expired, invalid_signature
403 account_suspended, ip_not_allowed
404 product_not_found, order_not_found
422 Validation errors, insufficient balance, out of stock

4. Webhooks & Retries

When webhook_url is provided on an order, we send an HTTPS POST request signed with X-RK-Webhook-Signature. Failed deliveries retry automatically with exponential backoff (1m, 5m, 15m, 1h, 6h; up to 6 attempts).

Need to test locally or automate? Download our Postman Collection (v2.1) with automatic HMAC-SHA256 signing.

White-Label Module

5. WHMCS Module (v3.0) Guide

Download ZIP
  1. Upload Files: Extract licensepanel-whmcs-module-v3.0.zip and upload the includes/ and modules/ folders into your WHMCS root directory.
  2. Activate Addon: In WHMCS Admin, go to System Settings → Addon Modules, activate Digital License Manager, and click Configure.
  3. Enter Credentials & Profit Rules: Paste your API Key and API Secret from API Keys. Choose your Profit Mode (Percentage %, Fixed $, or Both) and enable Auto-Hide Out-of-Stock Products.
  4. Import Products in 1 Click: Open Addons → Digital License Manager → Import & Sync Catalog. Search or filter by category, then click + Import on any single product or Import Entire Category (auto-creates the WHMCS Product Group).
  5. Install White-Label Emails: Go to tab 5. Email Templates and click Install / Update 6 Default Templates, then Auto-Match Best Template per Product.
  6. Automatic Fulfillment & Stock Sync: WHMCS cron automatically delivers delayed keys, retries temporary failures, and hides out-of-stock products from your cart.
White-Label Plugin

6. WordPress / WooCommerce (v3.0)

Download ZIP
  1. Upload & Activate: In WordPress Admin, go to Plugins → Add New → Upload Plugin, upload license-manager-woocommerce-v3.0.zip, and click Activate.
  2. 1-Click WooCommerce Installer: If WooCommerce is not installed yet, click the built-in Yes, Install & Activate WooCommerce Automatically button on the top notice.
  3. Connect API: Open License Manager → 5. Settings & Logs, paste your API Key and API Secret, and save.
  4. Launch Store in 1 Click: Go to 1. Overview → Launch My License Store in 1 Click to import all in-stock products, create WooCommerce categories, and apply your retail markup automatically.
  5. Self-Service GetCID Page (Optional): Click Create Self-Service GetCID Page (or place [license_manager_cid] on any page) so customers can convert Installation IDs to Confirmation IDs on your site.
  6. Instant Delivery & Auto-Hide: Customers see their license keys with a 1-click Copy button on the Thank You page and in automated emails. Out-of-stock products are hidden automatically every 10 minutes via WP-Cron.
Full Tutorial

7. WHMCS Module — Complete Reference

Requirements

  • WHMCS 8.x, PHP 8.0+ with curl and json extensions.
  • WHMCS system cron running every 5 minutes (php -q /path/to/whmcs/crons/cron.php).
  • An active reseller account with a positive wallet balance and an API Key / Secret pair.

Folder Layout

includes/hooks/license_manager_cron.php   ← cron: delayed keys, retries, stock sync
modules/addons/license_manager/            ← admin dashboard (import, orders, CID, emails, wallet)
modules/servers/license_manager/           ← provisioning module (orders keys on activation)

Addon Settings

  • API Key / API Secret: create them in Dashboard → API Keys. Use a sandbox key first, then switch to a live key.
  • API Base URL: leave as https://www.licensepanel.org/api/v1.
  • Profit Mode: Percentage (wholesale × (1 + %)), Fixed (wholesale + $), or Both.
  • Auto-Hide Out-of-Stock / Auto-Sync Prices: applied on every WHMCS cron run.

Manual Product Setup (without Import)

  1. Create a product in System Settings → Products/Services (type: Other).
  2. On the Module Settings tab choose Digital License Manager.
  3. Pick the product from the live dropdown, set Quantity per Order, and tick Instant Stock Only if you never want delayed orders.
  4. Select Automatically setup the product as soon as the first payment is received.
  5. Optional: fill Override API Key / Secret to bill this product to a different reseller account.

Bundles with Configurable Options

Choose Import mode: Single Bundle + Options to create one WHMCS product with a License Edition dropdown. Each option is stored as <product_id>|<name>; the module reads the ID before the pipe when provisioning. Do not rename the number part.

Order Lifecycle

  1. Client pays → WHMCS runs CreateAccount → module calls POST /orders with client_reference_id = whmcs-srv-<serviceid>.
  2. Keys are saved to the License Key custom field, the service becomes Active, and the assigned email template is sent.
  3. If stock is delayed, the service notes hold License Order ID: #… and cron delivers the keys when ready.
  4. If balance or stock is temporarily missing, notes are marked [RETRY_PENDING] and cron retries automatically.

Admin Service Buttons

  • Sync / Fetch Key: re-reads the order from the API and stores any new keys.
  • Resend License Email: sends the stored key again with the product’s template.

Email Template Variables

Templates use standard WHMCS merge fields plus {$service_license_key}. Keep the company name in {$company_name} so emails stay white-label.

Troubleshooting

  • “API Disconnected”: check Key/Secret, server clock (HMAC allows ±300s), and that outbound HTTPS is allowed.
  • Dropdown shows “Configure API Key”: save the addon settings first, then reload Module Settings.
  • Service stuck in Pending: open Addons → Digital License Manager → Orders & Services and click Provision / Retry; check Utilities → Logs → Module Log.
  • Insufficient balance: top up in Wallet; pending services retry on the next cron.

Security Checklist

  • Restrict addon access to trusted admin roles only (Addon Modules → Access Control).
  • Add your WHMCS server IP to the API key whitelist.
  • Rotate the API Secret if an admin leaves or the server is compromised.
Full Tutorial

8. WooCommerce Plugin — Complete Reference

Requirements

  • WordPress 6.0+, PHP 8.0+, WooCommerce (the plugin can install it for you).
  • HTTPS site with working WP-Cron. On low-traffic sites add a real cron: */5 * * * * wget -q -O - https://your-site.com/wp-cron.php?doing_wp_cron.
  • Pretty permalinks enabled so /wp-json/ works for webhooks.

Admin Tabs

  • 1. Overview: wallet, tier, CID points, 1-click store launch, GetCID page creator.
  • 2. Import & Sync: search the live catalog, import selected products with a markup, sync prices and stock now.
  • 3. Orders: last 25 WooCommerce orders with a Fulfill / Retry button.
  • 4. GetCID Tool: convert an Installation ID to a Confirmation ID and view history.
  • 5. Settings & Logs: API credentials, markup, auto-hide, auto-sync, fulfil trigger, email texts, last 25 API log lines.

Linking a Product Manually

  1. Edit any WooCommerce product and find the Digital License Automation box in the sidebar.
  2. Select the product from the live dropdown and set Keys per Quantity (e.g. 5 for a 5-PC pack).
  3. Choose the Activation Guide shown to the customer (Online, Phone/CID, Server, BIND, Microsoft 365).
  4. Mark the product Virtual so no shipping is requested.

Order Lifecycle

  1. Fulfill Orders On: Order Completed (manual review) or Payment Received (fully automatic).
  2. The plugin calls POST /orders with client_reference_id = wc-ord-<order>-item-<item>.
  3. Keys are saved on the order item, shown on the Thank You page and My Account, and emailed with the activation guide.
  4. Delayed orders are completed by the webhook or by the 10-minute WP-Cron poll.

Webhook

The endpoint https://your-site.com/wp-json/license-manager/v1/webhook is sent automatically with every order. The plugin never trusts keys inside the webhook body: it re-fetches the order through the signed API before saving keys, so forged requests cannot inject keys.

Self-Service GetCID Page

Shortcode [license_manager_cid] lets customers generate a Confirmation ID. Each request uses one CID point from your account, so the form is limited to 5 requests per hour per visitor IP. Put the page behind a login (e.g. a members-only page) if you want stricter control.

Email Placeholders

The email subject supports {product_name}, {site_name} and {order_id}. The footer is plain text.

Troubleshooting

  • “Not Connected”: re-check Key/Secret and server time; see Settings & Logs for the exact API error.
  • Keys not delivered: open the order notes, then click Fulfill / Retry in 3. Orders.
  • Out-of-stock items still visible: confirm WP-Cron runs, or click Sync Prices & Hide Out-of-Stock Now.
  • Webhook 404: enable pretty permalinks (Settings → Permalinks → Post name).

Security Checklist

  • Only administrators (manage_options) can open the plugin pages.
  • Add your web server IP to the API key whitelist and keep WordPress, WooCommerce and PHP updated.
  • Rotate the API Secret if a WordPress admin account is compromised.