Server rental billing
This optional module lets each panel operator receive recurring payments from customers into the operator's own Stripe or PayPal account. It is independent of SteamCMD Panel licensing. Publisher keys, licensing-service secrets and the publisher's Stripe account are not involved in rental transactions.
What is included
- Administrator → Rental billing: provider credentials, sandbox/live mode, grace period, fixed monthly/annual account plans, customer enrollment, subscription status, reconciliation and a local audit trail.
- Customer → My subscription: plan selection, hosted payment, refresh and provider subscription management.
- Each paid plan grants an installation allowance, not CPU/RAM or disk quotas. Existing administrator account caps can reduce that allowance. The panel's own licensed installation limit always remains in force.
- Only accounts explicitly enrolled by an administrator require payment. Existing accounts retain their normal permissions. Billing starts disabled.
- Self-service account signup is not included. Operators create customer accounts in Users & access, and customers change their temporary passwords.
Operator setup
- Install the core update. Open Administration → Rental billing.
- Enter the public HTTPS root address of THIS panel, such as
https://games.example.com. Hosted checkout returns customers to this address. - Choose Sandbox / test. Enter the operator's provider credentials below. Blank credential fields retain existing values for the SELECTED mode. Saved secrets are write-only through the UI. Nothing is sent to the publisher.
- Configure one or both providers and their webhook destinations. Enable the desired provider for new purchases. Disabling new purchases does not cancel existing subscriptions; their webhooks must remain enabled.
- Add verified account plans. Create a separate monthly and annual plan if both billing intervals are offered. Enter the corresponding provider IDs. Prices are fetched from the provider. If a plan supports both providers, amount, currency and interval must match. The purchased server allowance is stored as a snapshot; hiding a plan affects new purchases only.
- Enable rental billing and enroll an existing customer account. Enrollment enables self-service install permission, but no capacity is granted before confirmed payment. Check that the account's administrator cap is unset or high enough for the sold plan. Also check the host's capacity and panel license limit before advertising plans.
- Test with a customer account, not the panel administrator. Verify checkout, provider notification, renewal/cancellation and capacity. Expiry must block new installations while the customer's existing servers stay manageable.
- For production select Live, provide LIVE credentials and webhook IDs, and add LIVE plans. Test-mode plans, credentials and records remain separate; they are never used to authorize live rental allowances. Customers must complete live checkout to acquire a live paid allowance. Do not submit sandbox payment details on live checkout pages.
Supported currencies in the first release: USD, EUR, GBP, CAD, AUD, NZD and CHF. They use two decimal places. Trials, metered/usage prices, setup fees, finite installment plans, quantity changes and in-place plan switching are not included. Create new plans for new terms. Configure provider customer portals for payment method updates and cancellation, not external plan switching.
Stripe
Use the operator's Stripe account. In that account create fixed recurring prices in Product catalog with rental-specific names and descriptions, and copy each price_... ID. Configure a secret or restricted API key for the selected mode (sk_test_, rk_test_, sk_live_ or rk_live_). Restricted keys need read access to Prices, Checkout Sessions, Subscriptions and Invoices, and write access to Checkout Sessions and Customer Portal sessions. Use a key whose granted permissions cover the integration. The module calls Stripe API version 2025-03-31.basil explicitly.
Create a webhook destination on the panel address shown in Rental billing:
- test:
https://YOUR-PANEL/webhooks/rentals/test/stripe - live:
https://YOUR-PANEL/webhooks/rentals/live/stripe
Subscribe to:
checkout.session.completed checkout.session.async_payment_succeeded checkout.session.async_payment_failed checkout.session.expired customer.subscription.created customer.subscription.updated customer.subscription.deleted invoice.paid invoice.payment_failed
Save its whsec_... signing secret in the rental settings for that mode. This is separate from any webhook used to sell SteamCMD Panel licenses. Configure Stripe's Customer Portal in the operator's account so customers can update payment methods and cancel. Configure Stripe retry/email behavior there too. No card details pass through the manager.
PayPal
Use the operator's PayPal Business account. In PayPal Developer Dashboard create an app for that account, selecting Sandbox or Live as appropriate. Store that app's Client ID and Secret in rental settings. Create an active recurring subscription plan in PayPal Subscriptions (where offered) or using PayPal's Billing Plans API. Enter its P-... plan ID when adding the local account plan. Plans must have one unlimited REGULAR billing cycle with interval MONTH or YEAR, interval count 1, a positive fixed price, no quantity selection, no trials and no setup fee. The panel verifies the plan before publishing it.
Under that app create a webhook using the address shown by the panel:
- test:
https://YOUR-PANEL/webhooks/rentals/test/paypal - live:
https://YOUR-PANEL/webhooks/rentals/live/paypal
Subscribe to:
BILLING.SUBSCRIPTION.ACTIVATED BILLING.SUBSCRIPTION.UPDATED BILLING.SUBSCRIPTION.CANCELLED BILLING.SUBSCRIPTION.SUSPENDED BILLING.SUBSCRIPTION.EXPIRED BILLING.SUBSCRIPTION.PAYMENT.FAILED PAYMENT.SALE.COMPLETED
Save the PayPal webhook's ID (not an invented signing secret) in the matching mode's rental settings. Sandbox buyers use a distinct sandbox personal account, not the sandbox merchant account receiving the payment. PayPal signature verification is performed through PayPal's authenticated verification API; network failures do not grant an allowance. Customers manage/cancel subscriptions in their own PayPal automatic-payments page.
PayPal ACTIVE alone is insufficient: a confirmed positive last payment is required. Coverage is bounded by the last paid monthly/annual cycle as well as the next billing date. A failed renewal cannot extend access merely by advancing the next billing date. Calendar-month boundaries can be conservative relative to PayPal's billing anchor; the configurable grace period covers small date and notification differences. Review unusual billing adjustments manually.
Customer flow
The operator creates an account, the customer changes its password, and the operator enrolls that account in rental billing. My subscription lists available plans and enabled providers. Choosing a provider opens its hosted checkout. Verified webhooks and a fresh provider lookup activate the paid allowance. Returning from checkout does not activate anything on its own. Refresh subscription can recover missed notifications. Checkout returns through a public navigation page before opening My subscription, so a valid SameSite=Strict login session can resume after the external payment page. Expired sessions require sign-in and then return to My subscription. The public return page never grants payment access or exposes private account data.
One current subscription/order per customer per mode is allowed, across both providers. Cancel unpaid checkout asks the provider to expire/cancel an abandoned order before another checkout can be started. Provider rejection retains the order for review; it never blindly releases an uncertain payment. PayPal may require merchant review for subscription states it does not permit canceling. Repeated checkout clicks reuse the reserved order and bound checkout. Uncertain unbound orders older than four hours require operator review rather than risking another recurring subscription. The operator checks the provider dashboard using the displayed order reference. If checkout/subscription was created, use Link existing checkout and enter its provider ID; ownership and order metadata are verified remotely before linking. If the provider confirms nothing was created, Release reviewed order records the explicit operator review and permits a fresh checkout. There is no automatic blind retry after a provider idempotency window.
Automatic and manual behavior
Providers collect recurring payments and retry failed payments according to the operator's provider settings. Verified notifications trigger fresh provider lookups, update subscription status and derive the account allowance. Duplicate events are ignored; provider state is retrieved again rather than trusting an old event's embedded subscription state. Customer/admin Refresh retrieves state again if notifications were missed. No automatic polling worker is installed. A grace period of 0–14 days is measured from the last confirmed paid-through date, not from the latest failed refresh. A stale allowance expires without requiring a webhook. Canceled subscriptions retain their already paid-through allowance.
Expiry blocks new installations; it never stops/deletes game servers, revokes existing file/console access, or erases game data. Operators handle hosting suspension, data retention, refunds, disputes and exceptional plan changes. Removing enrollment, disabling an account, hiding a plan or disabling rental billing does not cancel payments at Stripe/PayPal. Cancel subscriptions through the provider when offboarding. The operator is responsible for customer support, tax settings and provider account maintenance. No publisher commission is added.
Storage and updates
Private state is rental-billing/rentals.sqlite3 beside the dashboard's data directory (/var/lib/gmserver/game-manager/rental-billing on managed installs). The folder is 0700 and database is 0600, owned by the dashboard service user. Provider secrets are stored there, never inside application archives, public files, API responses or billing audit details. Authorized operating-system administrators still control their host; this is not hardware-backed encryption.
Back up that database securely together with the panel accounts database. Stop the dashboard for a consistent offline copy, or use SQLite's backup API. Billing backups contain provider secrets and customer references. Preserve file ownership and permissions on restore. Core updates retain the rental directory; it is outside the core integrity snapshot so incoming webhooks cannot make an otherwise valid software update falsely report that application files changed. No account schema migration or new Python dependency is required.
Before reverting to a core version without rental billing, stop new sales and plan the billing/access transition. Rolling back application code does not cancel provider subscriptions.
Validation status
The implementation is staged and disabled by default. Tests use mock provider responses and signed test notifications. Live payment, real PayPal app scopes, provider portal settings and renewal behavior must also be tested against the operator's sandbox accounts before production use. Do not describe mock tests as successful real payments. No operator or publisher credentials are bundled.
Shared customer RAM
Open **Administration → RAM controls**. The update starts with enforcement off, 4 GiB soft and 5 GiB hard per server slot, and a host rental budget of **0**. You can save settings now and choose the host budget later. No game is adopted or restarted by saving disabled controls.
Before enabling, choose a total hard budget that leaves enough RAM outside it for Webuzo, the panel, administrator games and other services. The page shows physical and currently available RAM, but available RAM is only a snapshot. At least 4 GiB must remain outside the configured rental budget; your actual host may need substantially more. Enabling verifies the delegated cgroup-v2 memory controls. Unsupported or unconfirmed limits block admission rather than claiming enforcement.
Each customer's purchased slots fund **one shared pool**. Two slots give an 8 GiB soft threshold and 10 GiB hard ceiling with the defaults, usable by either server or both together. Finite administrator account limits provide slots for complimentary members. Shared dashboard access does not create another RAM charge. Existing administrator-created games stay outside these pools until explicitly adopted.
The soft threshold causes memory reclaim and allocation stalls; it can slow a game and can be exceeded temporarily. The hard ceiling can cause the kernel to kill a game process when memory cannot be reclaimed. Pool swap is disabled. Kernel usage includes chargeable cache and is not just the Java/game heap. Memory-pressure and OOM counters are cumulative for the pool's current lifetime. RAM control is not CPU throttling or a guarantee that a game will remain stable.
Adopt an existing server
- In **Users & access**, give the member access to the server and a finite allowance, or enroll them in billing with a confirmed paid allowance.
- In **RAM controls**, choose that member as the server's single resource owner and click **Preview adoption**. Review the game name, volume and shared limits.
- Stop manual-template servers first and preview again. These stay stopped after adoption. Native profiles retain their prior running/stopped state.
- Apply the reviewed adoption. The panel recreates this container with the same named game-data volume and approved runtime, using its existing recovery journal. A running native game has downtime during this operation.
- Follow progress. Recover any interrupted adoption before another management operation. A changed container is preserved for review instead of overwritten.
New customer installations receive ownership from the authenticated install reservation and enter that customer's pool. Container replacements and port changes retain ownership through the stable game-data volume. Limits are stored in private state outside core updates, with persistent user systemd slice files so the policy also exists after a host reboot.
Capacity, billing and reductions
The host budget must cover the sum of customer hard reservations. A checkout reserves capacity before contacting Stripe/PayPal; multiple pending records for one customer reserve the largest allowance, not their sum. Existing paid allowances are included when controls are enabled. Provider-uncertain orders retain capacity until reconciled or explicitly reviewed in **Rental billing**. Do not release an uncertain order without checking the provider dashboard.
Confirmed allowance increases grow an existing pool without restarting games. Expiry and downgrades retain the previous limits and reservation pending review; they do not set a zero hard limit or stop/delete a game. A reviewed positive reduction requires current usage below the new soft threshold. An empty pool can be released only after its allowance and pending checkouts are gone and all containers using its volumes have been removed, including stopped containers. Retained game data is not deleted. Reusing such a volume requires reviewed adoption again. Enabling, resizing or recovery failures preserve reservations. Reapply the intended settings to recover a pending configuration.
Per-slot sizes cannot change while capacity is reserved. A host-budget change must still cover reservations and current charged usage. Pools can be synchronized manually on the RAM page; subscription refresh/webhooks also reconcile paid allowances. Existing games keep their last limits during a provider outage.
Create separate slot-count packages at the desired monthly/annual provider prices to offer volume discounts. Each slot adds the configured RAM. The first billing module supports one current subscription per account; it does not yet stack add-on subscriptions or offer an in-place plan-switch checkout. Prices and your initial host budget remain operator choices.
Remove an unused plan
In **Administration → Rental billing**, hide the incorrect plan, then click **Delete unused plan** and confirm. Only plans that have never had a checkout or subscription can be deleted. Plans with any billing history must remain hidden to preserve records. Deletion applies only to the selected Test/Live mode and does not delete or archive products/prices in Stripe or PayPal.
Edit plan names and attach another payment provider
Open **Administration → Rental billing**, find the saved plan and expand **Edit plan**. Correct its name or enter its Stripe Price ID / PayPal Plan ID, then click **Verify and save changes**. You can attach PayPal later to each existing Stripe plan, one at a time, without recreating it. New or replaced provider IDs must match the saved amount, currency and monthly/annual interval and belong to the selected Test/Live mode. The provider credentials must already be configured for that mode. Unchanged provider IDs do not require another API lookup, so a name correction does not depend on provider availability.
Blanking an ID disables that provider for new purchases of this plan; at least one must remain attached. Existing orders/subscriptions keep their stored provider IDs, server allowances and prices. Editing a panel name changes its display in the panel; it does not rename the provider product. Edits are audited. Price, currency, billing interval and server allowance remain fixed; create a replacement plan to offer different commercial terms.
Missing PayPal checkout recovery
An abandoned checkout keeps other plans locked until cancellation is confirmed. Cancel checkout now accepts a subscription PayPal already reports canceled or expired; an HTTP error alone never expires a local order.
If PayPal cannot find the subscription, open Administration → Rental billing. Find the unpaid customer order and its PayPal reference. In the matching PayPal business account and Test/Live mode, review that exact reference and confirm no active/payable subscription exists. Click Review missing PayPal checkout and confirm only after that review. The panel verifies access to the saved plan and its price, currency and interval, and requires a structured RESOURCE_NOT_FOUND 404 from the subscription details endpoint before releasing the local order. It retains the reference and history, audits the review and releases any order RAM reservation. This does not cancel a subscription at PayPal or grant capacity.
Existing subscriptions, authentication failures, generic HTML 404 responses, wrong/missing plans and previously paid orders cannot use this recovery. Correct credentials/mode or cancel an existing subscription through PayPal instead. Refresh My subscription after recovery to choose another plan/payment provider.