Paystack billing provider for the Swarmauri SDK.
Project description
Swarmauri Billing Paystack
The Swarmauri Billing Paystack package provides an integration between the Paystack API and the Swarmauri billing interfaces. It exposes product, price, hosted checkout, payment intent, subscription, invoice, and split operations powered by the paystackapi SDK.
Features
- ✅ Manages Paystack products and price codes with Swarmauri references.
- ✅ Initializes hosted checkout sessions and card-not-present payments.
- ✅ Integrates Paystack's subscription lifecycle endpoints.
- ✅ Issues invoices and forwards notifications as required.
- ✅ Configures split codes and marketplace charges while validating webhooks.
Installation
pip install swarmauri_billing_paystack
uv add swarmauri_billing_paystack
Usage
from swarmauri_billing_paystack import PaystackBillingProvider
from swarmauri_base.billing import CheckoutRequest, PriceSpec, ProductSpec
provider = PaystackBillingProvider(secret_key="sk_test_xxxxx")
product = provider.create_product(
ProductSpec(name="Learning Portal", description="Online academy access"),
idempotency_key="paystack-prod-001",
)
price = provider.create_price(
product,
PriceSpec(currency="NGN", unit_amount_minor=150000, nickname="Annual"),
idempotency_key="paystack-price-001",
)
checkout = provider.create_checkout(
price,
CheckoutRequest(
quantity=1,
success_url="https://merchant.example/paystack/callback",
customer_email="learner@example.com",
idempotency_key="paystack-checkout-001",
),
)
print(product.id, price.id, checkout.url)
Capability Mapping
All Paystack features surfaced here align with swarmauri_core.billing.Capability. Translate them to tigrbl using capabilities_to_tigrbl when coordinating with legacy services.
Contributing
Contributions that expand Paystack coverage or improve resiliency are appreciated. Please include request/response traces (with secrets redacted) when filing bugs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmauri_billing_paystack-0.9.2.tar.gz.
File metadata
- Download URL: swarmauri_billing_paystack-0.9.2.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
138ae05102c4a166d7a65a6f5273d4d09e251e5d8e51f20d87d39b5c03065282
|
|
| MD5 |
e24875a7421947bbeab24aef1edae3d4
|
|
| BLAKE2b-256 |
b49582b9961558788ce67b55b5cf634b419f4c16e27244d61412b01837fddcb2
|
File details
Details for the file swarmauri_billing_paystack-0.9.2-py3-none-any.whl.
File metadata
- Download URL: swarmauri_billing_paystack-0.9.2-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f58caa5e43dc0b5a680cb6e658de863195b4a3a1e5608d9b498b615c7484a34f
|
|
| MD5 |
b2153d36d76d3ab11ff5fd0e29f83138
|
|
| BLAKE2b-256 |
5b11f3bd491de8fe8eb0133a3546db6c78d3e6a21bf4d9acb872a35a781cd1a5
|