lomi.

Create MTN MoMo charge

Create MTN MoMo charge

Overview

Create MTN MoMo charge

Starts a payer-facing MTN Mobile Money RequestToPay charge. With a test API key the transaction completes in the ledger without calling the MTN sandbox. Responses include next_action (await_webhook with status) alongside data.status.

When to use this

Use for server-initiated MTN collection when you are not using a hosted checkout session.

Good to know

Live charges require MTN connected for your organization and a valid MSISDN. Refunds on live MTN payments use the Disbursement refund API via Create refund.

See also

Mobile money · Direct charges · Create Wave charge · Create refund · Transactions

Authentication

Merchant routes require an API key in the X-API-KEY header (see Integration overview). Use a test key against https://sandbox.api.lomi.africa and a live key against https://api.lomi.africa.

Endpoint

POST /charge/mtn

Base URLs:

  • https://sandbox.api.lomi.africa
  • https://api.lomi.africa

Request

Path parameters

No path parameters beyond the URL pattern.

Query parameters

No query parameters.

Headers

NameInRequiredSchemaDescription
Lomi-AccountheaderNo-Optional lomi. Network account id (acct_...). When present, the API key acts as the Operator and the request targets the connected Member Account.

Request body

JSON request payload.

Schema: CreateMtnChargeDto

FieldRequiredTypeDescription
amountYesnumber-
currencyYesstring-
organizationIdNostring-
merchantIdNostring-
customerYesCustomerDto-
descriptionNostring-
countryCodeNostring-
productIdNostring-
subscriptionIdNostring-
quantityNonumber-

Example body:

{
  "amount": 1000,
  "currency": "XOF",
  "customer": {
    "name": "...",
    "phoneNumber": "..."
  }
}

Responses

StatusDescription
201MTN charge initiated

Errors

Errors follow the standard JSON error format (status code and machine-readable message). Validate inputs before calling; 401 indicates a missing/invalid key, 404 a missing resource for this organization, 429 rate limiting. For safe retries on create-style calls, send an idempotency key when your flow supports it.

Example

curl -sS -X POST "https://sandbox.api.lomi.africa/charge/mtn" \
  -H "X-API-KEY: $LOMI_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount":1000,"currency":"XOF","customer":{"name":"...","phoneNumber":"..."}}'

OpenAPI

  • operationId: ChargesController_createMtnCharge
  • Operation: POST /charge/mtn

Full schemas and Try it: API reference. Machine-readable contract: repo apps/docs/openapi.json.

On this page