> ## 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 API credentials, webhooks, and payment options.

After activating the plugin, you must configure it to connect with your Monime account. Go to **WooCommerce > Settings > Payments > Monime WooCommerce** to access these settings.

## API Credentials

These credentials authenticate your store 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 you haven't already. |
| **Space ID**  | The identifier for your business space. | Monime Dashboard > **Developers** > **Spaces**. It is 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 store receives payment confirmations even if the customer closes their browser immediately after paying.

1. **Copy the Webhook URL:**
   In the plugin settings, locate the **Webhook URL** field (e.g., `https://your-site.com/wp-json/monime/v1/webhook`) and copy it.

2. **Configure in Monime:**
   * Log in to the [Monime Dashboard](https://my.monime.io).
   * Open the desired Space you wish to get 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(HMAC or ECDSA Public Key) into the **Webhook Secret** field in the Monime WooCommerce plugin settings.
   * This ensures that incoming webhooks actually come from Monime.

## Payment Options Configuration

You can control which payment methods are available to your customers. 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).

### Channel Control

You can completely disable specific payment channels.

| Setting                     | Effect                                                      |
| :-------------------------- | :---------------------------------------------------------- |
| **Disable Card Payments**   | Hides the Credit/Debit Card option.                         |
| **Disable Mobile Money**    | Hides all Mobile Money providers (Orange, AfriMoney, etc.). |
| **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 (e.g., accept Orange Money but not AfriMoney).

You configure this by entering **Provider IDs** (comma-separated).

<Note>
  **Logic:** If "Enable Providers" is set, **only** those providers will be shown. If it is empty, all providers are shown **except** those listed in "Disable Providers".
</Note>

#### Mobile Money Providers

| Setting               | Description                                      |
| :-------------------- | :----------------------------------------------- |
| **Enable Providers**  | List IDs to explicitly allow (e.g., `m17, m18`). |
| **Disable Providers** | List IDs to explicitly block.                    |

#### Bank Providers

| Setting               | Description                                            |
| :-------------------- | :----------------------------------------------------- |
| **Enable Providers**  | List IDs to explicitly allow (e.g., `slb001, slb003`). |
| **Disable Providers** | List IDs to explicitly block.                          |

#### Wallet Providers

| Setting               | Description                   |
| :-------------------- | :---------------------------- |
| **Enable Providers**  | List IDs to explicitly allow. |
| **Disable 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.*
