Attribution
How Traaaction permanently links a customer to their seller, and why this attribution never changes.
The first seller who brings a visitor gets credited. This attribution never changes, even if the visitor clicks another affiliate link later.
It's the fairest model: whoever introduces the product gets rewarded.
This model is used by the largest affiliate platforms.
- 1The customer signs up on the startup's website
- 2The Click ID is sent to Traaaction via the tracking script or API
- 3Traaaction finds the seller associated with this Click ID
- 4The customer is then permanently linked to this seller
Webhook priority: session.metadata.tracClickId → client_reference_id → Customer table lookup. For renewals (invoice.paid), attribution uses the Customer table directly.
- Click ID — which click brought this customer
- Tracked link — which link was shared
- Seller — who gets credited for this customer
- Customer ID — who is this customer (unique ID on the startup's side)
These 4 data points are locked at creation and never modified afterwards.
The Customer record
external_id = Stripe customer ID, linked to link_id and affiliate_id. Once set, these fields are never overwritten — ensuring permanent first-click attribution.
Once created, the attribution is permanent:
- Even if the cookie expires (after 90 days)
- Even if the customer switches browser or device
- The attribution is stored in our database
- Any future purchase by this customer → same seller credited
Customer clicks Monday, buys Friday
→ Seller credited (active cookie)
Customer clicks in January, buys in March
→ Seller credited (90-day cookie)
Customer signs up on mobile, buys on desktop
→ Seller credited (customer ID)
Customer clicks seller A's link, then seller B's link, then buys
→ Seller A credited (first-click)
Attribution applies to all automatic renewals.
The seller gets credited month after month as long as the subscription is active.
No cookie needed for renewals — attribution is done via customer ID.
Attribution relies on 4 Stripe webhook events configured by the startup. Each event serves a different attribution purpose:
| Event | Attribution role |
|---|---|
| checkout.session.completed | Initial attribution — links Click ID → Seller → Customer via metadata |
| invoice.paid | Renewal attribution — uses existing Customer record (no Click ID needed) |
| charge.refunded | Clawback — finds commission via checkout session or invoice, then deletes |
| customer.subscription.deleted | Cancellation — deletes all PENDING commissions for the subscription |
The startup must configure these 4 events in their Stripe dashboard pointing to the Traaaction webhook URL. Both payment and subscription modes use the same endpoint.