Skip to main content
Themes control the visual appearance of OwnPay’s customer-facing checkout experience. A theme plugin overrides checkout template paths and injects CSS/JS assets via event hooks, without modifying any core file.

How theme plugins work

Themes are ordinary plugins of type "theme". They are loaded by PluginLoader from modules/themes/{slug}/ through the same two-phase lifecycle as addons. The checkout controller resolves which template to render by applying three filter hooks:

Directory structure

The manifest.json file

The entrypoint class

Brand theme data

The checkout controller calls BrandThemeService::getBrandTheme(int $merchantId) and passes the result as the brand Twig variable:

Twig template development

CSP nonce integration

Full hook reference for themes

Security requirements

  • Always use {{ variable }} (escaped) in Twig, never {{ variable|raw }} for user data
  • Every <script> tag must carry the nonce from the container
  • No eval() or OS commands
  • Validate color fields with hex regex
  • Use checkout.csp.sources filter for external domains

Installation and activation

  1. Package the plugin directory as a ZIP
  2. Upload via Admin > Appearance > Themes > “Install Theme”
  3. Activate via the Themes list
  4. Set as active theme via Admin > Appearance > Themes > “Set Active”
The active_theme value must match your manifest slug exactly. A mismatch means the system falls back to the built-in own-pay theme.
Last modified on July 15, 2026