Skip to content

QuintenWiggill/yoco-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()

About

Python library for the Yoco Online Payments API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages