Braintree

7.0.0-beta1

Braintree SDK for iOS
braintree/braintree_ios

What's New

7.0.0-beta1

2025-04-30T20:17:34Z
  • Require Xcode 16.2+ and Swift 5.10+
  • Breaking Changes
    • Bump minimum supported deployment target to iOS 16+
    • countryCodeAlpha2 now returns a 2 character country code instead of a 3 character country code
    • BraintreePayPalNativeCheckout
      • Remove entire PayPal Native Checkout module
    • BraintreeVenmo
      • Update BTVenmoRequest to make all properties accessible on the initializer only vs via the dot syntax.
      • Remove fallbacktoWeb property from BTVenmoRequest. All Venmo flows will now use universal links to switch to the Venmo app or fallback to the web flow if the Venmo app is not installed
      • Remove BTAppContextSwitcher.sharedInstance.returnURLScheme
      • BTVenmoClient initializer now requires a universalLink for switching to and from the Venmo app or web fallback flow
      • Update initializer to BTVenmoClient(authorization:)
    • BraintreeSEPADirectDebit
      • Update BTSEPADirectDebitRequest to make all properties accessible on the initializer only vs via the dot syntax.
      • Update initializer to BTSEPADirectDebitClient(authorization:)
    • BraintreeLocalPayment
      • Update BTLocalPaymentRequest to make all properties accessible on the initializer only vs via the dot syntax.
      • Update initializer to BTLocalPaymentClient(authorization:)
    • BraintreeCard
      • Update BTCard to make all properties accessible on the initializer only vs via the dot syntax.
      • Remove BTCardRequest, use BTCard directly instead
      • Update initializer to BTCardClient(authorization:)
    • BraintreePayPal
      • Update BTPayPalRequest, BTPayPalVaultRequest and BTPayPalCheckoutRequest to make all properties accessible on the initializer only vs via the dot syntax.
      • Update PayPal app URL query scheme from paypal-app-switch-checkout to paypal
      • Update initializer to BTPayPalClient(authorization:)
    • BraintreeThreeDSecure
      • Update BTThreeDSecureRequest to make all properties accessible on the initializer only vs via the dot syntax.
      • Update BTThreeDSecureRequest.amount to be a String
      • Remove cardAddChallenge - use cardAddChallengeRequested instead
      • Update initializer to BTThreeDSecureClient(authorization:)
    • BraintreeCore
      • Remove fetchPaymentMethodNonces methods and parser
    • BraintreeAmericanExpress
      • Update initializer to BTAmericanExpressClient(authorization:)
    • BraintreeApplePay
      • Update initializer to BTApplePayClient(authorization:)
    • BraintreeDataCollector
      • Update initializer to BTDataCollector(authorization:)
    • BraintreeShopperInsights (BETA)
      • Update initializer to BTShopperInsightsClient(authorization:shopperSessionID:)
    • BraintreePayPalMessaging (BETA)
      • Update initializer to BTPayPalMessagingView(authorization:)

Braintree iOS SDK

CocoaPods compatible Swift Package Manager compatible Carthage compatible

GitHub Actions Tests

Welcome to Braintree's iOS SDK. This library will help you accept card and alternative payments in your iOS app.

The Braintree iOS SDK permits a deployment target of iOS 16.0 or higher. It requires Xcode 16.2+ and Swift 5.10+.

📣 Announcements

  • Upgrade your integration to continue accepting Braintree payments 📣 The SSL certificates for current iOS SDK versions (v5 and v6) are set to expire by March 30, 2026. Upgrade to v5.26.0+ and v6.17.0+, respectively, to continue using the Braintree SDK. Click here for more details

  • v6 is the latest major version of Braintree iOS. To update from v5, see the v6 migration guide. If you have not yet migrated to v5, see the v5 migration guide

Supported Payment Methods

Installation

We recommend using Swift Package Manager, CocoaPods, or Carthage to integrate the Braintree SDK with your project.

Swift Package Manager

To add the Braintree package to your Xcode project, select File > Swift Packages > Add Package Dependency and enter https://github.com/braintree/braintree_ios as the repository URL. Tick the checkboxes for the specific Braintree libraries you wish to include.

If you look at your app target, you will see that the Braintree libraries you chose are automatically linked as a frameworks to your app (see General > Frameworks, Libraries, and Embedded Content).

BraintreePayPal and BraintreeLocalPayment also require the inclusion of the BraintreeDataCollector module.

In your app's source code files, use the following import syntax to include Braintree's libraries:

import BraintreeCore
import BraintreeCard
import BraintreeApplePay
import BraintreePayPal

CocoaPods

# Includes Cards and PayPal
pod 'Braintree'

# Optionally include additional Pods
pod 'Braintree/DataCollector'
pod 'Braintree/Venmo'

Carthage

Braintree 6.0.0+ requires Carthage 0.38.0+ and the --use-xcframeworks option when running carthage update.

Add github "braintree/braintree_ios" to your Cartfile, and add the frameworks to your project.

Note: Long term support for Carthage is not guaranteed. Please update to SPM, if possible. If there are concerns, please comment on this Discussion thread.

Documentation

Start with 'Hello, Client!' for instructions on basic setup and usage.

Next, read the full documentation for information about integrating with additional payment methods, such as PayPal and Venmo, as well as explore our pre-built Drop-In UI offering.

Upgrade Your SDK Version

If you're looking to update to a newer version of our SDK, please see our recommended approach below.

Using Swift Package Manager

To update using Swift Package Manager, select File→ Packages → Update to Latest Package Versions.

Using Cocoapods

You can either update all pods listed within your Podfile using pod update or specific pods as needed using pod update PODNAME. For additional details, see the Cocoapods guidelines.

Using Carthage

To update to the latest versions of each framework, simply run the carthage update command. For more details, check out the Carthage guidelines.

Versions

This SDK abides by our Client SDK Deprecation Policy. For more information on the potential statuses of an SDK check our developer docs.

Major version number Status Released Deprecated Unsupported
6.x.x Active June 2023 TBA TBA
5.x.x Inactive February 2021 June 2024 June 2025
4.x.x Unsupported November 2015 February 2022 February 2023

Demo

  1. Our Xcode project uses SwiftLint. To ensure you have it installed see DEVELOPMENT.md
  2. Run pod install
  3. Resolve the Swift Package Manager packages if needed: File > Packages > Resolve Package Versions or by running swift package resolve in Terminal
  4. Open Braintree.xcworkspace in Xcode
  5. Select the Demo scheme, and then run

Xcode 15.0+ is required to run the demo app.

Contributing

We welcome PRs to this repo. See our development doc.

Feedback

The Braintree iOS SDK is in active development, we welcome your feedback!

Here are a few ways to get in touch:

Help

License

The Braintree iOS SDK is open source and available under the MIT license. See the LICENSE file for more info.

Description

  • Swift Tools 5.10.0
View More Packages from this Author

Dependencies

  • None
Last updated: Thu May 15 2025 18:31:23 GMT-0900 (Hawaii-Aleutian Daylight Time)