Stripe conversion tracking aims to link each paid Stripe order to the website visit and ad click that led to it, and to report it once to GA4, Google Ads and Meta with the order amount and currency Stripe records on the paid object. For Checkout and Payment Links, store the visit’s click data before payment, pass a reference to Stripe, and send the purchase from Stripe’s webhook after the chosen success event passes your checks, instead of from the thank-you page.
Even a correctly built, monitored setup loses that link in four cases: the visitor gave no consent, no identifier was captured, the join to the stored visit fails, or Stripe’s delivery retries run out. Refunds and disputes can still follow a payment that passed your checks.
A webhook is a message Stripe’s servers send to a URL on your server when something happens, such as a payment succeeding. Your handler for it should be idempotent, which means a repeat of the same message changes nothing, so a replayed webhook or a reloaded success page shouldn’t send a second purchase. It cuts duplicates down but can’t rule out every one; the Meta section below covers the case it misses.
This guide walks through the server path with the actual payloads for GA4 and Google Ads, the value each one should carry, and the checks I run before trusting the numbers.
The paid event decides what counts
Stripe names each webhook by what happened, but the event name doesn’t tell you whether money moved. Your handler has to read the object and its status.
| Stripe event | When it can become a purchase conversion |
|---|---|
checkout.session.completed |
payment_status is paid and amount_total is above zero |
checkout.session.async_payment_succeeded |
A delayed method (bank debit, voucher) succeeded after Checkout completed |
checkout.session.async_payment_failed |
Never. The delayed payment failed, so nothing is sent as a purchase |
One detail in Stripe’s own reference changes how you write that filter. A completed session can still be processing: the Checkout Session object describes complete as “Payment processing may still be in progress”. So check payment_status and the amount, not just the event name.
“Paid” also isn’t “settled”: a dispute or refund can reverse it later, so handle reversals as adjustments, covered below.
Not covered here: custom PaymentIntent integrations and subscription renewals (invoice.paid) need their own field mapping and order key. Start from Stripe’s PaymentIntent object and subscription webhooks guide. This guide covers Checkout and Payment Links for one-time payments.
Why the success page can’t be the trigger
Hosted Checkout and Payment Links run on Stripe’s domain. The buyer leaves your site, pays, and only comes back on a redirect. A tag on that redirect page inherits every weakness of browser tracking at the moment it matters most.
| Success-page tag | Verified webhook | |
|---|---|---|
| Fires when | A browser loads the return URL | Stripe posts the event to your endpoint |
| Missed if the buyer closes the tab | Yes | No. Stripe retries failed deliveries for up to 3 days |
| Can fire again on refresh or a direct visit | Yes | No, if the handler is idempotent |
| Knows about a delayed payment that clears later | No | Yes, through the later success event |
Can check payment_status and amount |
Only by calling your server | Yes |
Reading the session ID from the success URL doesn’t fix this. The ID is real, but the tag still fires on every load of that URL. Deduplication, where a destination drops a repeat that carries the same order ID, softens the refresh problem: Google’s transaction ID guide says GA4 “deduplicates purchase events with the same transaction ID”, and Google Ads documents the same fix in its transaction ID help. It still sends requests for orders that later failed, and it says nothing about buyers who never returned.
Stripe’s fulfillment guide states the limit in its own words: “You can’t rely on triggering fulfillment only from your checkout landing page, because it’s not guaranteed customers visit that page.” If you want to see which of these your current tag depends on, the purchase event test checks it with three test checkouts.
Send the value Stripe records, not the cart total
The purchase value should come from the payment webhook too. The webhook carries the order amount and currency Stripe recorded for the payment. A thank-you page or cart only knows what the order said when it was placed, which includes orders that never paid.
That number decides more than a revenue column when a campaign bids on value. Value-based bidding, such as Meta’s value optimization or Google Ads’ Target ROAS, aims for the most purchase value instead of the most purchases, and it learns what buyers are worth from the values you report. Google’s Target ROAS help says “Google Ads predicts future conversions and associated values using your reported conversion values”. Meta’s custom data reference marks value as “Required for purchase events or any events that utilize value optimization.”
Katie Glass (Meta) at Stape Relay, November 10, 2026: “accuracy matters more than volume”. In paraphrase, the rest of her point: when you optimize for value, the system bids on the value you send, so a wrong or inconsistent value carries into the bidding.
A pay-later example
Here is how a value taken at order time goes wrong. The numbers are an example. You get three orders of US$100 on the same day. Two buyers pay by card. The third picks a pay-later method, a voucher such as Boleto in Brazil or a bank debit such as ACH in the US, and never pays. Stripe’s Boleto docs say the voucher “expires after 3 days by default”.
For those methods, Stripe’s fulfillment guide says “funds won’t be immediately available when Checkout completes”, and the payment only counts once checkout.session.async_payment_succeeded arrives. A tag that fires when the order is placed counts all three.
| Order | Value sent by an order-time tag | Value sent from the paid webhook |
|---|---|---|
| 1, card | US$100 | US$100, from checkout.session.completed with payment_status paid |
| 2, card | US$100 | US$100, same event |
| 3, voucher never paid | US$100 | Nothing. The session completes with payment_status unpaid, and no async_payment_succeeded follows |
| Total reported | US$300 | US$200 |
| Total you were paid | US$200 | US$200 |
The order-time value is 50% above what you were paid (US$300 against US$200), and value bidding works from that number. If more of your buyers pick pay-later methods, the gap can widen. That’s an inference from the example, not a measured result.
Which Stripe fields to send
Both checkout.session.completed and checkout.session.async_payment_succeeded carry the Checkout Session, so every number comes from that object in the webhook.
| Destination field | Take it from | What the destination’s docs say |
|---|---|---|
Meta value |
amount_total, converted from minor units |
“A numeric value associated with the event. This must represent a monetary amount.” |
Google Ads conversionValue (Data Manager) |
amount_total, converted |
“Set to the currency value, not the value in micros. For example, for a conversion value of $5.23, use the value 5.23.” |
GA4 value |
amount_total minus total_details.amount_tax and total_details.amount_shipping |
“Set value to the sum of (price * quantity) for all items in items. Don’t include shipping or tax.” Send those in tax and shipping |
currency on all three |
The session’s currency, uppercased. With Adaptive Pricing this is still your price currency, matching amount_total |
Stripe returns it “in lowercase”; GA4 asks for “3-letter ISO 4217 format” |
| Order ID on all three | The session id |
One ID per order, the same everywhere |
Stripe defines amount_total as the “Total of all items after discounts and taxes are applied”, so a coupon is already taken off. Meta and Google Ads don’t say whether tax belongs in the value. Pick one rule for them, write it down, and apply it to every order, because an inconsistent value is the kind of error Glass warned about. My default is the session’s amount_total.
With Stripe’s Adaptive Pricing, a buyer can pay in their own currency, but “The Checkout Session and the underlying PaymentIntent objects reflect what your customer paid in your integration currency and amount, which is the currency you specified for your prices.” So all three destinations get the session’s currency. Meta and Google Ads get amount_total, GA4 gets amount_total minus tax and shipping (table above), and none gets the presentment_details amount.
Purchase value checklist
- The purchase is sent only after the chosen success event passes your checks:
payment_statusispaidorcheckout.session.async_payment_succeededarrived, and the amount is above zero. Refunds and disputes can still follow. - The value comes from
amount_totalon the session in the webhook, never from the page, the cart or a hardcoded price. - Minor units are converted per currency: divide by 100 for two-decimal currencies, and not at all for zero-decimal ones like JPY (step 3 below).
- The currency comes from the same session and is sent in uppercase.
- The GA4 value leaves out tax and shipping, which travel in their own parameters.
- Every destination gets the session ID as the order ID, and your handler records each session it has sent so it doesn’t send it again (step 2).
- Refunds go out as adjustments where the destination supports them (see “Refunds”).
- Once a month, a sanity check sets each destination’s value total beside the comparable Stripe total for the same days:
amount_totalfor Meta and Google Ads, andamount_totalminus tax and shipping for GA4.
What to have in place before you write the handler
- A Stripe webhook endpoint with its own signing secret (
whsec_…), separate from your secret key. - A small first-party store for attribution rows, keyed by a random ID you generate.
- A GA4 web stream’s measurement ID and a Measurement Protocol API secret.
- A Google Ads conversion action of the “Website (Import from clicks)” type, its conversion action ID, and Data Manager API access through your own Google Cloud project or a host connector.
- A written rule for which Stripe events count and what value each one carries, including refunds.
Step 1: store attribution before checkout and pass only a reference
Attribution is the record of which visit and ad click led to a sale. The webhook doesn’t have it, because Stripe never saw your ad. So you save it before the buyer leaves.
When the visitor clicks Buy, your page sends the permitted context to your own endpoint: click IDs, UTMs, the GA4 client_id and session ID, the consent state and a timestamp. Click IDs are the codes an ad platform adds to your URL when someone clicks an ad, such as gclid, gbraid and wbraid for Google, fbclid or the _fbc cookie for Meta, and ttclid for TikTok, so it can tie a later sale back to that click. The consent state is what the visitor chose on your cookie banner. The endpoint writes the row and returns a random reference. Only that reference goes to Stripe. The first-party click ID index guide covers that row, its retention and its failure branches in detail.
Where the reference goes depends on the checkout path.
| Checkout path | Where you pass the reference | Where you read it back |
|---|---|---|
| Checkout Session created by your server | client_reference_id (or metadata) on the create call |
The session in checkout.session.completed |
| Payment Link | ?client_reference_id= on the link URL |
The session in checkout.session.completed |
| Embedded Pricing Table | client-reference-id attribute on the element |
The session in checkout.session.completed |
Payment Links have rules that break the join without any error. Stripe’s Payment Link URL parameters page (checked 2026-11-10) says client_reference_id “can be composed of alphanumeric characters, dashes, or underscores, and be any value up to 200 characters. Invalid values are silently dropped, but your payment page continues to work as expected.” A reference with a dot or a colon simply disappears. Generate references from [A-Za-z0-9_-] only.
UTMs on a Payment Link behave differently. They need redirect as the confirmation behaviour, and Stripe appends them to the redirect URL. They don’t arrive in the webhook, which is why the reference, not the UTMs, carries the join.
Step 2: verify the webhook, queue the work, then answer
Verify the signature against the raw request body with the endpoint’s signing secret. A framework that parses and re-serialises the JSON before you verify will fail every signature. Then check livemode, the event type, payment_status and the amount.
Answer Stripe quickly. The webhooks guide (checked 2026-11-10) says to return a 2xx “before any complex logic that could cause a timeout” and to process events with “an asynchronous queue”. In practice: verify, write the job to durable storage, return 200, and let a worker send to each destination with its own retry. One failing destination shouldn’t block the others.
Stripe’s delivery behaviour shapes the idempotency rules:
- In live mode Stripe retries a failed delivery “for up to three days” with exponential backoff.
- Stripe doesn’t guarantee event order, so your handler can’t depend on events arriving in a specific order.
- The same event can arrive twice. Store the Stripe event ID and skip repeats. Stripe also notes that two event objects can describe one change.
- Event IDs aren’t enough for a purchase: a completed session and its later
checkout.session.async_payment_succeededshare the same Checkout Session ID. Key the purchase on that session ID, record each destination’s result, and retry only the destinations that failed. That keeps repeats rare, though a send whose response was lost can still repeat (see the Meta section below).
Step 3: send the GA4 purchase through Measurement Protocol
Measurement Protocol is Google’s API for sending GA4 events from a server instead of a browser. As of November 10, 2026, Google’s Measurement Protocol pages say it “will remain operational with no plans for deprecation”, while recommending “building server-to-server event integrations using the Data Manager API” for new setups. The webhook has no browser, so GA4 only links the purchase to the original session (the visit that carried the ad click) if you send the identity you stored in step 1. Google’s Measurement Protocol use cases (checked 2026-11-10) set three conditions: include session_id, send the request “no later than 24 hours after the start of the online session”, and keep the event’s timestamp inside the session. Google’s requirements table puts timestamp_micros for session attribution at “>= session start and <= session end”.
That 24-hour rule matters for Stripe funnels. A buyer who clicks today and pays by bank debit next week can’t inherit the ad session through Measurement Protocol. The purchase still lands with its revenue, but its session source may read (not set) or a new session. Set timestamp_micros to when the payment happened, never to an earlier time picked only to land inside the session. The GA4 (not set) revenue guide covers that diagnosis.
Here is the shape I validate first, against the debug endpoint. All IDs are illustrative.
POST https://www.google-analytics.com/debug/mp/collect?measurement_id=G-XXXXXXXXXX&api_secret=REDACTED
Content-Type: application/json
{
"client_id": "123456789.1760000000",
"validation_behavior": "ENFORCE_RECOMMENDATIONS",
"events": [{
"name": "purchase",
"params": {
"session_id": "1760000000",
"engagement_time_msec": 1,
"transaction_id": "cs_live_EXAMPLE",
"currency": "USD",
"value": 49.00,
"tax": 0,
"shipping": 0,
"items": [{ "item_id": "pro_monthly", "item_name": "Pro plan", "price": 49.00, "quantity": 1 }]
}
}]
}
The example leaves timestamp_micros out, so GA4 uses the request time: “The timestamp_micros of events and user properties defaults to the request time.” That passes the session rule only while the session is still open. If the webhook can arrive later, set timestamp_micros to the payment time.
Stripe sends amounts in the currency’s smallest unit, and GA4 wants a decimal value. Divide by 100 for two-decimal currencies like USD or BRL, but not for zero-decimal ones like JPY, where Stripe’s currencies page says “the charge and the amount are the same, without requiring multiplication.” I found this bug in one of our own server templates on 2026-09-28: it divided every Stripe amount by 100, so a zero-decimal sale would have been reported at one hundredth of its value.
Google’s validation guide says “The validation server does not validate api_secret or firebase_app_id”, so a clean response says nothing about whether your secret works. Once it returns no messages, drop validation_behavior and send to /mp/collect, then confirm the purchase shows in GA4.
Step 4: send the Google Ads conversion through the Data Manager API
New builds shouldn’t use the Google Ads API for this. Offline conversion import means uploading conversions from your server instead of a browser tag, and Google’s offline import notice (checked 2026-11-10) says “Starting June 15, 2026, offline conversions import and enhanced conversions for leads uploads will be migrated to the Data Manager API and blocked in the Google Ads API”, and that developer tokens with no requests between January and June 2026 won’t keep legacy access. I hit that block on a client account on 2026-06-26: UploadClickConversions returned CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE, with the message that new integrations “should use the Data Manager API”.
A conversion action is the named goal in Google Ads that these uploads count against. The Data Manager offline events guide requires a conversion action of type UPLOAD_CLICKS, an eventTimestamp, an eventSource, and at least one identifier. This is the shape of a request I validated with validateOnly on 2026-06-09, which answered HTTP 200 with a requestId. The IDs and values below are illustrative:
POST https://datamanager.googleapis.com/v1/events:ingest
{
"destinations": [{
"operatingAccount": { "accountType": "GOOGLE_ADS", "accountId": "1234567890" },
"loginAccount": { "accountType": "GOOGLE_ADS", "accountId": "1234567890" },
"productDestinationId": "7000000000"
}],
"encoding": "HEX",
"consent": { "adUserData": "CONSENT_GRANTED", "adPersonalization": "CONSENT_DENIED" },
"validateOnly": true,
"events": [{
"transactionId": "cs_live_EXAMPLE",
"eventTimestamp": "2026-10-17T14:05:00-03:00",
"eventSource": "WEB",
"currency": "USD",
"conversionValue": 49.00,
"adIdentifiers": { "gclid": "<stored gclid>" },
"userData": { "userIdentifiers": [{ "emailAddress": "<sha256 of normalized email>" }] }
}]
}
This request is a dry run. With validateOnly set to true, Data Manager checks the request and ingests nothing. For the real send, remove the field or set it to false, then check processing with the requestId that production call returns.
operatingAccount is the account that owns the conversion action. loginAccount is the account your credential reaches it through, which is the manager ID when access runs through an MCC. The consent fields should carry the state you stored with the row, not a default of granted.
A missing click ID only leaves a fallback if you built one. Google’s enhanced conversions for leads guide (checked 2026-11-10) describes the feature as “an upgraded version of offline conversion import that uses user-provided data, such as email addresses, to supplement imported offline conversion data”, and lists the GCLID as “Required if you are not implementing a tag to collect user-provided data”. The handler above doesn’t set that tag up, so without it and the customer data terms accepted, don’t count on a row with no GCLID matching.
A 200 means received, not processed. Data Manager processes requests asynchronously, and rows rejected after the 200 only show up through requestStatus:retrieve. On 2026-09-26 I saw a request still marked PROCESSING minutes after it was sent, so poll later rather than right away.
Meta and TikTok from the same paid order
The same verified job can feed the Meta Conversions API and the TikTok Events API, each with its own field names. The rule that bites most is Meta’s. Its deduplication page says it “Does not deduplicate events when only using one event source, that is browser-only or server-only.” So a server-only Purchase sent twice with the same event_id can count twice. The per-session record from step 2 is your main protection, and it has a gap: if a destination accepted a send but the response was lost, the retry can still create a duplicate. Where a platform drops a repeat, it does so by ID. GA4 deduplicates by transaction_id, and for Google Ads the Data Manager guide says that for a repeated transactionId in the same conversion action, “Google Ads uses the first event received and treats subsequent events as conversion adjustments.” Meta’s event_id pairs a browser copy with a server copy, which a server-only send doesn’t have.
Meta also needs to tie each purchase to a person. A matched event is one Meta could link to one of its users through the click ID or customer details you sent, and Meta’s best practices page says “You can use only matched events for ads attribution and ad delivery optimization.” The guide to purchases Meta receives but doesn’t credit shows how to check that, and the Event Match Quality guide explains Meta’s score for it.
To confirm Meta received the server copy, I read the dataset’s /stats endpoint with aggregation=event_source, which splits hourly counts by where the events came from. In our own readbacks on 2026-10-07, the buckets were labelled BROWSER and SERVER and appeared roughly one hour after the events. The Meta Conversions API guide covers the field mapping.
Refunds
Refunds arrive after the purchase, so they’re adjustments, not filters. On the Data Manager path built above, a partial refund is a restatement: send the same transactionId to the same action with the new value. Google’s Data Manager upgrade guide (checked 2026-11-10) says the API “doesn’t support conversion retractions” and “You can restate the value of a conversion, but the conversion count will remain the same”, so a full refund restated to zero still counts as one conversion.
Removing the conversion entirely takes a route with RETRACT. Google’s conversion adjustments guide (checked 2026-11-10) describes retracting a conversion completely or restating its value, matched by order ID, within 54 days, and says “For best results, upload conversion adjustments at least 24 hours after the original conversion”. Use the same transaction ID you sent at purchase. Destinations without an adjustment contract shouldn’t receive an invented negative Purchase. Keep the refund in your own reporting so gross and net stay visibly different.
Reconcile before you trust the dashboards
Once a month, run a sanity check of similar measures for the same dates: Stripe paid sessions that pass your rule, distinct GA4 transaction_id values, Google Ads conversions for the action, and Meta SERVER Purchases from /stats. For value, set Stripe’s amount_total sum beside the Meta and Google Ads values, and the same sum minus total_details.amount_tax and total_details.amount_shipping beside GA4 purchase revenue. They won’t match exactly. Consent choices, platform matching, each platform’s attribution rules and the date each one reports a conversion on all move them apart. What you’re looking for is a gap you can’t explain, such as one destination falling well below Stripe after a site change.
Then run the awkward paths on purpose: a refresh of the success URL, a replayed webhook, a delayed payment that fails, a delayed payment that never pays, a refund, and a Payment Link reference with an invalid character.
What it costs
The running cost depends on where the handler lives. On a managed server container, Stape lists a Free plan up to 10K requests and Pro at US$20 a month, or US$17 a month billed annually, for up to 500K requests (checked 2026-11-10). Its Data Manager API connection is “available for sGTM containers on the Pro subscription plans and higher”, per Stape’s connection guide (checked 2026-11-10). A self-hosted handler or a serverless function also works. The server-side GTM guide covers hosting choices, and the multi-tenant sGTM guide shows how one server tag can route verified webhook purchases for several partners.
If you’d rather not maintain the handler yourself, ATA Edge runs this webhook-first purchase path to Meta’s Conversions API from your own Cloudflare account. On Stripe it covers one-time payments. Subscriptions aren’t covered yet.