DATALYR

Stripe to X Conversion API.

Send every Stripe payment to X so campaigns optimize on real revenue. Each payment reaches your X pixel with the ad click attached.

What gets sent.

What DATALYR sends from Stripe to X Conversion API
DATALYR eventWhen it firesSent to X asWhat it carries
checkout.session.completedA Checkout Session is paidPURCHASEThe rule's value, else the amount paid, in the event's currency, the twclid click ID, and hashed email and phone
invoice.payment_succeededAn invoice is paid, such as a subscription paymentPURCHASEThe rule's value, else the amount paid, in the event's currency, the twclid click ID, and hashed email and phone

How it's matched.

DATALYR checks these in order and stops at the first one that finds the ad click.

  1. The visitor ID on the Stripe object: client_reference_id on a Checkout Session, metadata.visitor_id on a PaymentIntent or Subscription
  2. For Checkout, the session ID the site reported as the browser left for Stripe
  3. The customer email, when no ad click was found

X gets the twclid click ID and the _twpid cookie, plus email and phone hashed with SHA-256. X needs twclid, a hashed email or a hashed phone to match.

How it works.

  1. 01

    Connect Stripe.

    Open Sources, select connect on Stripe and finish Stripe's sign-in. DATALYR owns the webhook, so you create nothing in Stripe. Pass the visitor ID when you create a Checkout Session or PaymentIntent. Payment Links get it automatically.

  2. 02

    Connect X.

    In X Ads Manager, open Tools, Events Manager. Copy your Pixel ID and generate a Conversion API access token. In Sources, connect X Ads with both. In the X events step, paste the X Event ID into the Purchase Tracker row and Save. DATALYR creates one rule per trigger. A $0 purchase is not sent.

  3. 03

    Check one conversion.

    Complete one real Stripe payment from an X ad click. Find checkout.session.completed or invoice.payment_succeeded in Events, then open the newest row in Conversions and read the reply from X.

Check it worked.

  • X adds twclid to every website click. Keep it on the landing URL through every redirect, and look for it on the payment's event in Events.
  • X has no test mode. Select send test event and DATALYR checks the event without sending it.
  • Trigger one real conversion and confirm the rule's sent count went up by 1. In X Ads Manager, open Tools, Events Manager, open the event and confirm X recorded it.

View docsStripe revenueX AdsConversion delivery

Questions, answered.

Contact us
  • In X Ads Manager, open Tools, Events Manager, open the event, then Install event, Conversion API. The ID looks like tw-pixel-id. Paste it into the matching row in the X events step.

  • No, when both the pixel copy and the server copy arrive. They carry the same Event ID and conversion_id, the order ID or else the DATALYR event ID, and X keeps one within 48 hours. If your own code also fires X events, remove those calls. They carry other IDs, so X counts them again.

  • DATALYR stops at 30 days. Events from a customer who denied marketing consent, or whose browser sends Do Not Track or Global Privacy Control, are not sent.

See what really drives revenue.

Real-time attribution, analytics and conversions for every channel, campaign and ad, ready for your team and your agents.

Get started