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

# Odoo

> Accept mobile money payments in your Odoo ERP with the Simiz payment provider module

Integrate Simiz mobile money payments into your Odoo instance (16.0, 17.0, 18.0+). This module follows Odoo's standard `payment.provider` architecture for seamless integration with Odoo's invoicing and e-commerce flows.

## Prerequisites

Before you begin, make sure you have:

* Odoo 16.0 or later (Community or Enterprise)
* Python 3.9+
* A [Simiz account](https://simiz.io/register) with API credentials
* Admin access to your Odoo instance

## Installation

<Steps>
  ### Download the Module

  Download the `payment_simiz` module from the Simiz dashboard or generate it using the plugin generator:

  ```bash
  pip install simiz
  ```

  ### Copy to Addons Directory

  Copy the `payment_simiz` folder into your Odoo custom addons directory:

  ```bash
  cp -r payment_simiz /path/to/odoo/custom-addons/
  ```

  Make sure your `odoo.conf` includes the custom addons path:

  ```ini
  [options]
  addons_path = /path/to/odoo/addons,/path/to/odoo/custom-addons
  ```

  ### Install the Module

  1. Navigate to **Settings > Activate Developer Mode**
  2. Go to **Apps > Update Apps List**
  3. Search for **"Simiz Payments"**
  4. Click **Install**

  ### Configure the Provider

  1. Navigate to **Invoicing > Configuration > Payment Providers**
  2. Select **Simiz Payments**
  3. Enter your credentials:
     * **API Key**: Your Simiz API key (`smz_live_*` or `smz_test_*`)
     * **Webhook Secret**: Your webhook signing secret from the Simiz dashboard
  4. Set the provider state to **Test Mode** (for sandbox) or **Enabled** (for production)

  ### Configure the Webhook

  In your [Simiz dashboard](https://simiz.io/dashboard), create a webhook endpoint pointing to:

  ```
  https://your-odoo-domain.com/payment/simiz/webhook
  ```

  Subscribe to the following events:

  | Event                   | Description            |
  | ----------------------- | ---------------------- |
  | `transaction.created`   | Payment initiated      |
  | `transaction.completed` | Payment successful     |
  | `transaction.failed`    | Payment failed         |
  | `transaction.cancelled` | Payment cancelled      |
  | `transaction.expired`   | Payment window expired |
  | `refund.created`        | Refund initiated       |
  | `refund.completed`      | Refund successful      |
  | `refund.failed`         | Refund failed          |
</Steps>

## Supported Payment Methods

| Method           | Code           |
| ---------------- | -------------- |
| Orange Money     | `ORANGE_MONEY` |
| MTN Mobile Money | `MTN_MOMO`     |

## Supported Currencies

| Currency                  | Code | Decimals |
| ------------------------- | ---- | -------- |
| Central African CFA Franc | XAF  | 0        |
| West African CFA Franc    | XOF  | 0        |

## Module Architecture

The module follows Odoo's standard payment provider pattern:

```
payment_simiz/
├── __manifest__.py          # Module manifest
├── __init__.py              # Init with install/uninstall hooks
├── const.py                 # Constants (currencies, statuses, events)
├── models/
│   ├── __init__.py
│   ├── payment_provider.py  # payment.provider extension
│   └── payment_transaction.py  # payment.transaction extension
├── controllers/
│   ├── __init__.py
│   └── main.py              # Webhook controller
├── views/
│   ├── payment_simiz_templates.xml  # Redirect form
│   └── payment_provider_views.xml   # Provider config form
└── data/
    └── payment_provider_data.xml    # Provider data record
```

## Webhook Signature Verification

All webhook requests are verified using HMAC-SHA256 signatures:

* **Header**: `X-Simiz-Signature`
* **Format**: `t={timestamp},v1={signature}`
* **Algorithm**: HMAC-SHA256 of `{timestamp}.{payload}` using your webhook secret
* **Tolerance**: 300 seconds (5 minutes)

## Test Mode

To test the integration:

1. Set the provider state to **Test Mode** in Odoo
2. Use your sandbox API key (`smz_test_*`)
3. The module will automatically use the sandbox API endpoint
4. Create a test sales order and proceed to payment

<Warning>
  Never use production API keys in test mode. Always use your sandbox credentials (`smz_test_*`) for testing.
</Warning>

## Troubleshooting

| Issue                        | Solution                                                                          |
| ---------------------------- | --------------------------------------------------------------------------------- |
| Module not found             | Verify the addons path in `odoo.conf` and update the apps list                    |
| Payment provider not visible | Check that the module is installed and the provider is not archived               |
| Webhook signature errors     | Verify your webhook secret matches the one in the Simiz dashboard                 |
| Currency not supported       | Ensure the currency is activated in Odoo (Invoicing > Configuration > Currencies) |
| Payment stuck on pending     | Check the Odoo logs for webhook processing errors                                 |

## Next Steps

<CardGroup cols={2}>
  <Card title="Webhook Events" icon="bell" href="/en/core-concepts/webhooks/events">
    Learn about all available webhook events and their payloads.
  </Card>

  <Card title="Sandbox Testing" icon="flask" href="/en/guides/sandbox-testing">
    Test your integration in the sandbox environment.
  </Card>

  <Card title="Go-Live Checklist" icon="check" href="/en/guides/go-live-checklist">
    Review the checklist before going live with real payments.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference">
    Explore the full Simiz API reference.
  </Card>
</CardGroup>

## Changelog

<Accordion title="Version history" defaultOpen>
  | Version | Date       | Changes                                                    |
  | ------- | ---------- | ---------------------------------------------------------- |
  | `1.0.0` | 2026-03-01 | Initial release — mobile money payments, webhooks, sandbox |
</Accordion>
