Skip to main content
Plugins extend OwnPay functionality without modifying core code. Instead of forking OwnPay, write a plugin to add payment gateways, create custom features, design custom themes, or integrate external services.

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):
Post-execution hooks (react to events):
Over 60 hooks available across OwnPay.

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
Last modified on July 15, 2026