Skip to main content

aiopaystack

Asynchronous Python library for Paystack

GitHub PyPI PyPI - Python Version GitHub issues GitHub Workflow Status (branch)

Installation

pip install aiopaystack

Usage

Add your paystack secret key as an environment variable as PAY_STACK_SECRET_KEY

from paystack import Transactions

trans = Transactions()

# All parameters must be passed in as keywords. For both required and optional arguments.
res = await trans.initialize(email="sam@gmail.com", amount='5000')

# Passing secret key as an argument
# This replaces any key set in the environment
from paystack import Paystack
paystack = Paystack(secret_key="paystack_secret_key")

# to use one session for multiple request use the class as a context manager
async with Transactions() as trans:
    res= await trans.verify(reference="ref")
    
# The response type for every request is a typed dict.
from typing import TypedDict, Any
Response = TypedDict('Response', {'status_code': int, 'status': bool, 'message': str, 'data': dict | Any})

# Sample response
{'status': True,
 'message': 'Authorization URL created',
 'data': 
     {'authorization_url': 'https://checkout.paystack.com/3521i62zf1i0ljl',
      'access_code': '3521i62zf1i0ljl', 'reference': '2q16btxglw'
      },
 'status_code': 200
 }
## DOC Reference: <https://developers.paystack.co/v2.0/reference>
### Static Use

Don't forget to get your API key from Paystack and assign to the variable PAYSTACK_SECRET_KEY Please reference the docs folder for usage,

Metadata

Release files for aiopaystack 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiopaystack 2.0.0
File Size Uploaded Provenance Actions
aiopaystack-2.0.0.tar.gz 21.2 kB Without provenance Details for aiopaystack-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiopaystack 2.0.0
File Interpreter ABI Platform Actions
aiopaystack-2.0.0-py3-none-any.whl Python 3 none any Details for aiopaystack-2.0.0-py3-none-any.whl

Total release size: 50.8 kB

Release files / aiopaystack-2.0.0.tar.gz

Download URL aiopaystack-2.0.0.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2b001997a630964c489a90afa98c4719531e61063700a7d21958489485e36994
BLAKE2b-256 checksum
How to use checksums
fdd410f5f22344051a7ee4829e87ffff330db1fc057440b3fd6b8e694d96f8d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / aiopaystack-2.0.0-py3-none-any.whl

Download URL aiopaystack-2.0.0-py3-none-any.whl
Size 29.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3891e3184de0711c51fc8a56e641aac3819e136d496f79c78ecc731c4243503c
BLAKE2b-256 checksum
How to use checksums
7c607b674a802a65cfb70d6c2e8b497c89fd1e56fa42bbe957cf0aba40cfa616
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Security for aiopaystack 2.0.0

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.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page