Plugin types
1. Gateway plugins
Add new payment methods (Stripe, PayPal, bKash, bank transfer, crypto). Provides payment processing, settlement management, webhook handling, and refund logic.2. Addon plugins
Add features like advanced reporting, subscription management, inventory sync, CRM integration, or email customization. Provides admin pages, API endpoints, scheduled jobs, and UI components.3. Theme plugins
Customize the checkout experience with custom templates, CSS, JavaScript, and branding. Provides Twig templates, stylesheets, and asset management.Plugin lifecycle
Plugin structure
Hooks system
Pre-execution hooks (modify behavior):Plugin API
Managing plugins
Via admin panel
Go to System > Plugins to view, enable, or disable plugins.Via CLI
Best practices
- Follow OwnPay coding standards
- Include tests and documentation
- Validate all input and escape output
- Use parameterized queries
- Respect the permission system
- Store secrets in config, never hardcoded
- Log important events
- Queue heavy tasks