Python SDK for Yoco API
Project description
Yoco Python SDK
Installation
pip install yoco-python
Getting started
How to call the API using the Python SDK:
from yoco_python import YocoClient
# Instantiate the yoco client
yoco = YocoClient(
secret_key='YOUR_SECRET_KEY', # Replace with your Yoco secret key
charge_token='YOUR_CHARGE_TOKEN', # Replace with your token generated by the frontend API
amount_in_cents=1000, # The amount in cents to charge the user
currency='ZAR', # The currency of the amount
)
# Call the charge api
charge_response = yoco.charge()
# Call the refund api
if yoco.charge_success:
refund_response = yoco.refund()
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
yoco-python-0.1.1.tar.gz
(2.9 kB
view details)
Built Distribution
File details
Details for the file yoco-python-0.1.1.tar.gz
.
File metadata
- Download URL: yoco-python-0.1.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15c46ea877333b2d3a7fda6fde235980613b3ba44537d6a333febd1ec09ad375 |
|
MD5 | 5b82a04225b3c2267f3a95bc1c18cadf |
|
BLAKE2b-256 | 0bad1815631fa648ccf1444403ccd6fd7f43c2a618352a32a6b9e913ec594356 |
File details
Details for the file yoco_python-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: yoco_python-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5bbe4cdac7e7c71f7fe68ad4d41000a43e92d233207fec3517db0abc790d8c2 |
|
MD5 | 08cc9f9802ba46fdf9d1ae0bb0960a78 |
|
BLAKE2b-256 | eeed3b7ec0dc5bfeae9403ca134fc10f82b5b69155e2f70df50a5302ffc940a0 |