lomi.
Payments

Transactions

Retrieve transaction history and details with advanced filtering.

The Transactions API provides read-only access to transaction history for your organization. Transactions are automatically created when payments are processed through Checkout Sessions or Payment Links.

List transactions

Retrieve all transactions with advanced filtering options.

Query Parameters

ParameterTypeDescription
providerstringFilter by payment provider (e.g., WAVE, STRIPE)
statusstringFilter by status. Comma-separated for multiple (e.g., completed,pending)
typestringFilter by transaction type. Comma-separated (e.g., payment,refund)
currencystringFilter by currency code. Comma-separated (e.g., XOF,USD)
paymentMethodstringFilter by payment method. Comma-separated (e.g., MOBILE_MONEY,CARDS)
startDatestringFilter from this date (ISO 8601 format)
endDatestringFilter up to this date (ISO 8601 format)
isPosbooleanFilter POS transactions only
pagenumberPage number (default: 1)
pageSizenumberItems per page (default: 50)
import { LomiSDK } from '@lomi./sdk';

const lomi = new LomiSDK({
  apiKey: process.env.LOMI_API_KEY!,
  environment: 'live',
});

// List with filters
const transactions = await lomi.transactions.list({
  status: 'completed',
  provider: 'WAVE',
  startDate: '2024-01-01T00:00:00Z',
  endDate: '2024-12-31T23:59:59Z',
  page: 1,
  pageSize: 50,
});

console.log(`Found ${transactions.length} transactions`);
from lomi import LomiClient
import os

client = LomiClient(
    api_key=os.environ["LOMI_API_KEY"],
    environment="test"
)

# List with filters
transactions = client.transactions.list(
    status="completed",
    provider="WAVE",
    startDate="2024-01-01T00:00:00Z",
    endDate="2024-12-31T23:59:59Z",
    page=1,
    pageSize=50
)

print(f"Found {len(transactions)} transactions")
curl -X GET "https://api.lomi.africa/transactions?status=completed&provider=WAVE&startDate=2024-01-01T00:00:00Z&page=1&pageSize=50" \
  -H "X-API-KEY: $LOMI_API_KEY"

Response

[
  {
    "transaction_id": "tx_abc123...",
    "organization_id": "org_xyz789...",
    "customer_id": "cus_def456...",
    "gross_amount": 10000,
    "net_amount": 9700,
    "fee_amount": 300,
    "currency_code": "XOF",
    "status": "completed",
    "type": "payment",
    "provider_code": "WAVE",
    "payment_method_code": "MOBILE_MONEY",
    "description": "Payment for Order #12345",
    "metadata": {
      "order_id": "ORD-12345"
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:31:00Z"
  }
]

Get a transaction

Retrieve details of a specific transaction by ID.

const tx = await lomi.transactions.get('tx_abc123...');
console.log(`Amount: ${tx.gross_amount} ${tx.currency_code}`);
console.log(`Status: ${tx.status}`);
tx = client.transactions.get('tx_abc123...')
print(f"Amount: {tx['gross_amount']} {tx['currency_code']}")
print(f"Status: {tx['status']}")
curl -X GET "https://api.lomi.africa/transactions/tx_abc123..." \
  -H "X-API-KEY: $LOMI_API_KEY"

Transaction Object

FieldTypeDescription
transaction_idstringUnique transaction identifier
organization_idstringOrganization that owns this transaction
customer_idstringAssociated customer (if any)
gross_amountnumberTotal amount charged
net_amountnumberAmount after fees
fee_amountnumberTotal fees deducted
currency_codestringCurrency (e.g., XOF, USD)
statusstringpending, completed, failed, refunded
typestringpayment, refund, payout
provider_codestringPayment provider (e.g., WAVE, STRIPE)
payment_method_codestringPayment method (e.g., MOBILE_MONEY, CARDS)
descriptionstringTransaction description
metadataobjectCustom metadata passed during payment
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Error Responses

StatusDescription
401Invalid or missing API key
404Transaction not found or access denied
429Rate limit exceeded

On this page