Paystack API Wrapper
A clean, intuitive, and reliable Python wrapper for the Paystack API.
This library was built to eliminate repetitive boilerplate when integrating Paystack into your Python projects, while emphasizing modern design, robust error handling, and a test-driven foundation. Covers the full API with clean abstractions, so you can focus on building features—not handling payments.
See the Paystack API docs for reference, and explore the Usage Guide for practical examples.
Installation
pip install paystack-api-wrapper
Quick Start
-
Initialize the client with your secret key
(Best practice: store your secret key as an environment variable
PAYSTACK_SECRET_KEY.)import os from paystack import PaystackClient, APIError secret_key = os.getenv("PAYSTACK_SECRET_KEY") client = PaystackClient(secret_key=secret_key)
-
Make an API call (e.g., initialize a transaction):
try: data, meta = client.transactions.initialize( email="customer@example.com", amount=50000, # amount in kobo currency="NGN" ) print("Transaction initialized:", data) # {'authorization_url': '...', 'access_code': '...', 'reference': '...'} except APIError as e: print(f"API error: {e.message}")
See the Full Usage Guide for details on handling responses, pagination, and advanced error management.
Available APIs
The client exposes all major Paystack API resources as properties:
apple_paybulk_chargeschargecustomersdedicated_virtual_accountsdirect_debitdisputesintegrationmiscellaneouspayment_pagespayment_requestsplansproductsrefundssettlementssubaccountssubscriptionsterminaltransactionstransaction_splitstransferstransfers_controltransfer_recipientsverificationvirtual_terminal
Contributing
Contributions are welcome! Check out the contributing guide to get started.
License
MIT © Joseph Ezekiel – see LICENSE for details.
Metadata
Release files for paystack-api-wrapper 2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| paystack_api_wrapper-2.tar.gz | 125.0 kB | Without provenance | Details for paystack_api_wrapper-2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| paystack_api_wrapper-2-py3-none-any.whl | Python 3 | none | any | Details for paystack_api_wrapper-2-py3-none-any.whl |
Total release size: 182.5 kB
Release files / paystack_api_wrapper-2.tar.gz
| Download URL | paystack_api_wrapper-2.tar.gz |
|---|---|
| Size | 125.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
881ffd6425f56257f236dec2e069402c7e14b52fd4bd5711aae1dc3d48cdd4f2
|
|
BLAKE2b-256 checksum How to use checksums |
3d5af502c12142e90be484de56f6740dc5a913a643c1795986bbc8e649a1db4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Release files / paystack_api_wrapper-2-py3-none-any.whl
| Download URL | paystack_api_wrapper-2-py3-none-any.whl |
|---|---|
| Size | 57.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de1bc4ce05055d4d3b2ef4a0d4d01c41f61d881553f2bd7941f9927413b25bc6
|
|
BLAKE2b-256 checksum How to use checksums |
8b6c686ec355612e355fa6d67d544d57471ff5ecab503a1f9284605dcfa28a92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Security for paystack-api-wrapper 2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.