Skip to main content

A Python implementation of the Paystack API

Project description


This library provides a Python implementation of the Paystack API.


pip3 install --upgrade paystacklib


Python 3.5+


The Paystack secret key should be defined in the Environment as PAYSTACK_SK or assigned to paystacklib.secret_key

>>> import paystacklib
>>> paystacklib.secret_key = 'sk_your_paystack_secret_key' 
>>> transaction = paystacklib.Transaction.initialize(500000, '')
>>> transaction
{'status': True, 'message': 'Authorization URL created', 
    'data': {'authorization_url': '', 
        'access_code': '6rklpsq157c8bef', 'reference': 'i1wdh5b2r3'}}
>>> transaction.status
>>> transaction.message
'Authorization URL created'
>>> transaction['status'] #you can also access values this way
>>> transaction.whatever  #accessing non-existent element will return a 'False' value

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for paystacklib, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size paystacklib-0.1.0-py3-none-any.whl (16.3 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size paystacklib-0.1.0.tar.gz (7.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page