Skip to main content

Installation Steps

You can integrate Monime into a custom plugin by loading your adapter class and registering it with Monime during plugin boot.

1. Install the Core Plugin

  1. Install and activate Monime Gateway.
  2. Confirm that the shared Monime settings page appears in WordPress admin.

2. Add Your Custom Integration

  1. Add your custom plugin or theme code that implements the Monime adapter interfaces.
  2. Load your adapter classes from the main plugin file or bootstrap file.
  3. Register the payment adapter from the main plugin file during plugin boot.
  4. If your plugin handles webhooks, implement the webhook adapter on the same class or load that class before Monime initializes its webhook service.
The important installation detail is timing: Monime must know about your adapter before it builds a checkout session or dispatches a webhook. If the adapter class is not loaded early enough, Monime cannot register it during boot. For a small plugin, keep the integration code in a dedicated class file and load it from your main plugin bootstrap file. Example structure:

Example Registration

If You Also Handle Webhooks

If your custom plugin processes webhook data, make sure the webhook adapter class is also loaded and the same adapter instance implements MonimeWebhookAdapterInterface. In practice, that means your main plugin file should:
  • require the adapter class file,
  • register the payment adapter,
  • and expose the webhook handler before Monime initializes its shared webhook service.
If your plugin uses a separate webhook class, load that class from the main plugin file as well so it is available when Monime receives a verified webhook payload.

Verify the Setup

Confirm that your adapter class is available and that Monime can load it without autoloading errors. You can verify this by:
  • loading a page that triggers plugin boot,
  • checking your PHP error log for class-loading problems,
  • and running a test checkout plus a test webhook to confirm that both the payment flow and callback flow work.