How to Use Affitor
The end-to-end golden path — launch a program, install tracking, and run commissions through to payout.
This is the shortest path from zero to your first attributed commission. Each step links to the detailed guide, so use this page as your map and follow the links when you need depth.
The lifecycle at a glance
Phase 1 — Launch your program
Set up the program partners will join and get the API key your backend uses to report sales.
Phase 2 — Install tracking
Affitor attributes revenue from three signals across the customer journey. You install these once and they run continuously.
Follow the 3-Step Integration Guide to wire these up. Sales are always reported server-side with your program API key — here is the canonical call:
curl -X POST https://api.affitor.com/api/v1/track/sale \
-H "Authorization: Bearer YOUR_PROGRAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction_id": "txn_abc123",
"customer_key": "usr_9876",
"amount_cents": 4900,
"currency": "USD",
"sale_type": "payment"
}'The customer_key you send at signup must equal the one you send at sale. That single identifier is how Affitor links a sale back to the original click and credits the right partner.
- Visit your site with `?aff=TESTCODE` — an `affitor_click_id` cookie is set
- Your signup fires `POST /api/v1/track/lead` and your backend fires `POST /api/v1/track/sale`, both returning 2xx
- The click, lead, and sale appear under your program's tracking events
- Send `additional_data: { test_mode: true }` to create test events without generating commissions
Phase 3 — Commissions and payouts
Once a sale is attributed, Affitor creates the commission and moves it through your review and payout workflow.