Skip to main content

Braintree billing provider for the Swarmauri SDK.

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_billing_braintree


Swarmauri Billing Braintree

Swarmauri Billing Braintree offers a Braintree-flavoured provider that implements the Swarmauri billing interfaces. Use the package to exercise subscription renewals, vaulting, drop-in checkouts, and settlement reporting without wiring up the live Braintree SDK on day one.

Features

  • ✅ Models Braintree primitives such as customer vault, payment methods, subscriptions, and disbursements.
  • ✅ Returns predictable payloads so downstream Swarmauri workflows can be validated in isolation.
  • ✅ Highlights Braintree's fraud tools and reporting by exposing capability flags.
  • ✅ Stays self-contained: swap the stubbed responses for real API calls when ready.

Installation

Install from PyPI using either pip or uv:

pip install swarmauri_billing_braintree
uv add swarmauri_billing_braintree

Usage

from swarmauri_billing_braintree import BraintreeBillingProvider
from swarmauri_base.billing import PaymentIntentRequest

provider = BraintreeBillingProvider(api_key="sandbox-key")

payment_intent = provider.create_payment_intent(
    PaymentIntentRequest(payload={"amount_minor": 1500, "currency": "USD", "confirm": True}),
)
result = provider.capture_payment(payment_intent.id)

print(payment_intent.status, result.status)

Capability Mapping

The provider advertises Swarmauri Capability values which map to tigrbl_billing through capabilities_to_tigrbl. You can assert on those capabilities to feature-gate behaviour before hitting the Braintree API for real.

Contributing

Contributions that wire the stubbed operations to official Braintree REST or GraphQL calls are welcome. Please update the README usage section and add tests when expanding the integration.

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_braintree-0.1.2.dev23.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file swarmauri_billing_braintree-0.1.2.dev23.tar.gz.

File metadata

  • Download URL: swarmauri_billing_braintree-0.1.2.dev23.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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_braintree-0.1.2.dev23.tar.gz
Algorithm Hash digest
SHA256 502ef9eaf6aeb0bf7dc128f52e1625c94d5b00bbe52d170853e8c100b6fe5a64
MD5 f7561cc476a670a14bbf5014b32a0ab6
BLAKE2b-256 6b3ba4d6e29c4ea5cba25092add4595a48c5689ed0da8d7c462e21437cda216e

See more details on using hashes here.

File details

Details for the file swarmauri_billing_braintree-0.1.2.dev23-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_billing_braintree-0.1.2.dev23-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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_braintree-0.1.2.dev23-py3-none-any.whl
Algorithm Hash digest
SHA256 411b493efb9c4e6caa2a7d39bd5d91627ceadddbdcdd584b8ca3bf4e58a08a17
MD5 0043fe78fa800d10735fda5824c5c39d
BLAKE2b-256 db38e95349ca3c3735a39f770afdaffc82309b8146bdff3fb9090528f8fe7a00

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