The Paymenter extension (version 0.1.0) is a server extension. It creates the customer's panel account and server, follows suspensions, terminations and upgrades, adds a Server tab to the service page and keeps the customer's email address in step with the panel.
Requirements#
- Paymenter 1.x on PHP 8.3 or later.
- The panel reachable over HTTPS with a valid certificate.
- A panel API key as described in API key for a billing system.
Install#
- Get the package
vmstack-paymenter-<version>.zip(see Integrations). From the source,php build.phpwrites it todist/. - Unpack it into
<paymenter>/extensions/Servers/, so thatextensions/Servers/VMStack/VMStack.phpexists. - Clear Paymenter's caches:
cd /var/www/paymenter
php artisan optimize:clear
- If your theme is built with Tailwind, rebuild its assets (
npm run build) so the Server tab's classes are included.
Connect to the panel#
- Admin › Servers › New, extension VMStack.
- Fill in Panel address (such as
panel.example.com) and API key (vmk_…, stored encrypted). - Optionally tick Log API requests to write masked requests to Paymenter's log at debug level.
- Press Test. It calls the panel's
GET /meand shows why it failed: a user's key, or missing scopes.
Product setup#
In Admin › Products, choose the VMStack server and fill in:
| Setting | Default | Meaning |
|---|---|---|
| Plan | – (required) | the panel plan |
| Placement | – (required) | a location, node group or node (groups and nodes only for an administrator's key with infrastructure:read) |
| Default image | – | needed unless Customer sets up the server is on |
| Hostname pattern | empty | {serviceid}, {clientid}, {domain}. Empty: the hostname typed at checkout, else the panel picks one |
| Customer sets up the server | off | the server waits for the customer (customer setup) |
| Send welcome password | off | the root password is passed to the "created" mail data (not stored); needs servers:secrets |
| Allow the client to create servers in the panel | off | ticks May create and delete servers on new accounts |
| Delete the panel account on terminate | off | deletes the panel account after its server is deleted |
| Single sign-on | on | the Open control panel button |
| Bind sign-in links to the client's address | on | links work only from the client's address |
| Reseller for new accounts (administrator keys) | empty | panel ID of the reseller new accounts go under |
If the panel cannot be reached, the lists become text fields such as "Plan (ID)".
Checkout fields and options#
- Hostname (optional, a full host name).
- SSH public key (optional, one line; ed25519, RSA, ECDSA or security-key types). Not asked when the customer sets up the server. Without a key SSH password login is turned on.
Configurable options are read by their environment variable: plan, location, node_group, operating_system (or os, image), application (a one-click application slug, or none) and extra_ipv4 (a quantity). The location wins over the node group, and both over the product's placement.
The extension adds the service property VMStack server ID; to link an existing server, put its ID there.
What the extension does#
| Paymenter | Panel |
|---|---|
| Create | finds or creates the client's account, creates the server, adds extra IPv4. A step left undone after the server exists is logged ("the server was made, but not everything is done yet"). |
| Suspend / Unsuspend | suspends ("Overdue invoice") / lifts the suspension |
| Terminate | deletes the server, optionally the account |
| Upgrade | upgrades the plan (downgrades refused), re-syncs extra IPv4 |
| User email changed | the linked panel account's email is updated |
Client area#
The service page gets a Server tab with the same content as the other modules (status, addresses, traffic; Start, Shut down, Reboot, Power off; rescue with Show password; reverse DNS; Reinstall; Reset root password; Set up your server), plus the buttons Open control panel (when single sign-on is on) and Console. Actions on an inactive service are refused ("This service is not active.").
Limitations#
- Client-area actions are sent with the key's own rights, not on behalf of the customer, so the plan's customer permissions and reinstall limits are not applied in the Server tab (they still apply in the panel).
- No admin view of the server in Paymenter (Paymenter has no hook for one).
- Only extra IPv4 as an add-on; no port forwards in the client area.
- No usage billing.
- Extra IPv4 can be added only once the server is built.