Skip to content

ChargePanda Module System — Developer Handbook

ChargePanda's module system lets you extend the platform by dropping a self-contained folder into modules/. Your module can add database tables, admin pages, customer-facing pages, pricing models, feature gates, and event listeners — without modifying a single core file.


What you can build

CapabilityHelper / mechanism
Database tablesMigrations auto-loaded by the module loader
Admin pages + sidebar linksregisterAdminMenuItem()
Admin settings tabregisterAdminSettingsLink()
Customer account pages + sidebar linksregisterAccountMenuItem()
Public frontend pagesRoutes + views inside the module
Custom pricing modelsregisterPricingModel() + JS handler
Feature gating by planPlanEntitlement + saas.feature middleware
React to platform eventsboot() event listeners
Post-payment redirectredirect_after_order session key
Artisan commands$commands array on the service provider

Versioning

Each section notes which version of the module system introduced the feature:

VersionWhat was added
v1.0Module loader, module.json, AbstractModuleServiceProvider, module:make, admin UI
v1.0registerPricingModel(), registerFrontendScript(), JS pricing SDK
v1.0registerAdminMenuItem(), registerAdminSettingsLink(), PlanEntitlement, module events
v1.0Module frontend pages, SubscriptionActivated event, redirect_after_order hook
v1.0registerAccountMenuItem() with condition callable

Table of contents

  1. Getting Started — Scaffold a module in under 5 minutes
  2. Module Structure — Directory layout, module.json, service provider anatomy
  3. Admin Integration — Sidebar links, settings tabs, admin pages
  4. Account Integration — Customer account sidebar and pages
  5. Frontend Pages — Public pages, two layout tracks, asset compilation
  6. Events & Hooks — Listening to platform events, post-payment redirect
  7. Pricing Models — Custom billing logic (PHP + JS)
  8. Plan Entitlements & Feature Gating — Limit features by plan
  9. Example Module — API Keys — Full walkthrough from scratch

Released under the Commercial License.