lomi.

Integration journey

Step-by-step path from sandbox account to live payments: keys, integration choice, testing, webhooks, and go-live.

Hosted checkout, payment links, subscriptions, and the other products below all go through the same merchant API. The choice of what to build is independent of how you use lomi.: API, SDK, CLI, or MCP.

In sandbox you can

  • Pay with test cards
  • Let Wave and MTN auto-complete on test keys
  • Send X-Scenario-Key: pending or failed on direct Wave/MTN charges
  • Forward webhooks with lomi listen

In live you cannot

  • Auto-complete Mobile Money (the customer must approve on device)
  • Use test PANs (they only work with test keys)

How to use lomi.

Pick the surface that matches how you work.

Call the HTTP contract directly

POST /checkout-sessions

Use the API when you want the exact request and response, a language without an official SDK, or to compare against OpenAPI. Send your secret key as X-API-Key (LOMI_SECRET_KEY). Idempotency-Key is required on money-moving writes.

Create a sandbox checkout:

curl -sS -X POST "https://sandbox.api.lomi.africa/checkout-sessions" \
  -H "X-API-Key: $LOMI_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 10000,
    "currency_code": "XOF",
    "title": "Test order",
    "success_url": "https://example.com/success",
    "cancel_url": "https://example.com/cancel"
  }'

Open checkout_url from the response and pay with a sandbox test method. Full first-payment path: Make a test payment. Endpoint details: Create checkout session.

Step 1: Create a developer account

Sign up for a lomi. account to access the test environment, where you can run full payment flows without moving real money.

In test mode you can:

  1. Accept payments using test card numbers and simulated mobile money.
  2. Create checkout sessions, payment links, and direct charges against the sandbox API.
  3. Receive webhooks with "environment": "test" on payloads.

See Create your account and API keys.

Step 2: Choose your integration

lomi. supports multiple integration options depending on your stack:

If you needStart with
A complete checkout pageHosted checkout
Checkout embedded on your siteEmbed checkout widget
A shareable URLPayment links
Tickets or appointmentsEvent bookings
A backend-created payment requestPayment requests
Server-initiated mobile money or embedded cardsDirect charges
Recurring billingSubscriptions via checkout or links
Store plugin (WooCommerce, Shopify, etc.)E-commerce extensions

Define what you sell in Products before you create checkout sessions or subscription plans.

Most teams should start with hosted checkout. Use Which integration to choose? and Payment channels to confirm Wave, MTN, and card coverage for your markets.

Step 3: Test end-to-end

Test your integration thoroughly using sandbox credentials:

  1. Make a test payment: CLI or API checkout session.
  2. Use Sandbox payments for test cards, Wave, and MTN behavior.
  3. Exercise failure paths with Simulate errors.
  4. Fix issues using Error handling and Idempotency keys.
  5. For checkout edge cases (subscriptions, trials, pending mobile money), see Checkout behavior and per-channel guides under Payment channels.

The same first checkout can be created from REST, SDK, CLI, or MCP. The CLI and cURL paths are spelled out in Make a test payment. The SDK and MCP paths are in Get started with the SDK and MCP.

Step 4: Configure webhooks

Webhooks are especially useful for payment methods and events that happen outside your application's control, such as mobile money approval and subscription renewals.

  1. Register an HTTPS endpoint in the dashboard.
  2. Follow Setting up webhooks and Handling webhooks.
  3. Verify signatures from the raw request body before you parse JSON.

Subscription renewals: Card subscriptions renew off-session; listen for SUBSCRIPTION_RENEWED and renewal PAYMENT_FAILED. Wave and MTN subscriptions use a manual renewal checkout link sent before each billing date, the customer must pay that link; there is no silent wallet debit. See Subscriptions: Renewals.

Step 5: Go live

When sandbox flows work end to end:

  1. Complete account verification and payout setup.
  2. Switch servers to lomi_sk_live_... and https://api.lomi.africa.
  3. Follow What to check before live? and process one small live payment with webhook verification.

On this page