For developers & merchants
API-first affiliate tracking
Influencemart is built API-first: your ecommerce website talks to us over a clean REST API to sync products, attribute orders to the right affiliate, and keep commissions in lock-step with your real order lifecycle. Prefer not to code? A CSV fallback covers the same ground.
This page explains what the API does and why each piece exists. It is not the complete API reference. Endpoint signatures, authentication details, signing, rate limits, sandbox data and your real keys live in the in-dashboard Developer Docs you get after you create a merchant account — generated against your own account so the examples are copy-paste ready.
What it does
One integration, the whole attribution lifecycle
The API is the bridge between your store and the affiliate network. Everything an affiliate program needs to be accurate, auditable, and fair runs through these flows.
Sync your catalog
Attribute every order
click_id you captured, and we match each order to the affiliate who drove it.Keep status in sync
React in real time
Stay safe by default
Or skip the code
Why it matters
Why your website needs click_id tracking
Affiliate marketing only works if the right person gets credit for the right order. The click_id is how we connect a click on a creator’s link to a real purchase on your site.
An affiliate shares a trackable link
When a creator promotes one of your products, we generate a unique link. Each click mints a fresh click_id.
The visitor lands on your site carrying the click_id
We redirect the visitor to your product page with the click_id attached. Your site stores it — in a first-party cookie and/or alongside the cart.
The order comes back with that click_id
When the visitor checks out, your conversion call (or webhook, or CSV row) includes the stored click_id. We attribute the order to the exact affiliate who earned it — within the campaign’s cookie window.
Why not just “last visit”?
Guessing attribution from referrers or coupon codes breaks down the moment a buyer uses a different device, an in-app browser, or clears cookies. A server-side click_id round-trip is deterministic: the same identifier that left our redirect comes back on the order, so attribution is provable and disputes are rare.
Capturing click_id on landing and replaying it at checkout is the single most important integration step. Everything else builds on it.
Core capabilities
The flows you’ll integrate
Each capability is independent — start with conversions and add the rest as you go. Full request/response details are in your dashboard’s Developer Docs.
Product feed sync
Send your products to the platform — either by pushing them through the API or by pointing us at a product feed URL (JSON or CSV) we refresh on a schedule. Each product carries a name, image, price, category, stock state and an optional per-product commission override. Affiliates only ever promote real, in-stock items, and price or availability changes propagate automatically so links never go stale.
- Push products or schedule a feed pull
- Per-product commission overrides
- SKU-keyed upserts — no duplicates
Campaign sync
Group products into campaigns with their own commission rate, cookie-duration window, and listing rules. Create and update campaigns over the API so your offers and seasonal promotions stay in sync with your store. Public-listed campaigns can appear on our campaigns page for affiliates to join; private ones are invite-only.
- Campaign-level commission & cookie window
- Public listing or invite-only
- Activate, pause, or archive on demand
Conversion API
The heart of the integration. When a buyer completes an order, post the order to the Conversion API with the click_id you captured on landing. We attribute it to the right affiliate, calculate commission against the applicable rate, and create a pending commission. Every call takes an idempotency key, so network retries never create a duplicate.
- Deterministic, server-side attribution
- Idempotent — safe to retry
- Risk-scored before commissions go payable
Order status update
Orders change after checkout — they get confirmed, shipped, cancelled, returned or refunded. Send those transitions and the matching commission follows automatically: it holds during your return/refund window and reverses cleanly if the order falls through. You only ever pay commission on orders that actually completed.
- Confirm, ship, cancel, return, refund
- Automatic hold and reversal
- No commission on undelivered orders
Webhooks
Don’t poll — subscribe. We send signed webhook events when a conversion is attributed, a commission changes status (pending → hold → approved → payable → paid), or a payout is processed. Each delivery is signed so you can verify it came from us, and failed deliveries are retried with backoff. Use them to sync your finance system, notify affiliates, or trigger your own automations.
- Signed, verifiable payloads
- Automatic retries with backoff
- Commission & payout lifecycle events
CSV fallback
Not every merchant has a developer on day one — and you don’t need one. Upload products, orders and order-status changes as CSV files from your dashboard. Each row runs through exactly the same validation, deduplication, attribution and commission logic as the API, with a clear error report for any rows that need fixing. Start on CSV, move to the API when you’re ready — nothing about your data changes.
- Products, orders & status via spreadsheet
- Same engine, row-level error reports
- Graduate to the API with no data migration
A quick look
Capturing a click and reporting a conversion
An illustrative, simplified shape — your dashboard’s Developer Docs have the exact, account-specific contract. Never embed signing keys in client-side code; sign requests on your server.
POST /v1/conversions
Authorization: Bearer <your_publishable_or_test_key>
X-Signature: <hmac_sha256_of_body> # signing keys live in your dashboard
Content-Type: application/json
{
"order_id": "ORD-10293",
"click_id": "clk_8f2a1c...", // captured on landing, sent back on order
"amount": 4990, // order subtotal, in paisa
"currency": "NPR",
"status": "confirmed",
"occurred_at": "2026-06-14T09:21:00Z",
"items": [
{ "sku": "PH-A54-128", "qty": 1, "price": 4990 }
],
"idempotency_key": "ORD-10293-confirmed"
}201 Created
{
"conversion_id": "cv_3a91...",
"order_id": "ORD-10293",
"attributed": true,
"affiliate_ref": "aff_71c2", // who earned the commission
"commission": {
"amount": 249, // 5% of 4990, in paisa
"currency": "NPR",
"status": "pending" // moves to payable after the hold window
},
"deduplicated": false
}Note: amounts are illustrative (shown in paisa) and the fields above are a teaching example, not a binding schema. Real endpoints, headers, signing, error codes and rate limits — plus a sandbox you can replay against — are documented inside your account. We never display real secrets or signing keys, and internal/admin endpoints are not part of the merchant API.
Keys
Test and Live API keys
Every merchant account gets two isolated environments so you can build and verify with confidence before a single real commission is created.
Build and verify safely
Test keys run against an isolated sandbox. Conversions, status changes and webhooks behave exactly like production, but nothing here touches a real affiliate’s balance, generates a real payout, or appears in your live reporting. Use it to wire up your store, replay sample orders, and confirm your click_id round-trip end to end.
- Sandbox data, real behavior
- No real money or commissions
- Safe to share with developers
Go to production
Live keys drive real attribution, real commissions and real payouts. Flip to live by swapping the key — the request shapes don’t change. Keep live keys server-side and out of your repository; you can rotate them at any time from the dashboard, and signing requests proves the call genuinely came from you.
- Same contract as Test — just swap the key
- Rotate keys without downtime
- Request signing for authenticity
Security is foundational, not an afterthought. See how we protect clicks, conversions and accounts on our trust & safety page.
Developer dashboard
Everything a developer needs, in one place
After you create a merchant account, the Developer area in your dashboard is your home base — keys, docs, logs and webhooks, all scoped to your account.
- Test and Live API keys, with one-click rotation and clear last-used timestamps
- Developer Docs generated against your account — endpoints, headers, signing and examples you can copy and run
- Webhook management: register endpoints, pick events, send test deliveries and inspect retries
- A live request log showing recent API calls, status codes and validation errors to debug fast
- CSV importers for products, orders and status updates, with downloadable row-level error reports
- A sandbox to replay sample conversions and confirm attribution before you go live
Publishable test key
pk_test_••••••••••••3a91
- POST /v1/conversions201
- PATCH /v1/orders/ORD-10293200
- POST /v1/products422
Illustrative preview — your live dashboard shows real data.
Getting started
From sign-up to your first attributed order
Create a merchant account
Sign up as a merchant and complete a short review. You’ll land in your dashboard with Test keys ready to go.
Sync products & a campaign
Push your catalog (or feed URL) and create at least one campaign with a commission rate and cookie window.
Capture & replay click_id
Store the click_id on landing and send it back on the order via the Conversion API — verify it all in the sandbox.
Go live
Swap your Test key for a Live key, subscribe to webhooks, and watch attributed orders flow into real commissions.
FAQ
Integration questions, answered
More detail — and account-specific guidance — lives in your dashboard’s Developer Docs.
Ready to plug affiliates into your store?
Create a merchant account to get your Test keys, your account-specific Developer Docs, and a sandbox to prove out attribution before you go live. No code? Start with CSV and integrate the API later.
Questions about safety and compliance? Read our trust & safety commitments, or contact us.