Official Python SDK for Paysgator API
Project description
Paysgator Python SDK
Official Python client for the Paysgator API.
Installation
pip install paysgator
Usage
from paysgator import PaysgatorClient
client = PaysgatorClient(api_key="YOUR_API_KEY")
# Create a payment
payment = client.payments.create(
amount=100.0,
currency="MZN",
payment_methods=["MPESA", "CARD"],
return_url="https://example.com/callback"
)
print(f"Payment Link: {payment.data.checkout_url}")
print(f"Transaction ID: {payment.data.transaction_id}")
# Confirm a payment (Server-side)
confirmation = client.payments.confirm(
payment_link_id="payment_link_uuid",
payment_method="MPESA",
payment_fields={"phoneNumber": "841234567"}
)
print(f"Confirmed Transaction: {confirmation.data.transaction_id}")
# Check Balance
balance = client.wallet.get_balance()
print(f"Balance: {balance.balance} {balance.currency}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
paysgator-1.0.0.tar.gz
(3.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file paysgator-1.0.0.tar.gz.
File metadata
- Download URL: paysgator-1.0.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bdc92047d5cf6a82ef7874c05aef84b8c347393c269b4185f396731e3f36de3
|
|
| MD5 |
19d17a50e951987ae692e21536c418a2
|
|
| BLAKE2b-256 |
0c810bb3c1f0330477b06a9b35f17deb0e577a4b753a1a7cb0c3a75eeb53f0ea
|
File details
Details for the file paysgator-1.0.0-py3-none-any.whl.
File metadata
- Download URL: paysgator-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ab290adf2a4af47537144fc5db1204c40971a2c546aedbbf84143833622e42e
|
|
| MD5 |
905a85e901eefdcabe354587377d9898
|
|
| BLAKE2b-256 |
4be4a3ff7523c0d2c853449fe9910519ce17d120fc49091f4e4e84aa68c6b577
|