Stripe Checkout attribution

Checkout completions with a visitor id become attribution markers on the timeline. Need a visitor snippet first? Create one in Settings → API.

What does not arrive

  • Any event type other than checkout.session.completed. Those are acknowledged and ignored.
  • Checkouts without client_reference_id (no marketing snippet visit, or Checkout not wired to pass the visitor id).
  • Revenue metrics from this webhook. The Stripe pull connector still owns charges and new payers.

What arrives

checkout.session.completed when client_reference_id is set. Kind attribution.

FieldWhat it is
kindattribution
titleAttributed checkout.
external_idStripe event id.
meta.visitor_idclient_reference_id from the Checkout Session.
meta.first_touch_referrerFrom the matching visit event, when present.
meta.first_touch_utmUTM fields from the matching visit, when present.
meta.stripe_customer_idSession customer id, when present.
meta.checkout_session_idCheckout Session id.

How it authenticates

In Stripe open Workbench → Webhooks → Create an event destination. Paste the Erdi endpoint URL. Subscribe only to checkout.session.completed. Reveal the signing secret (whsec_…) and paste it into Erdi. On Checkout, set client_reference_id to the visitor id from the marketing attribution snippet (localStorage ek_vid).

Paddle (same attribution model)

Paddle Billing carries the visitor id in custom_data.ek_visitor_id when you pass it to Paddle.Checkout.open. The existing Paddle webhook reads that on transaction.completed and calls the same recordAttributionConversion helper as Stripe. Setup and code example: Web attribution; Paddle destination detail: Paddle.

Signature

HMAC-SHA256 of t dot the raw body, hex, header Stripe-Signature (t= unix seconds; v1= hex). Default tolerance five minutes. See Stripe webhook signatures.

Set it up under Settings → Webhooks in your project.

Get started with ErdiKnows