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.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.

swarmauri_billing_braintree-0.1.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swarmauri_billing_braintree-0.1.2.tar.gz
  • Upload date:
  • Size: 8.7 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_braintree-0.1.2.tar.gz
Algorithm Hash digest
SHA256 56304392a59eb348887783616c3846aed549f5d9496e1ead5103e307d26dec24
MD5 c7c2ce9b28b9928096cc741de12f475b
BLAKE2b-256 569fe35d4566b8df0ac9cf61fd09ac3e46d164886c3a27b3eaf2cfb5868029b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_billing_braintree-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.7 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_braintree-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1f9eafcb49a80830ab48714a5d6c33cd10d0e6041f0e8fcab2aa849c815603be
MD5 10bad98bfbc40a75505bd80d53fcf481
BLAKE2b-256 2122560110f9bd52389752c0bf2187de46dc93fae5e20833e6aaf282bd47f22a

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