A Python wrapper for the SasaPay API.
Installation
pip install sasapay-sdk
API
The documentation for the SasaPay APIs can be found at the link.
Usage
from sasapay import SasaPayAPI
# Initialize the API client
api = SasaPayAPI(
environment='sandbox',
client_id='CLIENT_ID',
client_secret='CLIENT_SECRET'
)
# Authenticate and get access token
access_token = api.authenticate()
print(f"Access Token: {access_token}")
# Perform a customer to business transaction
response = api.customer_to_business(
merchant_code='6**80',
network_code='63902',
phone_number='2547******280',
amount='1',
description='Deposit',
account_reference='2547******280',
callback_url='https://webhook.site/2986****-0dac-****-8091-f1e7afbc979d'
)
print(f"C2B Response: {response}")
# # Perform a business to customer transaction
response = api.business_to_customer(
merchant_code='6**80',
channel='63902',
receiver_account_number='2547******280',
amount='10',
description='B2C Payment',
merchant_reference='TestB2CB1',
callback_url='https://webhook.site/2986****-0dac-****-8091-f1e7afbc979d'
)
print(f"B2C Response: {response}")
# # Perform a business to business transaction
response = api.business_to_business(
merchant_code='6**80',
network_code='63902',
receiver_merchant_code='522522',
amount=10.00,
description='B2B Payment',
merchant_reference='TestB2BB1',
account_reference='125*****04',
receiver_account_type='PAYBILL',
callback_url='https://webhook.site/2986****-0dac-****-8091-f1e7afbc979d'
)
print(f"B2B Response: {response}")
Available library methods
| API method | Description | Documentation link |
|---|---|---|
authenticate() |
The method is designed to return the access token for accessing subsequent APIs. | Authentication API |
Metadata
Release files for sasapay-sdk 0.1.1
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 |
|---|---|---|---|---|
| sasapay_sdk-0.1.1.tar.gz | 16.3 kB | Without provenance | Details for sasapay_sdk-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sasapay_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for sasapay_sdk-0.1.1-py3-none-any.whl |
Total release size: 34.4 kB
Release files / sasapay_sdk-0.1.1.tar.gz
| Download URL | sasapay_sdk-0.1.1.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
073499021562f8d8a95239deda2f0dc470b515920cc38e8653f3ccdc6e2ee16d
|
|
BLAKE2b-256 checksum How to use checksums |
f47997bd3026f6f0f35fa2620e5a15de663d22a77eee62bc5781fbb65bca6c8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / sasapay_sdk-0.1.1-py3-none-any.whl
| Download URL | sasapay_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41e5b0250f2b6333c14de751fdd11d3e519e18ad8090653091246f56268b93a2
|
|
BLAKE2b-256 checksum How to use checksums |
5458a0504b199d91638101774ac81c95fc24881514cf036150254acf0e10b82f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Security for sasapay-sdk 0.1.1
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.