Skip to main content
Braintree → X AdsIntegration guide

Connecting Braintree to X Ads

Braintree is a payment gateway rather than a storefront, so it sits underneath whatever is taking the order and holds the transaction itself. X is a conversation platform where a large share of engagement is discussion rather than intent, which makes the gap between engagement metrics and conversions unusually wide. The join between them succeeds or fails on one thing: whether the twclid click identifier reaches the Braintree transaction before the conversion happens, because X Ads can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Braintree to X Ads: twclid through the in-app browser and PayPal

X's in-app browser plus PayPal and Venmo handoffs make pixel-only tracking lose conversions. Read twclid on landing, keep it server-side, and write it to a Braintree custom field at sale. On settlement, send the X Conversions API purchase with twclid, hashed email, value, currency and your order ID as conversion ID, shared with any pixel event.

X sends a large share of clicks through its in-app browser, and Braintree's PayPal and Venmo flows hand the buyer to another window or app to approve payment. Put those together and a browser-only X pixel loses the conversion more often than on almost any other pair. The fix is to stop needing the browser at the end: read twclid on landing, keep it server-side, and write it into a Braintree custom field when the sale is created.

When the transaction settles, send the conversion to the X Conversions API using the purchase event you created in X Events Manager, with the twclid, the hashed email, the settled value and currency, and your order ID as the conversion ID. If the X pixel also fires on the confirmation page, it must carry that same conversion ID. X volumes are often small, so test one real PayPal order and one card order and confirm each appears once.

Be realistic about what reaches Braintree. Plenty of X users click in the app, browse, and buy days later on a laptop. That order has no twclid in its custom fields, and the hashed email is the only chance of a match. Reporting X's matched purchases against settled Braintree transactions that carried a twclid is the comparison that tells you whether the gap is collection or behavior.

Braintree → X Ads · what breaks

Why this join usually fails — Braintree → X Ads

  1. 01

    The twclid click identifier 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

    Engagement mistaken for intent

    A post can be quoted, argued with and shared widely by people with no interest in buying anything. Optimising toward engagement on this platform reliably finds an audience that will never convert, and the engagement numbers look excellent throughout.

  4. 04

    Nothing reconciles afterwards

    Read the delivered and matched counts in X's reporting rather than assuming a 200 response means the event was usable.

Braintree → X Ads · the fix

What working looks like — Braintree → X Ads

  • The twclid click identifier on every transaction

  • Conversions arriving in X Ads

    The conversion is matched to a click or an engagement and becomes available for optimisation and reporting.

  • Reconciled against the source

Braintree → X Ads · architecture

How Braintree and X Ads 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

    X Ads needs a click to match

    An event X recognises, a conversion identifier for deduplication, hashed customer information, and the click identifier where you have it.

  3. 3

    The identifier is the bridge

    The twclid click identifier, 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

    X deduplicates browser and server events on a shared conversion ID. Send both without pairing them and every conversion counts twice — worth testing deliberately, because X volumes are often small enough that a doubling reads as a good week.

Braintree → X Ads · normal or broken

Working vs. broken, side by side — Braintree → X Ads

Normal, not a fault

  • The twclid click identifier present on the transaction

  • Sent from the Braintree transaction settlement webhook

  • Deduplicated correctly

    X deduplicates browser and server events on a shared conversion ID. Send both without pairing them and every conversion counts twice — worth testing deliberately, because X volumes are often small enough that a doubling reads as a good week.

  • Reconciles with the source

Actually broken

  • The twclid click identifier 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

    A post can be quoted, argued with and shared widely by people with no interest in buying anything. Optimising toward engagement on this platform reliably finds an audience that will never convert, and the engagement numbers look excellent throughout.

  • Nobody has reconciled it

Braintree → X Ads · diagnose

Diagnostic order — Braintree → X Ads

  1. 01

    Count transactions carrying the twclid click identifier

  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

    Compare engagement rate against conversion rate by campaign

    On X the two frequently move in opposite directions, and that divergence is the finding rather than a measurement fault.

  5. 05

    Read the match rate, not the success message

    Read the delivered and matched counts in X's reporting rather than assuming a 200 response means the event was usable.

Braintree → X Ads · prove

How it gets proven — Braintree → X Ads

Source of truth

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

  • The twclid click identifier confirmed present on a live transaction.
  • Conversions reconciled per order against imported figures, with deduplication verified on a live test.
  • A PayPal-funded transaction confirmed to report even though the buyer was redirected away.

Braintree → X Ads · free audit

What we check in the free audit

  • Count transactions carrying the twclid click identifier
  • Follow one real conversion end to end
  • Open a settled transaction and check its custom fields
  • Compare engagement rate against conversion rate by campaign
  • 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 → X Ads · when not to buy

When you don't need this — Braintree → X Ads

  • Measure identifier coverage yourself first — pull your last hundred transactions and count how many carry the twclid click identifier.
  • 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 X is a brand and community channel for you rather than a performance one, measure it that way and do not force a conversion pipeline onto it.

Braintree → X Ads · what we deliver

What gets built — Braintree → X Ads

  • 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 X Ads

    The X Conversions API, posted server-side with the click identifier and hashed customer data.

  • 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 → X Ads questions, answered

The buyer often clicks inside X's in-app browser, then leaves for PayPal or Venmo and never reaches your confirmation page. A server event from the settled transaction does not depend on that return.

Free · 30 min

Get Braintree and X Ads joined properly

Free30 minutesNo obligation