How to run a Shopify affiliate program
Updated · 5 min read
To run an affiliate program on Shopify, pick a tool that records each order against the partner who sent it, by referral link, by the partner’s discount code, or both. Then set a commission rate, hold commissions through your returns window, and pay partners on a fixed schedule.
How an affiliate program works on Shopify
Shopify gives you the store, the checkout and discount codes, but it does not keep a ledger of which partner earned what. An affiliate program adds four things on top of the store:
- A way for each partner to be identified: a referral link, a personal discount code, or both.
- Tracking that ties a completed order to that partner, even when the shopper buys days after the first visit.
- Commission rules, a hold period and refund handling, so partners earn on orders you keep.
- A partner dashboard and a payout routine, so creators can see their sales and get paid without chasing you.
Every Shopify affiliate tool, whether it installs from the app store or runs as a separate service, is some combination of these. The differences are in how the order is captured and how much of the partner side you manage yourself.
Choose between app store apps and standalone tools
There are two broad routes. Shopify’s app store lists many affiliate and creator apps, including Shopify’s own Shopify Collabs, which install in a few clicks and read orders directly through Shopify’s APIs. Standalone affiliate platforms run outside Shopify and connect through a tracking script on the storefront plus order events sent from the store.
| Shopify app store app | Standalone tool with a tracking script | |
|---|---|---|
| Setup | Install from the app store; permissions granted in one step | Add a script tag, then send orders and refunds from the store |
| Order capture | Reads orders through Shopify’s APIs | Script on the thank-you page, server-side order events, or both |
| Other sales channels | Usually Shopify only | The same program can cover a second store, a SaaS product or offline sales |
| Best for | Shopify-only merchants who want the least setup | Businesses with more than one platform, or that want one partner portal for everything |
Affiliatops is in the second group: it has no native Shopify app, so a Shopify store connects through its tracking script and through order and refund events posted to its server API. That is a few more setup steps than an app store install, in exchange for one program across every place you sell. Plans are on the pricing page.
Attribute sales with discount codes
Links break often in creator marketing: a code read out in a video, a caption where links are not clickable, or a shopper who switches from phone to laptop. A personal discount code solves that, because the buyer carries the attribution into the checkout themselves.
- 1
Create one code per partner in Shopify
Use Shopify’s built-in discounts to create a code such as MAYA10 with the discount you want to give buyers. Keep the code short and easy to say aloud.
- 2
Register the same code in your affiliate tool
Assign the code to the partner so an order that uses it is credited to them, whether or not they also clicked a link.
- 3
Pass the code with each order
When you record the order, include the discount code the buyer used. The tool matches it to the partner.
- 4
Decide which wins when both are present
If a shopper clicked partner A’s link but typed partner B’s code, pick one rule, commonly that the typed code wins, and state it in your terms.
Track the order on the thank-you page or from the server
Shopify hosts the checkout and the thank-you (order status) page, so you cannot edit them like your theme. Tracking scripts on those pages are added through Shopify’s Customer events settings as a custom pixel, which replaced the older additional-scripts box. That route works, but browser tracking can be blocked by ad blockers or lost when a shopper closes the tab early.
The more reliable route is to send each order from the server. Shopify can call a webhook when an order is created or refunded, and a small piece of middleware, or an automation tool, forwards the order ID, amount, currency, customer email and discount code to your affiliate tool.
| Method | What it captures | Weak spot |
|---|---|---|
| Script on the storefront | The partner’s referral link click, stored in a first-party cookie | Only covers visits; it does not see the payment |
| Custom pixel on the thank-you page | The completed order in the browser | Ad blockers and closed tabs |
| Server-side order event | Every paid order, with its discount code | Needs a webhook or automation to forward orders |
Most stores combine the first and third: the script records who referred the visitor, and the server event records the order with the partner’s code or referral. Send the Shopify order ID as the order reference so a retried event is not counted twice. The docs describe the conversion and refund events and the script in detail.
Handle returns and refunds
A return in Shopify should reach your affiliate program the same way the order did. If it does not, you will keep paying commission on orders you gave the money back for.
- Hold each commission for at least your returns window, commonly 30 days, before it becomes payable.
- Forward Shopify refund events with the original order ID, so only that order’s commission is reversed.
- Reduce the commission in proportion to partial refunds, for example when one item from a three-item order comes back.
- Deduct refunds that arrive after payout from the partner’s next payout, and say so in the terms.
Affiliatops reverses order commissions in full or in proportion when a refund arrives for that order ID, and the online store demo walks through an order and its refund from the store’s side.
Set rates and pay creators
Shopify stores commonly pay partners 10–20% of each order, less for low-margin products and more for high-margin ones. Our guide to ecommerce affiliate commission rates shows how to find a rate your margin can carry.
- 1
Pick a payout schedule
Monthly is the most common. Pay out only commissions that have cleared the hold period.
- 2
Set a minimum payout
A threshold such as $50 avoids sending many tiny transfers with fees that eat into them.
- 3
Collect payout details up front
Ask for PayPal, bank or Wise details and any tax forms your country requires when a partner joins, not when the first payout is due.
- 4
Consider store credit or products
Some creators prefer credit or free products to cash. Offer it as an option, recorded as a payout, not as an informal arrangement.
Whatever the tool, the partner should be able to see every order credited to them, its status and when it will be paid. That visibility prevents most payout disputes before they start.
Frequently asked questions
Does Shopify have a built-in affiliate program?
Shopify does not include affiliate tracking in the store admin itself. Merchants add it with an app from the Shopify App Store, including Shopify’s own Shopify Collabs app, or with a standalone affiliate platform connected through a tracking script and order events.
How do I track affiliate sales on Shopify?
Give each partner a referral link and a personal discount code, load a tracking script on the storefront to record link clicks, and send each order with its discount code to your affiliate tool, either from a thank-you page pixel or from a server-side order webhook.
Can I use Shopify discount codes for affiliate tracking?
Yes. Create a unique code per partner in Shopify, register the same code with your affiliate tool, and pass the code used on each order. The order is credited to the partner who owns the code, even if the buyer never clicked a link.
How much commission should a Shopify store pay affiliates?
Commonly 10–20% of the order, adjusted for margin. Low-margin categories such as electronics pay less; beauty, apparel and supplements often pay more. Exclude shipping and taxes from the commissionable amount.
What happens to affiliate commission when a Shopify order is refunded?
With a hold period, a refund during the hold cancels or reduces the commission before it is paid. A refund after payout is deducted from the partner’s next payout, if your terms and tool support clawbacks.