Metadata-Version: 2.4
Name: paystack-api-wrapper
Version: 0.1.1
Summary: Modern, test-driven Python client for the Paystack API — built to save you time integrating into Python projects.
Project-URL: Homepage, https://github.com/theolujay/paystack-api-wrapper/blob/main/README.md
Project-URL: Repository, https://github.com/theolujay/paystack-api-wrapper
Project-URL: Documentation, https://github.com/theolujay/paystack-api-wrapper/blob/main/docs/USAGE.md
Project-URL: Bug Tracker, https://github.com/theolujay/paystack-api-wrapper/issues
Author-email: Joseph Ezekiel <theolujay@gmail.com>
Maintainer-email: Joseph Ezekiel <theolujay@gmail.com>
License: MIT
License-File: LICENSE
Keywords: api,fintech,nigeria,payment,paystack,python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: requests>=2.25.0
Provides-Extra: dev
Requires-Dist: black>=22.0.0; extra == 'dev'
Requires-Dist: build>=1.0.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.14.1; extra == 'dev'
Requires-Dist: pytest>=8.4.1; extra == 'dev'
Requires-Dist: responses>=0.25.8; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Requires-Dist: twine>=4.0.0; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest-cov>=4.0.0; extra == 'test'
Requires-Dist: pytest-mock>=3.14.1; extra == 'test'
Requires-Dist: pytest>=8.4.1; extra == 'test'
Requires-Dist: responses>=0.25.8; extra == 'test'
Description-Content-Type: text/markdown

# Paystack API Wrapper

[![PyPI Version](https://img.shields.io/pypi/v/paystack-api-wrapper.svg)](https://pypi.org/project/paystack-api-wrapper/)
[![Python Versions](https://img.shields.io/pypi/pyversions/paystack-api-wrapper.svg)](https://pypi.org/project/paystack-api-wrapper/)
[![PyPI Status](https://img.shields.io/pypi/status/paystack-api-wrapper.)](https://pypi.org/project/paystack-api-wrapper/)

[![License](https://img.shields.io/github/license/theolujay/paystack-api-wrapper.svg)](https://github.com/theolujay/paystack-api-wrapper/blob/main/LICENSE)
[![Build](https://github.com/theolujay/paystack-api-wrapper/actions/workflows/tests.yml/badge.svg)](https://github.com/theolujay/paystack-api-wrapper/actions) 
[![Coverage](https://codecov.io/gh/theolujay/paystack-api-wrapper/branch/main/graph/badge.svg)](https://codecov.io/gh/theolujay/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](https://paystack.com/docs/api/) for reference, and explore the [Usage Guide](./docs/USAGE.md) for practical examples.

---

## Installation

```bash
pip install paystack-api-wrapper
```

---

## Quick Start

1. **Initialize the client with your secret key**

   (Best practice: store your secret key as an environment variable `PAYSTACK_SECRET_KEY`.)

   ```python
   import os
   from paystack import PaystackClient, APIError

   secret_key = os.getenv("PAYSTACK_SECRET_KEY")
   client = PaystackClient(secret_key=secret_key)
   ```

2. **Make an API call** (e.g., initialize a transaction):

   ```python
   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**](./docs/USAGE.md) for details on handling responses, pagination, and advanced error management.

---

## Available APIs

The client exposes all major Paystack API resources as properties:

* `apple_pay`
* `bulk_charges`
* `charge`
* `customers`
* `dedicated_virtual_accounts`
* `direct_debit`
* `disputes`
* `integration`
* `miscellaneous`
* `payment_pages`
* `payment_requests`
* `plans`
* `products`
* `refunds`
* `settlements`
* `subaccounts`
* `subscriptions`
* `terminal`
* `transactions`
* `transaction_splits`
* `transfers`
* `transfers_control`
* `transfer_recipients`
* `verification`
* `virtual_terminal`

---

## Contributing

Contributions are welcome! Check out the [contributing guide](./CONTRIBUTING.md) to get started.

---

## License

MIT © [Joseph Ezekiel](https://github.com/theolujay) – see [LICENSE](./LICENSE) for details.