How Referral Attribution Works

Visits, cookies, last-click behavior, checkout vs invoice attribution, and subscription grandfathering.

Attribution connects a Stripe sale to the affiliate who referred the customer. Partnersify uses several signals depending on how the sale was created.

Visits and cookies

When a visitor arrives via an affiliate link:

  1. The pixel records a visit
  2. A first-party cookie stores the affiliate ID and a timestamp
  3. At checkout, the cookie is read and passed to Stripe (for Checkout Sessions) or matched automatically (for Payment Links)

Last-click wins — if a customer clicks two different affiliate links before buying, the second one gets credit.

Checkout attribution

For Stripe Checkout Sessions, attribution is checked in this order:

  1. Affiliate promo code on the session (Growth+)
  2. metadata.psfy_partner passed by your server
  3. client_reference_id on the session
  4. Cookie match via customer email (if sign-in tracking is active)

For Payment Links, the pixel injects tracking automatically. No server code needed.

Subscription renewals

For recurring subscription payments, Partnersify attributes renewals to the same affiliate who was credited on the customer's first payment. This prevents renewals from being re-attributed to newer affiliate referrals.

If no affiliate is attached to the original payment, renewals go unattributed.

What promo codes do

When a customer enters an affiliate promo code at checkout, that takes priority over the cookie. This makes promo codes a reliable backup when cookies are cleared.

If a customer somehow has multiple valid affiliate promo codes, the affiliate with the oldest relationship wins.

Updated