Micro-Upsell | Automated Pterodactyl Resource Upgrades
Dynamic resource upgrade module for Paymenter CMS. This extension enables your hosting clients to purchase preset Pterodactyl resource addons (RAM, disk, CPU, allocations, databases) that automatically update active services and adjust future subscription invoices.100% Standalone — All code resides securely in extensions/Others/MicroUpsell/. No core Paymenter files are modified.
Key Features
- Smart Prorata Billing: Upgrades are billed based on the exact number of days remaining in the client's current billing cycle, ensuring fair and transparent pricing.
- Auto-Cycle Adjustment: Future recurring subscription prices are automatically calculated and updated based on the service's billing cycle (Monthly, Semi-Annually, Annually, etc.).
- Instant Provisioning: Uses the Pterodactyl Application API to apply resources immediately upon invoice payment.
- Admin-First Design: Manage packages easily via the Filament admin panel.
- Security Focused: All pricing and resource validation are handled on the backend to prevent manipulation.
Requirements
- Paymenter CMS with Pterodactyl server extension configured.
- PHP 8.2+
- Active Pterodactyl Application API key on the linked server profile (with write access).
Installation
- Upload the MicroUpsell folder to extensions/Others/MicroUpsell/.
- In Admin → Extensions, click Install for Micro-Upsell.
- Migrations will run automatically (ext_micro_upsell_packages, ext_micro_upsell_order_addons).
- Open Admin → Extensions → Micro-Upsell and create your first addon packages.
Admin Package Management
Configure your upgrade packages directly in the admin panel:- Name: Internal label (e.g., "+1 GB RAM").
- Resource Type: Memory, disk, cpu, allocation, or database.
- Amount: MiB for memory/disk, % for CPU, count for ports/databases.
- Price: The monthly base rate for this addon.
Client Flow
- Client opens their active Pterodactyl service at /services/{id}.
- Clicks the Upgrade Resources button.
- Selects a preset package. The system automatically displays the prorated amount due today versus the future recurring rate.
- Purchases the upgrade.
- Upon payment:
- The extension PATCHes Pterodactyl server build limits via Application API.
- Service recurring price is updated for future renewal cycles based on the billing term (e.g., 6-month cycles are multiplied correctly).
- Secure purchase logs are created in the database.
Security & Reliability
- Pricing and resource values are loaded exclusively from the database on the backend.
- Client inputs are strictly validated against package IDs.
- Invoice payment listeners perform multi-level validation (ownership, service status, price integrity).
- Idempotent processing prevents duplicate billing or provisioning.
