Skip to content
Python SDK version 1.3.3

Py MoMo SDK for African Mobile Money and Payment Rails

A strictly typed Python SDK for MTN Mobile Money, Airtel Money, Wave, Safaricom M-Pesa, Paystack, Flutterwave, and Orange Money behind a unified PaymentRouter. Built with synchronous and asynchronous parity, automatic token caching, strict input validation, and verified webhook security.

PyPI version Python versions License CI

Supported products and providers

Py MoMo SDK covers every MTN MoMo Open API product alongside Airtel Money and pan-African payment gateways behind a unified routing layer.

MTN MoMo

Collection

Request payments, initiate withdrawals, query balances, and exchange CIBA OAuth2 consent tokens.

Explore collection

MTN MoMo

Disbursement and remittance

Execute subscriber transfers, v2 deposits, refunds, wallet-to-wallet remittances, and account validation.

Explore disbursement

Airtel Open API

Airtel Money

Initiate USSD Push collections, RSA-encrypted PIN disbursements, status inquiries, and wallet balances.

Explore Airtel Money

Multi-provider

PaymentRouter and 7 rails

Route across MTN MoMo, Airtel Money, Wave, Safaricom M-Pesa, Paystack, Flutterwave, and Orange Money.

Explore providers
Quickstart

Install and query a balance in ten lines

Install py-momo-sdk from PyPI and import the py_momo_sdk package:

pip install py-momo-sdk
from py_momo_sdk import ProductConfig, PyMomoSDK, PyMomoSDKConfig

config = PyMomoSDKConfig(
    environment="sandbox",
    collection=ProductConfig(
        subscription_key="your-subscription-key",
        api_user="550e8400-e29b-41d4-a716-446655440000",
        api_key="your-api-key",
    ),
)

with PyMomoSDK(config) as client:
    balance = client.collection.get_balance()
    print(f"Balance: {balance.available_balance} {balance.currency}")

Sync and async parity

Switch cleanly between synchronous and asynchronous clients across all 7 providers and PaymentRouter with identical method signatures, Pydantic v2 models, and thread-safe or async-safe token refresh locking.

Security by default

Every client enforces HTTPS endpoints, disables automatic HTTP redirects, bounds response sizes, validates canonical UUID v4 references, redacts credentials from logs and tracebacks, and verifies webhook signatures and source IPs.