> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Configure Monime credentials and GiveWP gateway settings.

After activating the plugin, you must configure it to connect with your Monime account. Go to **Monime > Settings** for the shared credentials, then go to **GiveWP > Settings > Gateways > Monime** to configure the GiveWP-specific gateway options.

## Main Monime Settings

These credentials authenticate your site with the Monime API.

| Setting       | Description                             | Where to find it                                                                     |
| :------------ | :-------------------------------------- | :----------------------------------------------------------------------------------- |
| **API Token** | Your secret API Bearer token.           | Monime Dashboard > **Developers** > **Access Tokens**. Create a new token if needed. |
| **Space ID**  | The identifier for your business space. | Monime Dashboard > **Developers** > **Spaces**. It starts with the prefix `spc`.     |

<Warning>
  Keep your API Token secret. Never share it or expose it in frontend code.
</Warning>

## Webhooks Setup

Webhooks are **required** for this plugin to work correctly. They ensure your site receives payment confirmations even if the donor closes their browser immediately after paying.

1. **Copy the Webhook URL:**
   In the plugin settings, locate the **Webhook URL** field and copy it. It will look like `https://your-site.com/wp-json/monime/v1/webhook`.

2. **Configure in Monime:**
   * Log in to the [Monime Dashboard](https://my.monime.io).
   * Open the desired Space you want webhook events for.
   * Navigate to **Developer > Webhooks**.
   * Click **Create Webhook**.
   * Paste your URL into the **Endpoint URL** field.
   * Select the following **Events**:
     * `checkout_session.completed`
     * `checkout_session.expired`
     * `checkout_session.cancelled`
   * Create the webhook.

3. **Set the Webhook Secret (Recommended):**
   * When creating the webhook, copy the **Generated HMAC Secret** or, if you are using **ECDSA P-256**, copy the **Public Key** after the webhook is created by clicking the Actions dropdown and then View Public Key.
   * Paste the secret into the **Webhook Secret** field in the Monime GiveWP plugin settings.
   * This ensures that incoming webhooks actually come from Monime.

## GiveWP Gateway Settings

The plugin maps these settings directly to the `paymentOptions` object sent to the [Checkout Session API](/apis/versions/caph-2025-08-23/checkout-session/create-checkout-session).

### Gateway Details

| Setting                  | Description                                                                                    |
| :----------------------- | :--------------------------------------------------------------------------------------------- |
| **Gateway Title**        | The label donors see at checkout, such as `Monime` or `Pay with Monime`.                       |
| **Gateway Description**  | Short text that explains the payment method to donors.                                         |
| **Financial Account ID** | Optional. Use this when you want donations to settle into a specific Monime financial account. |

### Channel Control

You can completely disable specific payment channels.

| Setting                     | Effect                                                               |
| :-------------------------- | :------------------------------------------------------------------- |
| **Disable Card Payments**   | Hides the card option.                                               |
| **Disable Mobile Money**    | Hides all mobile money providers such as Orange Money and AfriMoney. |
| **Disable Bank Transfers**  | Hides the bank transfer option.                                      |
| **Disable Digital Wallets** | Hides digital wallet options.                                        |

### Provider Control

For finer control, you can enable or disable specific providers within a channel.

You configure this by entering **Provider IDs** as comma-separated values.

<Note>
  **Logic:** If an allow list is set, only those providers are shown. If the allow list is empty, all providers are shown except those listed in the disable list.
</Note>

#### Mobile Money Providers

| Setting                | Description                                           |
| :--------------------- | :---------------------------------------------------- |
| **Allowed Providers**  | List IDs to explicitly allow, for example `m17, m18`. |
| **Disabled Providers** | List IDs to explicitly block.                         |

#### Bank Providers

| Setting                | Description                                                 |
| :--------------------- | :---------------------------------------------------------- |
| **Allowed Providers**  | List IDs to explicitly allow, for example `slb001, slb003`. |
| **Disabled Providers** | List IDs to explicitly block.                               |

#### Wallet Providers

| Setting                | Description                   |
| :--------------------- | :---------------------------- |
| **Allowed Providers**  | List IDs to explicitly allow. |
| **Disabled Providers** | List IDs to explicitly block. |

### Common Provider IDs

| Provider                         | ID       | Type         |
| :------------------------------- | :------- | :----------- |
| **Orange Money**                 | `m17`    | Mobile Money |
| **AfriMoney**                    | `m18`    | Mobile Money |
| **QMoney**                       | `m13`    | Mobile Money |
| **Sierra Leone Commercial Bank** | `slb001` | Bank         |
| **Rokel Commercial Bank**        | `slb002` | Bank         |
| **Ecobank**                      | `slb003` | Bank         |
| **Guaranty Trust Bank**          | `slb004` | Bank         |
| **UBA**                          | `slb005` | Bank         |

*Note: This list may change. Check the Monime Dashboard or API documentation for the most up-to-date provider IDs.*

## Configuration Checklist

Before you start accepting live donations, confirm the following:

1. Main Monime settings are saved.
2. GiveWP gateway settings are saved.
3. The webhook endpoint is configured in Monime.
4. The webhook secret matches on both sides.
5. At least one payment channel is enabled.
