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 to Use
- Custom payment flows that don’t use Stripe Checkout
- Mobile apps or native clients
- Server-rendered redirects where you intercept the affiliate link yourself
Workflow
1
Capture the referral parameter
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.