Use this file to discover all available pages before exploring further.
Use server-side tracking when the JavaScript snippet isn’t an option, such as mobile apps, server-rendered redirects, or checkout flows where your backend owns the attribution handoff.Server-side tracking records the click and returns a clickToken. AgentRef does not expose a public POST /api/v1/conversions endpoint. Conversions are created by supported payment integrations, primarily Stripe, when the payment event includes the click token in metadata or client_reference_id.
When a visitor arrives with ?via=AFFILIATE_CODE, extract the referral code server-side. Inbound attribution also accepts ref, r, a, and configured aliases.
2
Record the click
Call POST /api/tracking/click with the program ID, page URL, and referral code. The response includes a clickToken.
3
Store attribution
Persist the clickToken as agentref_cid and the program ID as agentref_pid in your session, database, or cookie.
4
Pass metadata to checkout
When the visitor converts through Stripe, pass agentref_cid, agentref_pid, and agentref_source into Stripe metadata, or use client_reference_id for hosted Stripe surfaces.
The click and verify endpoints are unauthenticated, but they validate Origin or Referer against the program’s configured website domain. For backend calls, forward or set an origin that matches your configured site.