Skip to main content

Unofficial Python Wrapper Library for the EcoCash API by Tarmica Sean Chiwara, A computer engineering student.

Project description

Ecocash Python Library

Simple, intuitive Python client for Ecocash Open API.

Installation

pip install ecocash

Quick Start

from ecocash import Ecocash
wallet = EcoCash(
    app_id="app123", # provided by ecocash in the portal
    api_key="key123", # provided by ecocash in the portal
    merchant_code="850236", # for merchant payments
    app_name="MyApp" # provided by ecocash in the portal
)

Make a payment

this is used to initiate transaction from *Merchant-Side to Customer-Side *(customer only has to approve transaction by inputting their pin)

result = wallet.initiate_payment("263774222475", 10.5, "Payment test")
print(result)

Refund example

result = wallet.refund("uuid_here", "012345l61975", "263774222475", 10.5, "Vaya Africa", "USD", "Test refund")p
print(result)

Transaction lookup example

result = wallet.check_transaction_status("263774222475", "uuid_here")print(result)

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

ecocash-0.0.5.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

ecocash-0.0.5-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file ecocash-0.0.5.tar.gz.

File metadata

  • Download URL: ecocash-0.0.5.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for ecocash-0.0.5.tar.gz
Algorithm Hash digest
SHA256 6ffef8bb506729974c99aed95ebc2a3723a53d7ddd8925ea197568f6900e8155
MD5 1abd38b49bf1ec5a3651e4941a43fa75
BLAKE2b-256 6921ef5dcbb3be2912173a4a31702c86d291ea0c796ce90dc9f46a21dc63756b

See more details on using hashes here.

File details

Details for the file ecocash-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: ecocash-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for ecocash-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 47620bd1e5b141623d0c4501797a624f9bc8bf43fec6c90dcaffd9252803f169
MD5 437f48ba575fe954869df6105d2b5d64
BLAKE2b-256 e50af163b8b338d51efab70e8460e5b659083415d96b1608b99dbfc0881339a8

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