OwnPay\Event\EventManager.
API summary
Actions
Filters
When to use actions vs filters
Hook catalog
Payment hooks
Gateway hooks
The
{slug} in gateway.webhook.{slug} is replaced with the gateway plugin’s slug (for example gateway.webhook.gateway-stripe).Checkout hooks
System hooks
Admin hooks
Plugin lifecycle hooks
Hook registration pattern
Register all hooks inside your plugin’sregister() method. Hooks are automatically attributed to your plugin slug and cleaned up on deactivation:
Architectural invariants
These constraints cannot be bypassed by any plugin:- Security middleware is non-removable - you cannot remove the authentication, CSRF, or TenantScope middleware from the pipeline
- TenantScope is non-bypassable - every request is scoped to a brand; a plugin cannot access data from other brands
- Error isolation - every callback runs in its own try/catch. A failing plugin never crashes the core
- BCMath for money - all monetary values in hooks must use
bcadd,bcsub,bcmul,bcdiv,bccomp - No ledger writes from hooks - plugins cannot post directly to the double-entry ledger