Skip to main content

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_billing_paystack


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.

Metadata

Release files for swarmauri_billing_paystack 0.9.2

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

Source distribution (sdist)

Source distribution for swarmauri_billing_paystack 0.9.2
File Size Uploaded
swarmauri_billing_paystack-0.9.2.tar.gz 8.9 kB Details

Built distribution (wheel)

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

Total release size: 18.8 kB

Release files / swarmauri_billing_paystack-0.9.2.tar.gz

Download URL swarmauri_billing_paystack-0.9.2.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
138ae05102c4a166d7a65a6f5273d4d09e251e5d8e51f20d87d39b5c03065282
BLAKE2b-256 checksum
How to use checksums
b49582b9961558788ce67b55b5cf634b419f4c16e27244d61412b01837fddcb2
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / swarmauri_billing_paystack-0.9.2-py3-none-any.whl

Download URL swarmauri_billing_paystack-0.9.2-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f58caa5e43dc0b5a680cb6e658de863195b4a3a1e5608d9b498b615c7484a34f
BLAKE2b-256 checksum
How to use checksums
5b11f3bd491de8fe8eb0133a3546db6c78d3e6a21bf4d9acb872a35a781cd1a5
Upload date
Uploaded using Trusted Publishing?
What is 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}
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