--- id: braintree version: "4.46.0" license: MIT license_treatment: permissive maintenance: active --- # braintree — Braintree Python Library License: permissive · Maintenance: active · Downloads: 2.5M/mo ## What it is and what it does Braintree is the official Python SDK for integrating with Braintree's payment gateway, a PayPal-owned payment processor. It abstracts the HTTP API into Python objects and methods, handling authentication, request formatting, and response parsing so you can focus on payment logic rather than protocol details. The library depends only on requests, keeping its footprint minimal. Typical use involves configuring credentials once at startup, then calling methods like Transaction.sale() or Customer.create() to perform payment operations. It's designed for server-side integration where you control the merchant credentials; client-side payment flows use separate client tokens and nonces generated through Braintree's client SDKs. Use it for: - Process one-time credit card payments or recurring billing through Braintree's merchant account - Create and manage customer profiles and payment methods stored in Braintree's vault - Handle payment webhooks and transaction status queries from your backend - Integrate Braintree payments into a Django, Flask, or FastAPI application - Build a subscription or SaaS billing system using Braintree's recurring transaction features ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python bindings to the Braintree payment gateway, enabling server-side integration with Braintree's payment processing and merchant services. Yes, if you use Braintree for payments. It's the official SDK with low friction, active maintenance, permissive licensing, and no known vulnerabilities. Install it only if your application actually integrates with Braintree; it's not a general-purpose payment library. ## Install pip install braintree uv add braintree poetry add braintree ## Installing braintree Before you install: Low install friction with a single dependency on requests. Active maintenance with a release 2 days old signals ongoing support. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions. Quickstart: pip install braintree import braintree braintree.Configuration.configure( braintree.Environment.Sandbox, merchant_id='your_merchant_id', public_key='your_public_key', private_key='your_private_key' ) result = braintree.Transaction.sale({ 'amount': '10.00', 'payment_method_nonce': 'nonce_from_client' }) Verify before relying: - Whether the package supports Python versions older than 3.5 despite classifiers listing 3.5 as the minimum - Current state of the GitHub repository and community activity level ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 2.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags braintree payment gateway sdk, python payment processing integration, braintree api client, payment gateway python library, braintree merchant services, server-side payment integration, payment-processing, merchant-integration [View on SkillFed](https://skillfed.io/packages/braintree) · [View on PyPI](https://pypi.org/project/braintree/)