API Reference

The following section outlines the API of mobilemoney.py.

Version Info

mobilemoney.__version__

A string representation of the version

Client

class mobilemoney.Client()

Clientchevron-right

Exception

The following exceptions are thrown by the library.

circle-info

Please note that every request are susceptible to throw all these exception. Make sure to handle it well.

exception mobilemoney.MomoException

The base Exception for mobilemoney.py

exception mobilemoney.HTTPException (response, message )

Exception that’s raised when an HTTP request operation fails.

exception mobilemoney.Unauthorized ( response, message )

Exception that’s raised for when status code 401 occurs.

subclass of HTTPException

exception mobilemoney.MomoServerError ( response, message )

Exception that’s raised for when status code 500 occurs.

subclass of HTTPException

exception mobilemoney.InvalidData ( response, message )

Exception that’s raised for when status code 400 occurs.

subclass of HTTPException

exception mobilemoney.NotFound ( response, message )

Exception that’s raised for when status code 404 occurs.

subclass of HTTPException

exception mobilemoney.Conflict ( response, message )

Exception that’s raised for when status code 409 occurs.

subclass of HTTPException

exception mobilemoney.InvalidUniqueIDVersion

Exception that's raised for when UUID is not a valid version 4.

subclass of Exception

exception mobilemoney.InvalidBasicToken

Exception that's raised for a invalid Basic token type.

subclass of Exception

exception mobilemoney.InvalidBearerToken

Exception that's raised for a invalid Bearer token type.

subclass of Exception

Last updated