Skip to content

chengying34748/pyOxaPayAPI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPi Package Version Supported Python versions PyPi downloads

pyOxaPayAPI

Python implementation of OxaPay pubilc API

This library is based on oxapay_api implementation. Was forked here due to slow PR acceptance.

This library is ACTUAL and is supported. If you need some not implemented methods - just open an issue.

Installation

Installation using pip (a Python package manager):

$ pip install pyOxaPayAPI

Usage

Everything is as simple as the API itself.

  1. Create pyOxaPayAPI instance
  2. Access API methods in pythonic notation (e.g. "Creating an invoice" -> create_invoice())
  3. Most methods return result as correspondent class, so you can access data as fields
from pyOxaPayAPI import pyOxaPayAPI
client = pyOxaPayAPI(
    "xxxxxxx",                   # Merchand API key
    general_api_key="xxxxxxx",   # General API key (for account methods like "balance")
    payout_api_key="xxxxxxx")    # Payout API key (for payout methods)
balances = client.account_balance(currency=currency.name)
for currency, balance in balances["data"].items():
    print("Merchant balance: {} {}".format(balance, currency))

You can also check tests.py.

Exceptions

Exceptions are rised using pyOxaPayAPIException class.

About

Python implementation of OxaPay (https://oxapay.com) pubilc API (https://docs.oxapay.com)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%