Skip to main content
MTN MoMo — Collection API.

Covered countries

CountryCodeCurrency
Côte d’IvoireCIXOF
BéninBJXOF
TogoTGXOF
RwandaRWRWF

URLs

TypeURL
Dev portalmomodeveloper.mtn.com
Sandbox APIhttps://sandbox.momodeveloper.mtn.com
USSD client*133#

Required credentials

Enter these in Settings → Stores → MTN:
FieldTypeDescription
sub_key_collectionpasswordCollection Subscription Key — from your MTN Developer dashboard, under Collections subscription.
api_usertextUUID v4 generated via the portal (e.g. 11111111-2222-3333-8444-555555555555).
api_keypasswordGenerated once after creating the API User. Non-recoverable.

Specifics

  • Dual authentication: MTN requires both the Ocp-Apim-Subscription-Key header and an OAuth bearer token obtained via POST /collection/token/ using Basic auth (api_user:api_key).
  • The token is cached in memory with a 60-second safety margin before expiry.
  • The X-Target-Environment: sandbox header is required in sandbox mode.
  • The X-Reference-Id header (UUID) must be unique per request — SandPay generates one automatically.
  • msisdn values are sent without the + in the payload (partyId).

Native error codes mapped

Native MTN error codes are translated to canonical SandPay statuses (SUCCESS, PIN_INVALID, INSUFFICIENT_FUNDS, ACCOUNT_BLOCKED, …). See frontend/lib/operators/_errors.ts in the repo for the full mapping table.

See also