Netlen Cloud WISECP Module

A WISECP server module that provisions NetlenVM (VPS/VDS) via the Netlen panel API v2.

Overview

The Netlen Cloud module provisions and manages NetlenVM virtual servers from WISECP. It talks to the Netlen panel's API v2 (https://{host}/v2, Bearer auth).

Wholesale model: WISECP bills the end customer; the Netlen panel charges the reseller's Netlen balance. No double billing.

WISECP v3.1.9+   PHP 8.1+   API v2

Features

Lifecycle

  • Create (package & custom-spec) — Idempotency-Key = WISECP order id
  • Suspend / Unsuspend (stop / start)
  • Terminate
  • Package upgrade (prorated)
  • Import existing servers (list_vps)

Client-area management

  • Power: Start / Stop / Reboot
  • Console (VNC) — brokered one-time viewer link
  • OS reinstall (OS selectable)
  • Change root password
  • Snapshots & Backups (list / create / restore / delete)
  • Firewall rules (list / add / delete)
  • IP addresses (buy / release / rDNS)
  • Live metrics (CPU / RAM / Disk)

Requirements

  • WISECP v3.1.9 or newer
  • PHP 8.1 – 8.4
  • ionCube Loader v14+ (matching the server's PHP version)
  • PHP extensions: cURL + OpenSSL (JSON is bundled in 8.x)
  • Outbound HTTPS to api.netlen.com.tr:443
  • A Netlen API v2 key (Bearer token)
  • Your WISECP server's public IP allowlisted for the API key

Installation

  1. Copy the module into your WISECP install:
    coremio/modules/Servers/NetlenCloud/
  2. WISECP admin → Servers → add a server:
    • Module: NetlenCloud
    • Hostname: api.netlen.com.tr (host only — no https://, no /v2)
    • Secure: on (https)
    • Access Hash: your Netlen API v2 token
    • IP Address / Username: WISECP requires these fields but the module does not use them. Enter any placeholder (e.g. IP = api.netlen.com.tr, Username = netlen).
  3. Click Test Connection (calls GET /v2/billing/balance).
  4. In the Netlen panel, allowlist this WISECP server's IP for the API key.
  5. Create a product using the NetlenCloud module and fill in the fields below.

Product configuration

Under the product's Module Settings:

FieldDescription
Plan IDNetlen package/plan id (GET /v2/plans). Leave empty for a custom-spec product.
Location IDNetlen location id (GET /v2/locations).
OS Version IDDefault OS version id (GET /v2/operating-systems).
IPv6 CountNumber of IPv6 addresses at creation (default 1).
Hostname is taken from the order options (hostname/domain), otherwise auto-generated. The root password comes from the order or a strong password is generated automatically.

Extra IPv4 (Configurable Option)

Add a Configurable Option named exactly Extra IPv4 (quantity type). At provisioning the module reads the chosen quantity and buys that many IPv4 addresses via POST /v2/servers/{id}/ips (each billed to the reseller balance).

WISECP bills the customer for the option; the module handles the provider side. Extra IPs are purchased after create via the dedicated endpoint so they are charged correctly in both package and custom modes.

Customers can also buy/release IPs one-by-one from the IP Addresses page after ordering.

Operating System (Configurable Option)

The product's OS Version ID is the default OS. To let customers pick an OS at order time — the same way as Extra IPv4 — add a Configurable Option (dropdown) named exactly Operating System.

  • Each option's value must be the Netlen os_version_id. You can find these ids in the product's OS Version ID dropdown under Module Settings, shown as (#id).
  • At create the module reads this choice (Operating System), then falls back to the product default.
  • The Reinstall page already lists OSes live from the API — nothing extra needed there.
In the product Module Settings, Plan / Location / OS Version ID are dropdowns fetched from the API (they fall back to a text input if the API is unreachable).

Backup / Snapshot (sell as a paid addon)

Backups and snapshots are billable on the Netlen side (a monthly protection fee is charged to the reseller balance). To offer them to end customers for a fee, use a WISECP Product Addon.

  1. Add a recurring Configurable Option to the product at your own price, named exactly Backup (same idea as Extra IPv4).
  2. Set product Module Settings → Backup / Snapshot billing to addon.
  3. In that mode the customer cannot use the Snapshot/Backup pages until they buy the Backup addon (buttons hidden, actions rejected). Buying it unlocks them.
  • WISECP bills the end customer for the addon; Netlen charges the reseller → your margin.
  • Module addon hooks: addon_create/addon_unsuspend enable, addon_suspend/addon_cancelled disable.
  • In free mode (default) Snapshot/Backup are always available (the reseller absorbs the cost).

Client area

On the service detail page the customer sees:

  • Home: status + CPU/RAM/Disk charts + spec + IP list
  • Start / Stop / Reboot (by status)
  • Console (VNC)
  • Reinstall — OS selection + optional new password
  • Change Password
  • Snapshots / Backups — create, restore, delete
  • Firewall — add/delete rules
  • IP Addresses — buy, release, rDNS

Admin area

On the service tab (order-detail.php) the admin sees:

  • Power buttons (Start / Stop / Reboot)
  • The server id (entity id)
  • An admin-only new password field (reset password)
  • Status and IP overview

API endpoints

OperationEndpoint
CreatePOST /v2/servers
Suspend / UnsuspendPOST /v2/servers/{id}/actions/stop · start
TerminateDELETE /v2/servers/{id}
Upgrade packagePOST /v2/servers/{id}/actions/upgrade
ReinstallPOST /v2/servers/{id}/actions/reinstall
Reset passwordPOST /v2/servers/{id}/actions/reset_password
Console (VNC)GET /v2/servers/{id}/console
SnapshotsGET/POST /v2/servers/{id}/snapshots · restore · delete
BackupsGET/POST /v2/servers/{id}/backups · restore · delete
FirewallGET · POST/PATCH/DELETE /v2/servers/{id}/firewall/rules
IPsGET · POST · DELETE · PUT /v2/servers/{id}/ips
MetricsGET /v2/servers/{id}/metrics
CatalogGET /v2/plans · /locations · /operating-systems
Test ConnectionGET /v2/billing/balance

Security

  • Bearer auth: token only in the Authorization header; never in URLs or logs.
  • IP allowlist: the API key is restricted to the WISECP server's IP.
  • Password policy: min 8 chars with upper, lower, digit and symbol.
  • Idempotency: create is keyed by order id; retries never double-provision.
  • Errors are mapped to customer-safe messages; full detail goes to the WISECP module log (save_log).

Troubleshooting

SymptomFix
Test Connection failsEnter Hostname as host only (api.netlen.com.tr); check the Access Hash and the IP allowlist.
"API authentication failed"The Access Hash (Bearer token) is wrong or expired.
"IP not allowlisted"Add the WISECP server's IP to the API key in the Netlen panel.
Create "balance insufficient"The reseller Netlen balance is too low.
Extra IP did not arriveCheck the module log; if balance/limit is exceeded the IP purchase stops (the server still provisions).

Support

API documentation: https://api.netlen.com.tr/v2/docs

Reseller panel: https://panel.netlen.com → Reseller → API