Skip to main content
Braintree → SalesforceIntegration guide

Connecting Braintree to Salesforce

Braintree is a payment gateway rather than a storefront, so it sits underneath whatever is taking the order and holds the transaction itself. Sending conversions into Salesforce rather than out of it is how marketing data reaches the place sales actually works. The join between them succeeds or fails on one thing: whether the Lead or Contact identity reaches the Braintree transaction before the conversion happens, because Salesforce can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Braintree payments into Salesforce: settled money on the right Account

Store the Braintree customer ID on the Salesforce Account or Contact, with the Salesforce record ID in a Braintree custom field, rather than matching on email. On settlement, write each transaction and each recurring charge to a custom object or Opportunity payment field. Verify the integration user's field-level access in the UI, and flag disputes for the account owner.

This pairing makes sense when Braintree bills customers that sales owns in Salesforce: SaaS on Braintree recurring billing, B2B buyers paying invoices by card, or high-ticket orders following a sales call. The goal is to put settled money next to the Opportunity that marketing sourced, so closed-won is checked against payments actually received rather than a rep's booking.

The join key is a Braintree customer ID stored on the Salesforce Account or Contact, written once when the customer is created, ideally with the Salesforce record ID stored back in a Braintree custom field. Matching by email instead breaks when finance pays the card and someone else signed the deal. When a transaction settles, write it to a custom object or a payment field on the Opportunity, and for subscriptions write each successful recurring charge, because renewals are where the lifetime value that sales gets credited for actually arrives.

The Salesforce-side risk is that the integration user lacks field-level access to the field you write and the write appears to succeed. Check the record in the UI. Also decide early who owns a refund or dispute: a disputed transaction on a closed-won Opportunity should be visible to the account owner, and Braintree's dispute webhooks give you the trigger to flag it.

Braintree → Salesforce · what breaks

Why this join usually fails — Braintree → Salesforce

  1. 01

    The Lead or Contact identity never reaches Braintree

    Braintree is a gateway, so it sees the payment and not the marketing. The identifier has to be attached at the point your application creates the transaction, through custom fields, or it never enters Braintree at all.

  2. 02

    A gateway that knows nothing about marketing

    Braintree sees a payment. Whether it can be tied to a click depends entirely on whether your own application attached the identifier when creating the transaction, and most do not.

  3. 03

    Writes that succeed and change nothing

    Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.

  4. 04

    Nothing reconciles afterwards

    Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.

Braintree → Salesforce · the fix

What working looks like — Braintree → Salesforce

  • The Lead or Contact identity on every transaction

  • Conversions arriving in Salesforce

    The marketing context appears on the record and flows into the opportunity, where sales and reporting can both use it.

  • Reconciled against the source

Braintree → Salesforce · architecture

How Braintree and Salesforce actually connect

  1. 1

    Braintree holds the truth

    Settled and authorised are different states. Authorisation reserves the funds; settlement is money moving, and reporting on the wrong one produces a persistent gap against your bank.

  2. 2

    Salesforce needs a click to match

    Salesforce needs a resolvable record and a custom field to write to. Field-level security and validation rules can silently reject writes, which is a Salesforce-specific failure that returns success at the API level and changes nothing.

  3. 3

    The identifier is the bridge

    The Lead or Contact identity, captured at the visit and carried into the Braintree transaction.

  4. 4

    The event source decides reliability

    Fire on settlement rather than authorisation, and note that Braintree's PayPal and wallet flows redirect the buyer away — so the confirmation page is not a reliable trigger.

  5. 5

    Deduplication at the destination

    Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.

Braintree → Salesforce · normal or broken

Working vs. broken, side by side — Braintree → Salesforce

Normal, not a fault

  • The Lead or Contact identity present on the transaction

  • Sent from the Braintree transaction settlement webhook

  • Deduplicated correctly

    Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.

  • Reconciles with the source

Actually broken

  • The Lead or Contact identity missing on most records

    Braintree is a gateway, so it sees the payment and not the marketing. The identifier has to be attached at the point your application creates the transaction, through custom fields, or it never enters Braintree at all.

  • Sent from the browser

    Braintree sees a payment. Whether it can be tied to a click depends entirely on whether your own application attached the identifier when creating the transaction, and most do not.

  • Counted twice, or not at all

    Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.

  • Nobody has reconciled it

Braintree → Salesforce · diagnose

Diagnostic order — Braintree → Salesforce

  1. 01

    Count transactions carrying the Lead or Contact identity

  2. 02

    Follow one real conversion end to end

  3. 03

    Open a settled transaction and check its custom fields

    If the identifier is not there, your application never attached it and nothing downstream can recover it.

  4. 04

    Write a test value and open the record in the UI

    The API saying it worked and the field actually holding the value are different things in Salesforce more than anywhere else.

  5. 05

    Read the match rate, not the success message

    Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.

Braintree → Salesforce · prove

How it gets proven — Braintree → Salesforce

Source of truth

Braintree's transaction records, filtered to settled, for the same window.

  • The Lead or Contact identity confirmed present on a live transaction.
  • A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
  • A PayPal-funded transaction confirmed to report even though the buyer was redirected away.

Braintree → Salesforce · free audit

What we check in the free audit

  • Count transactions carrying the Lead or Contact identity
  • Follow one real conversion end to end
  • Open a settled transaction and check its custom fields
  • Write a test value and open the record in the UI
  • Read the match rate, not the success message

Checked against

Braintree's transaction records, filtered to settled, for the same window.

Get my free conversion tracking audit

Free30 minutesNo obligation

Braintree → Salesforce · when not to buy

When you don't need this — Braintree → Salesforce

  • Measure identifier coverage yourself first — pull your last hundred transactions and count how many carry the Lead or Contact identity.
  • If your platform already reports orders accurately and Braintree is purely the funding rail, work at the order layer instead — it is closer to the customer.
  • If your Salesforce org is administered by a team you cannot get time with, scope their availability before starting — this build is usually blocked on admin access rather than on the work.

Braintree → Salesforce · what we deliver

What gets built — Braintree → Salesforce

  • Identifier capture into Braintree

    Pass the click identifier into the transaction's custom fields when your server creates the charge. Braintree preserves them and they survive to the webhook and to any later refund.

  • Event source: the Braintree transaction settlement webhook

    Fire on settlement rather than authorisation, and note that Braintree's PayPal and wallet flows redirect the buyer away — so the confirmation page is not a reliable trigger.

  • Dispatch to Salesforce

    API writes to the Lead or Contact record, or a platform event, carrying the marketing context as custom field values.

  • Reversals where they exist

    Braintree exposes refunds and disputes, both carrying the original custom fields, so reversals are straightforward.

Written guarantee

95%+ tracking accuracy

Measured against Braintree's transaction records, filtered to settled, for the same window.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Braintree → Salesforce questions, answered

Store the Braintree customer ID on the Account when the customer is created and key every payment write on it. Email matching fails whenever the payer and the deal contact are different people.

Free · 30 min

Get Braintree and Salesforce joined properly

Free30 minutesNo obligation