Skip to main content

Paystack billing provider for the Swarmauri SDK.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_billing_paystack-0.9.3.dev3.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swarmauri_billing_paystack-0.9.3.dev3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file swarmauri_billing_paystack-0.9.3.dev3.tar.gz.

File metadata

  • Download URL: swarmauri_billing_paystack-0.9.3.dev3.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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

Hashes for swarmauri_billing_paystack-0.9.3.dev3.tar.gz
Algorithm Hash digest
SHA256 b7b2e85d2a50714774ade92caeb3fbe06ff780840fd0410738e47b92b7210b96
MD5 45412e2cf844a771ae64fa4144b647b6
BLAKE2b-256 53509693a777534004a41637846da8eae76a89950b1c8712eb27f91233a4374a

See more details on using hashes here.

File details

Details for the file swarmauri_billing_paystack-0.9.3.dev3-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_billing_paystack-0.9.3.dev3-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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

Hashes for swarmauri_billing_paystack-0.9.3.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 3530e586bba0f24c642f65c8b7814c839c92fd5eaa215831a8fee61406d034e2
MD5 34d1732554c240439a07ab74a100287f
BLAKE2b-256 03f0b29a277100595a1b63d3aa3c65d1f8d9492b703e40a724df193add0dd392

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page