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.2.tar.gz (8.9 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.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

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

Hashes for swarmauri_billing_paystack-0.9.2.tar.gz
Algorithm Hash digest
SHA256 138ae05102c4a166d7a65a6f5273d4d09e251e5d8e51f20d87d39b5c03065282
MD5 e24875a7421947bbeab24aef1edae3d4
BLAKE2b-256 b49582b9961558788ce67b55b5cf634b419f4c16e27244d61412b01837fddcb2

See more details on using hashes here.

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

Hashes for swarmauri_billing_paystack-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f58caa5e43dc0b5a680cb6e658de863195b4a3a1e5608d9b498b615c7484a34f
MD5 b2153d36d76d3ab11ff5fd0e29f83138
BLAKE2b-256 5b11f3bd491de8fe8eb0133a3546db6c78d3e6a21bf4d9acb872a35a781cd1a5

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