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.dev3.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.dev3.tar.gz.

File metadata

  • Download URL: swarmauri_billing_braintree-0.1.3.dev3.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.dev3.tar.gz
Algorithm Hash digest
SHA256 dcc1e9deeba2305d07349e7d4b43f5c6d2ca71efda4b9c09ed85a802e34498b1
MD5 fd9049106868645cd99535ec47c83cca
BLAKE2b-256 3ad14109aacbc41099e1e13d9861f5d368b7a8a8ca12d34927e6ee673a8e5ab5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_billing_braintree-0.1.3.dev3-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.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 24a59ed2ee1812408fab8bd47f50c708ed2c9e592ce19edb2333191db875db70
MD5 d0b935902f0f3d659f5de991bfe746d3
BLAKE2b-256 76e7d70149e05fd5083623e3ed6d29abc4cced083e8a68df53c25f378415f14e

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