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.3.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file yoco-python-0.1.3.tar.gz
.
File metadata
- Download URL: yoco-python-0.1.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 551795548516f8cc35bf8b57d4c5da9b0a4932637621cdadde4d1b7a5710f413 |
|
MD5 | 3794d1d7c3482104926f3b0c883af350 |
|
BLAKE2b-256 | 09513520318fbfee7f3558364893bc0859cc298344154b586b3a0b58f29c76af |
File details
Details for the file yoco_python-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: yoco_python-0.1.3-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2eb49a5157745fc70b91da6d9726ae16ef8f36dd5733dd5d5a56610ddd7b3bac |
|
MD5 | 87bcf1d456f0c05a81985dd2c1df007b |
|
BLAKE2b-256 | 55fbb7e81063367212f8e16585c9a19c458ba342a9e78fcd2127b0f6429a0f70 |