lomi.
E‑commerce

Magento 2

Lomi_Payments module, hosted checkout via checkout sessions, callback route, signed webhooks, optional REST verify.

Magento 2

Extension Lomi_Payments for Magento Open Source / Adobe Commerce. Payment method code: lomi.

Related products

Requirements

  • Magento 2.4.x, PHP as required by your Magento version (7.4+ / 8.x)
  • lomi. account and keys from dashboard.lomi.africa

Installation

lomi/magento2-payments is not published on Packagist. Register the GitHub repository, then install with Composer:

composer config repositories.lomi-magento vcs https://github.com/lomiafrica/magento
composer require lomi/magento2-payments
php bin/magento module:enable Lomi_Payments
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Manual install

  1. Clone or download lomiafrica/magento.
  2. Copy the package to app/code/Lomi/Payments/ on your Magento root (the directory that contains registration.php).
  3. Run the same module:enable, setup:upgrade, setup:di:compile, and cache:flush commands as above.

Full instructions: Magento plugin README

Step 1, Get your lomi. API keys

  1. Sign in to dashboard.lomi.africa.
  2. Open Developers → API keys.
  3. Copy your Test secret key (lomi_sk_test_…).

See API keys.

Step 2, Install the module

Use Composer or manual install above, then enable Lomi_Payments and flush cache.

Step 3, Configure lomi. in Magento

Stores → Configuration → Sales → Payment Methods → lomi.

  1. Enable the method.
  2. Turn Test mode on while integrating.
  3. Paste Test secret key and Test webhook secret.
  4. Save config.

Step 4, Check Setup health

The Setup health panel should show:

  • API secret key: Configured
  • API connection: GET /me succeeded
  • Test mode: Sandbox API active

Fix any Action required row before continuing.

Step 5, Connect webhooks

  1. Copy the webhook URL shown in admin (https://your-store.example/lomi/payment/webhook).
  2. In dashboard.lomi.africaWebhooks, add the endpoint.
  3. Enable PAYMENT_SUCCEEDED and REFUND_COMPLETED.
  4. Paste the signing secret into Magento (Test webhook secret).

Step 6, Run a test payment

  1. Place an order and select lomi. as payment.
  2. Pay on hosted checkout (sandbox while test mode is on).
  3. Confirm the Magento order is paid.

Go live

Turn Test mode off, paste live secret key + live webhook secret, and run one small real payment.

Customer flow

  1. Customer selects lomi. and places the order.
  2. Magento creates a checkout session and redirects to lomi. Checkout.
  3. Return URL: lomi/payment/callback: verifies session vs order.
  4. Webhook PAYMENT_SUCCEEDED with X-Lomi-Signature / X-Lomi-Event.
    If metadata.magento_increment_id is missing, the module can still resolve the order using checkout_session_id and the stored payment field lomi_checkout_session_id.

Optional REST verification

GET /rest/V1/lomi/verify/{checkoutSessionId}, verifies the checkout session for the checkout session’s last real order; path segment must match lomi_checkout_session_id on that order.

Defined in etc/webapi.xml.

Webhooks

Same contract as other PHP plugins: HMAC-SHA256 hex on raw JSON body; subscribe to payment-success handling via dashboard webhooks.

Shared docs

More docs

On this page