lomi.

Refunds

Refund completed transactions (`POST /refunds`).

Use POST /refunds to refund a completed transaction. Supported providers are card, Wave, and MTN MoMo (same flows as the dashboard). Your balance is updated immediately; customer credit timing depends on the payment type.

MTN MoMo (live): the original payment must have a provider reference (provider_checkout_id from RequestToPay). Refunds use the MTN Disbursement refund API and are asynchronous on MTN's side; lomi. polls until completion. Test mode refunds are ledger-only (no MTN API call).

List and retrieve refunds with GET /refunds and GET /refunds/{id}.

Card refunds are recorded immediately on your account. The customer's bank or card issuer typically posts the credit within several business days.

lomi. Network Operators can add Lomi-Account: acct_... to refund a connected Member Account transaction when the membership has refund.create.

Create a refund

import { LomiSDK } from '@lomi./sdk';

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

const refund = await lomi.refunds.create({
  transaction_id: '123e4567-e89b-12d3-a456-426614174000',
  amount: 5000,
  reason: 'duplicate_charge',
  refund_type: 'partial', // optional: 'full' | 'partial'
});
import requests, os

r = requests.post(
    "https://api.lomi.africa/refunds",
    headers={"X-API-KEY": os.environ["LOMI_SECRET_KEY"], "Content-Type": "application/json"},
    json={
        "transaction_id": "123e4567-e89b-12d3-a456-426614174000",
        "amount": 5000,
        "reason": "duplicate_charge",
    },
)
print(r.status_code, r.json())
curl -X POST "https://api.lomi.africa/refunds" \
  -H "X-API-KEY: $LOMI_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction_id": "123e4567-e89b-12d3-a456-426614174000",
    "amount": 5000,
    "reason": "duplicate_charge"
  }'

Network refund:

curl -X POST "https://api.lomi.africa/refunds" \
  -H "X-API-KEY: $LOMI_OPERATOR_API_KEY" \
  -H "Lomi-Account: acct_1234567890" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction_id": "123e4567-e89b-12d3-a456-426614174000",
    "amount": 5000,
    "reason": "duplicate_charge"
  }'

Payload reference

FieldTypeRequired
transaction_idstring (UUID)Yes
amountnumberYes
reasonstringNo
refund_type'full' | 'partial'No, inferred from amount vs transaction gross if omitted

List refunds

GET /refunds?status=completed&limit=50&offset=0

Get a refund

GET /refunds/{refund_id}

On this page