https://github.com/andela-sjames/paystack-python
Python plugin for Paystack
https://github.com/andela-sjames/paystack-python
python
Last synced: about 1 year ago
JSON representation
Python plugin for Paystack
- Host: GitHub
- URL: https://github.com/andela-sjames/paystack-python
- Owner: andela-sjames
- License: mit
- Created: 2016-02-06T10:53:12.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T21:51:57.000Z (about 2 years ago)
- Last Synced: 2024-04-23T22:51:41.627Z (about 2 years ago)
- Topics: python
- Language: Python
- Homepage: https://pypi.python.org/pypi/paystackapi
- Size: 265 KB
- Stars: 103
- Watchers: 20
- Forks: 42
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# paystack-python
[](https://coveralls.io/github/andela-sjames/paystack-python?branch=master)
[](https://scrutinizer-ci.com/g/andela-sjames/paystack-python/?branch=master)
[](https://img.shields.io/badge/license-MIT-blue.svg) [](https://travis-ci.org/andela-sjames/paystack-python)
[](https://badge.fury.io/py/paystackapi)
Python plugin for [Paystack](https://paystack.com/)
View on [pypi.python.org](https://pypi.python.org/pypi/paystackapi)
## Installation
```shell
pip install paystackapi
```
## Instantiate Paystack
```python
from paystackapi.paystack import Paystack
paystack_secret_key = "5om3secretK3y"
paystack = Paystack(secret_key=paystack_secret_key)
# to use transaction class
paystack.transaction.list()
# to use customer class
paystack.customer.get(transaction_id)
# to use plan class
paystack.plan.get(plan_id)
# to use subscription class
paystack.subscription.list()
```
## DOC Reference:
### API Reference: [API](https://paystack.com/docs/api/)
### Other methods can be found in the docs folder
### Static Use
To start using the Paystack Python API, you need to start by setting your secret key.
You can set your secret key in your environment by running:
```bash
export PAYSTACK_SECRET_KEY = 'your_secret_key'
```
> Don't forget to get your API key from [Paystack](https://paystack.com/) and assign to the variable `PAYSTACK_SECRET_KEY`
### Available resources
```Python
BulkCharge
Charge
ControlPanel
Customer
Invoice
Misc
Page
Plan
Product
Refund
Settlement
SubAccount
Subscription
Transaction
TransferControl
Transfer
TransferSplit
TransferRecipient
Verification
```
Please reference the **[docs](https://github.com/andela-sjames/paystack-python/tree/master/docs)** folder for usage,