Braintree

Braintree

Online payment processing platform used by marketplaces and platforms to handle complex payment flows. The Braintree SDK (owned by PayPal) tokenizes card and PayPal credentials and handles 3D Secure authentication. Injects an iframe-based payment form to keep card data off the merchant's servers.

Overview

Braintree, a PayPal company, is an online payment processing platform that handles credit card processing, PayPal integration, Venmo payments, ACH bank transfers, and 3D Secure authentication. It is widely used by marketplaces, subscription platforms, and e-commerce businesses that need a flexible payment gateway with support for complex payment flows, split payments, and recurring billing. Braintree's key differentiator is its iframe-based secure payment form (Drop-in UI) that keeps sensitive card data entirely off the merchant's servers.

What This Script Does

The Braintree JavaScript SDK (js.braintreegateway.com/web/*/js/braintree.min.js) and its Drop-in UI component manage the payment collection and processing lifecycle:

Secure payment form (Drop-in UI)

  • Injects a cross-origin iframe into the checkout page that renders the card input fields (number, expiry, CVV) inside a Braintree-controlled iframe
  • Card data entered by the customer is transmitted directly from the iframe to Braintree's servers — it never touches the merchant's server or JavaScript context, achieving PCI DSS SAQ A compliance
  • The iframe renders from assets.braintreegateway.com, keeping card data fully isolated from the merchant's domain

Payment tokenization

  • After the customer enters card details, the SDK calls Braintree's tokenization API and returns a one-time-use payment method nonce to the merchant's JavaScript
  • The merchant's server submits the nonce (not raw card data) to Braintree's API to complete the transaction
  • PayPal and Venmo flows redirect to PayPal's OAuth dialog, then return with a payment method nonce

3D Secure authentication

  • When 3D Secure is enabled, the SDK triggers a liability shift flow: an authentication challenge is presented to the cardholder by their issuing bank
  • The challenge renders in an iframe or popup; the authentication result is embedded in the payment nonce

Session management

  • Sets cookies to maintain the payment session and prevent duplicate charge submissions on form resubmission
  • Session cookies are scoped to the Braintree gateway domain and are short-lived (session duration only)

Consent & Compliance

  • Category: Essential — payment processing is necessary for completing a purchase transaction
  • GDPR: Braintree processes payment data under Article 6(1)(b) (performance of a contract) — the customer has entered into a transaction and payment processing is necessary to complete it. Consent is not the correct legal basis for essential payment infrastructure. Braintree is PCI DSS Level 1 certified.
  • Data transfers: Braintree is operated by PayPal, a US company. Payment data is processed in the US and, for EU merchants, optionally through EU data centers. Standard Contractual Clauses and EU-US Data Privacy Framework apply.
  • PCI compliance: Braintree's Drop-in UI achieves PCI SAQ A compliance for the merchant by isolating card data in cross-origin iframes. Raw card data never enters the merchant's environment.
  • Cookies set: Short-lived session cookies scoped to braintreegateway.com (HTTPOnly, Secure, session duration). No persistent tracking cookies are set on the merchant's domain.

Should You Block This Without Consent?

No consent required. Braintree is essential payment infrastructure. Its scripts are necessary to process customer payments — a core function of any e-commerce or subscription product. The data processed is strictly transactional, not behavioral or advertising in nature. Braintree should be categorized as essential and always loaded regardless of consent state. Disclose Braintree (and PayPal) as payment processors in your privacy policy.

Is Braintree GDPR compliant?

Braintree typically loads functional trackers, which are not strictly necessary for your site to work. Under the GDPR and the ePrivacy Directive, non-essential cookies and trackers must stay blocked until a visitor gives clear opt-in consent. So Braintree can be fully GDPR compliant, but only if your site holds its scripts until consent is granted and lets visitors decline just as easily. Compliance depends on how your site loads Braintree, not on Braintree itself.

Visit website

Consent Categories

Also Known As

BraintreePayPal Braintreepayment processing SDKBraintree iframe3D Secureonline payment cookies

Industries

Finance

Tracked Domains (3)

js.braintreegateway.comFunctional

js.braintreegateway.com is a functional domain operated by Braintree, used to run site features like chat, video, embeds, and preferences.

assets.braintreegateway.comFunctional

assets.braintreegateway.com is a functional domain operated by Braintree, used to run site features like chat, video, embeds, and preferences.

client-analytics.braintreegateway.comFunctional

client-analytics.braintreegateway.com is a functional domain operated by Braintree, used to run site features like chat, video, embeds, and preferences.

Frequently Asked Questions

Related Vendors

Elavon
Elavon
Elavon scripts embed hosted payment forms for processing card transactions on merchant websites. Scripts handle card data within Elavon's PCI-compliant hosted environment, preventing direct handling of sensitive card data by the merchant. Session data is used for fraud prevention.
Paidy
Paidy
Paidy scripts embed buy-now-pay-later payment option interfaces on Japanese e-commerce checkout pages. Visitors selecting Paidy as a payment method share purchase amounts, contact details, and billing information with Paidy's payment processing infrastructure to complete installment-based transactions.
Gumroad
Gumroad
Gumroad scripts embed product checkout overlays and purchase widgets on creator websites. Scripts handle payment processing, digital product delivery, and purchase confirmation; they set cookies to track checkout sessions and verify buyer eligibility for purchased content.
Jscrambler
Jscrambler
Jscrambler scripts protect JavaScript application code running in the browser through obfuscation, tampering detection, and runtime integrity monitoring. Scripts may also detect and block unauthorized third-party script injections and report client-side security events.
PayU
PayU
PayU scripts embed hosted checkout pages and payment forms on merchant websites across emerging markets. Scripts handle card data tokenization, local payment method flows, and transaction verification; they set session cookies to maintain checkout state and fraud detection signals.
Authorize.net
Authorize.net
Authorize.net scripts embed hosted payment forms and tokenize card data on checkout pages. Payment credentials are submitted directly to Authorize.net's servers without passing through the merchant's backend, enabling PCI-compliant transaction processing for e-commerce.

Manage consent for Braintree

ConsentStack automatically detects and manages Braintree trackers so your site stays compliant with global privacy regulations.