DocsGetting startedCreate a merchant account

Getting Started

Prerequisites

  • Business registration in any country of the world. You’ll need to provide the following business details:
    • Legal business name
    • Valid email address
    • Tax ID
    • Country of operation (Côte d’Ivoire or Sénégal)
    • Contact information

and few technical requirements:

  • Node.js 18+ for SDK usage
  • HTTPS endpoint for webhooks

Quick Start

Once verified, access your API credentials:

// Test Environment
const testClient = new LomiSDK({
  apiKey: 'lomi_sk_test_...',
  baseUrl: 'https://sandbox.api.lomi.africa/v1'
});
 
// Production Environment
const liveClient = new LomiSDK({
  apiKey: 'lomi_sk_live_...',
  baseUrl: 'https://api.lomi.africa/v1'
});

Merchant Information

Retrieve merchant details:

const merchant = await lomi.merchants.get('merchant_id');

Response example:

{
  "merchant_id": "mer_123",
  "business_name": "Example Corp",
  "country": "SN",
  "currency": "XOF",
  "status": "active",
  "capabilities": {
    "orange_money_payments": "active",
    "wave_payments": "active",
    "card_payments": "pending"
  }
}

2. Get Your API Keys from the home page

# Test Environment
export LOMI_API_KEY=lomi_sk_test_...
 
# Production Environment
export LOMI_API_KEY=lomi_sk_live_...

3. Install SDK (Optional)

npm install lomi.cli
# or
yarn add lomi.cli

4. Make Your First API Call

import { LomiSDK } from 'lomi-node';
 
const lomi = new LomiSDK({
  apiKey: process.env.LOMI_API_KEY,
  baseUrl: process.env.LOMI_API_URL // Optional, defaults to production
});
 
// Create a checkout session
const session = await lomi.checkoutSessions.create({
  merchant_id: 'your_merchant_id',
  success_url: 'https://your-site.com/success',
  cancel_url: 'https://your-site.com/cancel',
  provider_codes: ['ORANGE', 'WAVE'],
  amount: 1000,
  currency: 'XOF'
});

5. Set Up Webhook

import express from 'express';
const app = express();
 
app.post('/webhook', express.json(), (req, res) => {
  const event = lomi.webhooks.constructEvent(
    req.body,
    req.headers['lomi-signature'],
    process.env.WEBHOOK_SECRET
  );
  
  // Handle the event
  switch (event.type) {
    case 'payment.success':
      // Handle successful payment
      break;
  }
  
  res.json({ received: true });
});

Testing

xxxxx

Next Steps

Support