TrackRev
Blog
10 min read
Stripe webhooks marketing attribution

Stripe Webhooks for Marketing Attribution

Stripe webhooks capture payments server-to-server, immune to the 22% of pixel calls ad-blockers and Safari ITP drop. The reliable signal for your MRR driver.

Muzahid Maruf — Founder of TrackRev.io

Muzahid Maruf, Founder

LinkedIn

On this page
  1. 01Why This Matters for Your Revenue
  2. 02What a webhook actually is (no jargon)
  3. 03The 4 Stripe events marketers care about
  4. 04How each event maps to an attribution action
  5. 05Webhook reliability vs browser pixel: the numbers
  6. 06Setting up Stripe webhook attribution without a developer
  7. 07How to verify your webhook is attributing correctly
  8. 08Track Stripe webhooks automatically with TrackRev
  9. 09When NOT to use TrackRev for this

Explore with AI

Opens this article inside the chosen assistant with a ready-made prompt.

If link tracking is the mechanism for knowing which acquisition channel pays your MRR, the Stripe webhook is the moment of truth that closes the loop — it fires server-to-server the instant a payment succeeds, before any browser event, making it immune to the ad-blockers, Safari ITP, and iOS privacy settings that block 22% of client-side pixel calls.

Browser pixels miss 23% of Stripe payments — ad blockers, cookie consent decline, and page-close-before-pixel-fire all cause silent drop-out.

A Stripe webhook is an HTTP POST your Stripe account sends to your server the instant a payment event occurs, completely independent of any browser, cookie, or ad blocker — making it the most reliable attribution signal available to a SaaS marketing team. This guide explains what webhooks are in plain English, the four Stripe events every marketer should care about, and how to map each one to an attribution action without needing a developer on-call.

Key Takeaways

  • A Stripe webhook fires from Stripe's servers the instant payment succeeds — before any browser event fires — so it is immune to the 22% of pixel calls blocked by ad-blockers, cookie banners, and Safari ITP.
  • Marketers need four events: checkout.session.completed (first payment), charge.succeeded (fallback), customer.subscription.created (trial start), and invoice.payment_succeeded (renewals for LTV).
  • Webhook metadata is what links a payment to a marketing click — pass the visitor ID as trackrev_vid on the Checkout Session and every downstream renewal event carries it automatically.
  • Unlike pixels, webhooks retry on failure (Stripe retries for 3 days), so a server timeout never silently drops a conversion the way a tab-close drops a pixel.
  • GA4 'goal completions' are not Stripe payments — connecting a channel-level revenue attribution layer directly to Stripe webhooks is the only way to see which acquisition channel actually pays your MRR.

Why This Matters for Your Revenue

Attribution that depends entirely on browser-side pixels has a fundamental problem: the browser is not present at the payment. The payment happens in Stripe's infrastructure, not the visitor's tab.

So if the tab closed, the visitor declined cookies, an ad blocker intercepted the pixel request, or the checkout redirect lost the session, the conversion never reaches your attribution layer. Your best-performing campaigns look worse than they are.

Budget shifts to channels with less ad blocker exposure. Decisions compound on bad data.

Server-side webhook attribution breaks that dependency. When Stripe fires a checkout.session.completed event to your endpoint, your server receives it regardless of browser state.

If you have already linked a visitor identifier to that Stripe session — which TrackRev does automatically — you can credit the correct marketing click without touching a browser at all.

The result is attribution that matches your actual revenue, not your pixels' best guess.

What a webhook actually is (no jargon)

Think of a webhook as an automated text message that Stripe sends to your server when something happens — instead of you having to call Stripe every few seconds to ask "did anyone pay yet?"

How the message delivery works

When a customer completes a payment, Stripe immediately sends a small JSON package to a URL you specify.

Your server reads that package and does whatever you have programmed it to do: update a database, send a welcome email, or — most relevant to attribution — record that a payment occurred and link it to the marketing click that brought the customer.

Stripe's own webhooks documentation notes that it retries delivery for up to three days with exponential backoff in live mode, so a brief server outage never silently drops the event.

Webhook vs pixel: who sends the message

The key difference from a browser pixel is who sends the message. A pixel is fired by the customer's browser. A webhook is fired by Stripe's servers. The customer's browser can be blocked, closed, or misconfigured. Stripe's servers are not.

The 4 Stripe events marketers care about

Stripe emits over 250 distinct event types in its API events reference, but for marketing attribution you only need four. These are the moments that map to real revenue changes — trial start, first charge, subscription creation, and recurring payment.

Stripe webhook events for attribution
checkout.session.completed// Fires when a Checkout Session is paid. The primary event for// attributing a new customer's first payment to a marketing click. charge.succeeded// Fires when any charge succeeds — including one-time payments that// bypass Checkout. Use this as a fallback if you have multiple payment flows. customer.subscription.created// Fires when a new subscription is created (even on a free trial).// Lets you attribute trial starts, not just paid conversions. invoice.payment_succeeded// Fires every time a recurring invoice is paid. Use for LTV tracking —// credit the marketing channel every time a retained customer pays again.

How each event maps to an attribution action

Receiving the webhook is the first step. Connecting it to a marketing click is the second. Here is how each event should translate into an attribution record.

checkout.session.completed → new customer attribution

This is the highest-value event for marketing teams. When Stripe fires it, the payload contains the customer ID, the amount, and any metadata you passed into the Checkout Session — including a visitor token.

TrackRev injects a trackrev_vid into the Checkout Session metadata automatically; when the webhook fires, it reads that token, looks up the original click, and records the conversion against the correct channel. No pixel required.

customer.subscription.created → trial attribution

Free trials that never convert are invisible in pixel-based attribution because no revenue changes hands. By listening to customer.subscription.created, you can attribute the trial start itself — and later compute trial-to-paid rates per channel.

A channel that drives 50 trials but 40 conversions is better than one that drives 200 trials and 20 conversions. You cannot measure this without server-side events.

invoice.payment_succeeded → LTV attribution

Every recurring invoice that succeeds is additional revenue from a customer acquired by a specific channel. By crediting each renewal back to the original acquisition channel, you build a true LTV-per-channel view rather than just cost-per-acquisition.

A paid social channel that looks expensive per new customer may look cheap per dollar of 12-month revenue. Read more in channel LTV by marketing source.

Webhook reliability vs browser pixel: the numbers

The reliability gap between server-side webhooks and browser-fired pixels is not theoretical. Based on TrackRev platform data across SaaS workspaces, webhook-based attribution captures measurably more conversions than pixel-only setups — particularly in the segments where high-value buyers concentrate.

Stripe's own webhook best-practices guide documents the signature verification, idempotency, and retry handling that make this delivery channel dependable enough to attribute revenue against.

Capture rate comparison by method

Attribution methodConversion capture rateBlocked by ad blockersAffected by cookie consentWorks after tab close
Stripe webhook (server-side)98%NoNoYes
Browser pixel (client-side)77%Yes (23% block rate)Yes (decline rate 15–40%)No
GA4 conversion event71%YesYesNo
Zapier Stripe trigger94%NoNoYes

Based on TrackRev platform data, 2026. Capture rates measured against Stripe dashboard totals across 120 SaaS workspaces.

Event-to-use-case mapping

Use caseBest webhook eventPixel alternativePixel gap
New customer acquisitioncheckout.session.completedThank-you page pixelTab close, blocker
Free trial startcustomer.subscription.createdNone reliableNo revenue = no pixel
First charge (non-checkout flow)charge.succeededRedirect pixelSame as above
Monthly/annual renewalinvoice.payment_succeededNoneRecurring; no page visit
Revenue by channel (LTV)invoice.payment_succeeded (all)Impossible client-sideNo session after signup

Stripe webhook events mapped to attribution use cases. Pixel gaps are structural — not fixable with better pixel placement.

Setting up Stripe webhook attribution without a developer

The traditional approach requires a developer to write endpoint code, deploy it, and maintain it. TrackRev removes that requirement.

No-code setup with TrackRev

You connect Stripe with a restricted API key (read-only), and TrackRev creates and manages the webhook endpoint on your behalf — listening for the four events above and automatically linking each payment to the click that preceded it via the visitor token.

There is no server to configure, no code to write, and no endpoint to maintain.

Manual and Zapier-based alternatives

If you prefer to receive webhooks yourself and pass the data to TrackRev, the Stripe revenue attribution guide covers the manual connection.

For teams using Zapier as middleware, the Zapier workflow guide covers how to chain Stripe webhooks into downstream actions. See also the comparison of server-side vs client-side tracking for a deeper technical breakdown.

How to verify your webhook is attributing correctly

After connecting Stripe, you need to confirm the full chain — from test payment to attributed conversion — before trusting live data.

Run a test payment in Stripe test mode

Run a test payment (Stripe's test mode accepts card number 4242 4242 4242 4242). In the TrackRev dashboard under analytics, the payment should appear within seconds with a channel label.

Troubleshoot unattributed payments

If it appears as "Unattributed," the visitor token was not passed into the Checkout Session — usually because the tracking script has not been placed before the checkout redirect.

The UTM parameters and Stripe attribution guide covers the session-passing mechanics in detail.

Test before you trust

After wiring up webhooks, compare your TrackRev conversion count against your Stripe dashboard payment count for the same 7-day window. If they are within 2%, your attribution is solid. A gap larger than 5% usually means a second checkout flow (a legacy payment page or a third-party checkout) is not passing the visitor token.

Track Stripe webhooks automatically with TrackRev

TrackRev connects to Stripe in three minutes using a read-only API key and handles webhook receipt, visitor-token matching, and channel attribution with no code required.

Every checkout.session.completed, customer.subscription.created, and invoice.payment_succeeded event is automatically linked to the tracking link the customer clicked — so your channel revenue figures match your Stripe revenue figures exactly.

Start with the free tier (1,000 events/month) to verify attribution before committing to a paid plan.

Stripe only fires the webhook once per event, so every downstream tool that reads it has to agree on what the event means — and the standard stack does not.

Most SaaS teams run Bitly Growth ($35/mo) for link tracking and Rewardful Starter ($49/mo) for affiliates — $84/mo for two tools with two different definitions of a conversion.

TrackRev is $39/mo for both, on the same Stripe data, with no monthly reconciliation between systems.

One webhook subscription feeds both the channel attribution and the affiliate commissioning, so a single checkout.session.completed event drives both the channel report and the partner payout.

If you want one webhook to do one job correctly, route it through one tool.

When NOT to use TrackRev for this

If your Stripe account processes payments for multiple unrelated products with completely different marketing funnels, a single TrackRev workspace will mix attribution across them — you would need a workspace per product.

Likewise, if your checkout is fully server-side with no browser session (B2B invoicing, sales-assisted deals, or API-only integrations), there is no first click to attribute to. Webhooks will capture the payment; there simply is no marketing click on record.

For those deals, CRM-based attribution is more appropriate than click-based tracking.

Found this useful? Share it.

PostLinkedIn

Frequently asked questions

Muzahid Maruf — Founder of TrackRev.io

Written by

Muzahid Maruf, Founder, TrackRev.io & Contant.io

Muzahid Maruf is the founder of TrackRev.io and Contant.io. He writes about marketing attribution, link tracking, and revenue analytics for SaaS teams.

Writes about Marketing attribution · Link tracking · Revenue analytics · SaaS growth

Keep reading

Related articles from the TrackRev blog.

Stop guessing where your revenue comes from.

Set up TrackRev in 5 minutes. Free tier covers 1,000 events / month — no card needed.

Stripe Webhooks for Marketing Attribution · TrackRev