An unofficial python sdk for the QosIC platform. This platform provides an api to enable mobile money payments for businesses in Africa.
- Free software: MIT license
- Documentation: https://qosic-sdk.readthedocs.io.
- Simple synchronous client to make your payment requests
- Cover 100% of Qosic public api
- Clean and meaningful exceptions
- 100 % test coverage
- Configurable timeouts
For those of you in a hurry, here’s a sample code to get you started.
pip install qosic-sdk
from dotenv import dotenv_values
from qosic import Client, bj
config = dotenv_values(".env")
moov_client_id = config.get("MOOV_CLIENT_ID")
mtn_client_id = config.get("MTN_CLIENT_ID")
login = config.get("SERVER_LOGIN")
password = config.get("SERVER_PASSWORD")
def main():
phone = "229XXXXXXXX"
mobile_carriers = [bj.MTN(id=mtn_client_id), bj.MOOV(id=moov_client_id)]
client = Client(login=login, password=password, mobile_carriers=mobile_carriers)
result = client.pay(phone=phone, amount=500)
print(result)
if result.success:
print(f"Everything went fine")
result = client.refund(reference=result.reference, phone=phone)
print(result)
if __name__ == "__main__":
main()
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.