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.3.dev2.tar.gz (8.8 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.3.dev2.tar.gz.

File metadata

  • Download URL: swarmauri_billing_braintree-0.1.3.dev2.tar.gz
  • Upload date:
  • Size: 8.8 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_braintree-0.1.3.dev2.tar.gz
Algorithm Hash digest
SHA256 d17261ef2c1df1725a5d1a7e2047d3f83a6175e1e6301baac4aea2b0bfba65df
MD5 aa38a5506be618a55f32728a5d1f9aad
BLAKE2b-256 d8ea9be3e62f00be13b3d87d8f847dea83289a6be34b238358a132d8a23e1c24

See more details on using hashes here.

File details

Details for the file swarmauri_billing_braintree-0.1.3.dev2-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_billing_braintree-0.1.3.dev2-py3-none-any.whl
  • Upload date:
  • Size: 9.8 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_braintree-0.1.3.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 858c9c433675545fcc07721099a8584ec49dc757223456f97b41e3d3061448a3
MD5 6083dc46f762a190cdb0c4a9b1a00812
BLAKE2b-256 c0966cde5e9e8ee49d1a109a0546c271e7bcb0fa0b0cf465f2f40ddd1960204e

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