Skip to main content

Python client for MeSomb services.

Project description

Welcome to pymesomb 👋

Version Documentation License: MIT Twitter: hachther

Python client for MeSomb Services

You can check the full documentation of the api here

🏠 Homepage

Install

pip3 install pymesomb

Usage

Collect money from an account

from pymesomb.operations import PaymentOperation
from pymesomb.utils import RandomGenerator
from datetime import datetime

operation = PaymentOperation('<application_key>', '<access_key>', '<secret_key>')
response = operation.make_collect({
    'amount': 100,
    'service': 'MTN',
    'payer': '670000000',
    'date': datetime.now(),
    'nonce': RandomGenerator.nonce(),
    'trxID': '1'
})
print(response.is_operation_success())
print(response.is_transaction_success())

Depose money in an account

from pymesomb.operations import PaymentOperation
from pymesomb.utils import RandomGenerator
from datetime import datetime

operation = PaymentOperation('<application_key>', '<access_key>', '<secret_key>')
response = operation.make_deposit({
    'amount': 100,
    'service': 'MTN',
    'receiver': '670000000',
    'date': datetime.now(),
    'nonce': RandomGenerator.nonce(),
    'trxID': '1'
})
print(response.is_operation_success())
print(response.is_transaction_success())

Get application status

from pymesomb.operations import PaymentOperation

operation = PaymentOperation('<application_key>', '<access_key>', '<secret_key>')
response = operation.get_status()
print(response.name)

Get transactions by IDs

from pymesomb.operations import PaymentOperation

operation = PaymentOperation('<application_key>', '<access_key>', '<secret_key>')
response = operation.get_transactions(['ID1', 'ID2'])
print(response)

Author

👤 Hachther LLC contact@hachther.com

Show your support

Give a ⭐️ if this project helped you!

Changes log

2.1.0 (2026-04-23)

  • Integration of checkout operation to create a checkout session and get the checkout url
  • Integration of customer and product management operations

2.0.3 (2025-03-24)

  • Add purchase_airtime to depose airtime in an account

2.0.2 (2025-03-12)

  • Rename identifier to id in WalletTransaction

2.0.1 (2025-03-12)

  • [Added] Add get_transactions method to retrieve transactions based on ids and external ids
  • [Update] Rename get_transactions to list_transactions in wallet operation
  • [Update] Improve canonical query handling in signature.py

2.0.0 (2025-02-10)

  • [Added] Add fundraising operations
  • [Added] Add wallet operations
  • [Added] Add refund transaction operation

=== BREAKING CHANGES ===

  • Parameters for make_collect and make_deposit are not more passed as dict but as keyword arguments
  • Remove security operations
  • Change parameter ts(str) to date(datetime) in Transaction class

1.1.1 (2025-01-31)

  • Integration of Yango refill

1.1.0 (2024-09-02)

  • Add wallet operations: create wallet, update wallet, get wallet, delete wallet, adjust wallet and list wallets.

1.0.4 (2024-04-28)

  • Add function to detect phone number operator in cameroon

1.0.3 (2024-01-24)

  • Handle case when trxID is not string
  • Fix crash to display response
  • Add raw_response in TransactionResponse to store MeSomb response.

1.0.2 (2023-07-25)

=== BREAKING CHANGES ===

Only one parameter is now passed to make_deposit and make_collect. The parameter is a Map that will contain all details of your request.

All method is now returning MeSomb model not dict

1.0.0 (2022-10-20)

First release of the module.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymesomb-2.1.0.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymesomb-2.1.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file pymesomb-2.1.0.tar.gz.

File metadata

  • Download URL: pymesomb-2.1.0.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for pymesomb-2.1.0.tar.gz
Algorithm Hash digest
SHA256 d4792e3b51c7480b463323e2e26fe9e23afbc1405bf4f7da07e8326b1880deb9
MD5 c8840bea8c1cf92854f253f1062cac24
BLAKE2b-256 c027d6f5bf8643f04acb0c35be254d62f305c81606a74fc980aa5d4d04625614

See more details on using hashes here.

File details

Details for the file pymesomb-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: pymesomb-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for pymesomb-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1e3cc0f48f1c784159946ab664d86eb8165cb298d7648c8b0aee036daf6c77c
MD5 1d13407998c27c13fd3469b1df6dddcc
BLAKE2b-256 06f49ea5ded7ebddc6568614541419485d2b25386dcfe80b688f323fd22d227e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page