WHBMP

Other plugin types

Oct 25, 2026

Every module class has the static slug(), name() and description(), and a constructor that receives the saved record it talks to (the Server, Registrar, AiProvider, FraudCheckProvider or CaptchaProvider). Modules with credentials add a static fields() (label, type, placeholder, optional, help); the admin screen is built from it and the values are saved encrypted. List the class under provides in plugin.json using the type name in the first column.

Every method answers an array. Failures use ['success' => false, 'message' => '…']; the message is shown to the admin. Calls made through the module layer are written to System Logs automatically.

Type Interface Methods
server ServerModuleInterface testConnection, createAccount, suspendAccount, unsuspendAccount, terminateAccount, listPackages, generateLoginUrl, generateLoginUrlFor, listRealAccounts, getUsageStats
compute ComputeModuleInterface testConnection, provision, reboot, start, stop, reinstall, terminate, listOsTemplates, listPlans, generateConsoleUrl, getStatus
domain_registrar DomainRegistrarModuleInterface fields() plus the domain calls of the registrar interface it extends
ai_provider AiProviderInterface fields, testConnection, complete($systemPrompt, $userPrompt)
fraud_check FraudCheckModuleInterface fields, testConnection, check($ipAddress, $context)
captcha CaptchaModuleInterface fields, testConnection, verify($token, $remoteIp)
payment_gateway PaymentGatewayModuleInterface See Building a payment gateway plugin
addon AddonInterface See Building a plugin

The interfaces live in app/Plugins/Contracts/; each one's comments describe the arguments and what the array must contain. The bundled plugins (plugins/cpanel-whm, plugins/directadmin, plugins/plesk, plugins/resellerclub, plugins/paypal, plugins/stripe) are working examples.

Powered by WHBMP