Four plugin types
Gateway plugins
Add new payment methods: Stripe, PayPal, bKash, bank transfer, crypto. Implement theGatewayInterface to handle payment processing, verification, refunds, and webhooks.Build a gatewayAddon plugins
Extend functionality without payment processing: reporting dashboards, subscription management, CRM sync, email customization, scheduled jobs.Build an addonTheme plugins
Customize the checkout experience: Twig templates, CSS, JavaScript, branding overrides.Build a themeIntegration plugins
Connect external platforms: QuickBooks sync, HubSpot push, Slack notifications, ERP integration.Build an integrationPlugin sandbox
Every plugin runs inside a sandbox that enforces security constraints:- No direct filesystem access outside the plugin directory
- No
eval(),exec(), orsystem()calls - Database queries through the provided query builder only
- Outbound HTTP via the plugin HTTP client with configurable allow-lists
The sandbox is enforced at the PHP level. A plugin that attempts a restricted operation receives a
PluginSandboxException.Capabilities
Plugins declare capabilities in theirmanifest.json. Capabilities are permission gates that determine what system resources a plugin can access:
See the full Capabilities reference.
Hook system
Plugins interact with OwnPay core through a WordPress-style action and filter hook system powered byEventManager:
- Actions - fire-and-forget callbacks (react to events)
- Filters - pipeline callbacks that transform data