Documentation

Everything you need to integrate IKAdsCampaign with your website or application.

API Base URL
https://ikadscampaign.vercel.app/api
Authentication
Two authentication methods depending on the endpoint.
API Key

For server-side endpoints (conversion tracking, webhooks). Pass in X-API-Key header.

Get your API key at registration or from Dashboard > Integration > API Keys.

Public

For client-side endpoints (click tracking, disclosure, ad serving). No auth needed.

Rate limited by IP address.

Quick Start
Get tracking in under 60 seconds.
  1. 1Create an account at /register
  2. 2Copy your Merchant ID from the dashboard
  3. 3Add the tracking script: <script src="https://ikadscampaign.vercel.app/api/sdk/tracker.js?m=YOUR_ID"></script>
  4. 4Send visitors to your site with ?ref=AFFILIATE_CODE
  5. 5Call the conversion API from your server when a sale happens
Tracking Script
The JavaScript snippet handles everything client-side.
  1. 1Detects ?ref= parameter in the URL
  2. 2Records the click via POST /api/track/click
  3. 3Sets an ikads_ref cookie (30-day default)
  4. 4Renders a server-side disclosure banner at the top of the page
  5. 5Finds <div data-ikad-slot> elements and fills them with ads
  6. 6Exposes IKAds.trackConversion() for checkout-page use
Conversion Tracking
Server-side API call to attribute a sale.
  1. 1Read the ikads_ref cookie value from the customer's request
  2. 2POST to /api/track/conversion with your X-API-Key header
  3. 3Body: { referralCode, merchantId, saleAmount, currency, orderId, customerEmail }
  4. 4Commission is created automatically with your configured hold period
  5. 5Override commission (1%) is paid to the affiliate's sponsor if they have one
Webhooks
Push events from your system to IKAdsCampaign.
  1. 1POST to /api/webhooks/sector with your X-API-Key header
  2. 2Refund: { event: "payment.refunded", data: { commissionId: "..." } }
  3. 3New customer: { event: "customer.created", data: { email: "...", affiliateId: "..." } }
  4. 4Spam-trap emails trigger auto-termination if detected
  5. 5All events are logged in the compliance event trail
Ad Slots
Embed sponsored ads on your pages.
  1. 1Add <div data-ikad-slot="SLOT_ID" data-ikad-sector="SECTOR"></div> to your HTML
  2. 2The tracking script fills these automatically
  3. 3Ads are server-rendered with a 'Sponsored' label
  4. 4Ethics engine prevents inappropriate ads by sector
  5. 5Frequency cap: 3 impressions/day per creative. Fatigue cap: 10/session
Compliance
How IKAdsCampaign keeps you legally safe.
  1. 1Select your operating jurisdictions in Settings > Jurisdictions
  2. 2Override depth is capped at 1 level by default (UK/Nigeria/UAE safe)
  3. 3Affiliates start in 30-day probation (own channels only)
  4. 4KYC verification gates payout eligibility
  5. 5Spam-trap detection auto-terminates bad actors
  6. 6Kill switch: one-click atomic suspension with audit trail
  7. 7Forward-withholding handles chargebacks after payout