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(
customer_msisdn = "263774222475", # the customer number
amount = 10.5,
reason = "Payment test"
)
print(result)
Refund example
result = wallet.refund("uuid_here", "012345l61975", "263774222475", 10.5, "Vaya Africa", "USD", "Test refund")
print(result)
Transaction lookup example
result = wallet.check_transaction_status("263774222475", "uuid_here")
print(result)
Metadata
Release files for ecocash 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ecocash-0.0.6.tar.gz | 3.6 kB | Without provenance | Details for ecocash-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ecocash-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for ecocash-0.0.6-py3-none-any.whl |
Total release size: 7.4 kB
Release files / ecocash-0.0.6.tar.gz
| Download URL | ecocash-0.0.6.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4ff761b1876c189f3aaaf0b3edcdbad4bfd25d09bba1634eca3c10c66bbdb58
|
|
BLAKE2b-256 checksum How to use checksums |
a2ea069ba22358a395817d02374d7f6f46a6d2abfa5e7974bbbfbbd56995ba76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Release files / ecocash-0.0.6-py3-none-any.whl
| Download URL | ecocash-0.0.6-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cf9d284090e9c9065f3e7e06dbc4c4045fcb9f529395b3c010558bc41edcadd
|
|
BLAKE2b-256 checksum How to use checksums |
c950199aed2342f8cd808d32a88c108016fff7b4383e508b481ed7661a686531
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Security for ecocash 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.