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.dev2.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.dev2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swarmauri_billing_paystack-0.9.3.dev2.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.dev2.tar.gz
Algorithm Hash digest
SHA256 04cd233572e31a11a78b3f200cfa979149a540c999f878e3c8f416f9c015ef2f
MD5 1fd63a0867043c111bd02fd31f4e0a2a
BLAKE2b-256 35bf24d8a9b24934bd298bebc2242027b3b9f039b5d46682fd4ff661778fdc75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_billing_paystack-0.9.3.dev2-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.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 a605370583a703a7357fbb2dc9bdde5e2e779df84106a5be59511fd41eb13d4e
MD5 69cc694144d1a84ba9242a95ae034284
BLAKE2b-256 0aa3b9619c1a7718905d4b07d0f280c8ebd55105c699b6c850971ab559eb12cc

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