Affiliate program.
Built into the app. No third-party integration. Affiliates get an HMAC-signed dashboard link that proves their identity on every page load, and your commissions track on every subscription renewal — not just the first order.
This is a Pro feature. The affiliate program is part of the Daima Pro plan ($29.99/mo flat). Free merchants can read this doc as a preview and upgrade from Billing in the admin nav. Free vs Pro details →
Enable the program
Open Affiliates in the admin nav. The first page you'll see is the settings panel. Toggle Enable affiliate program and configure the defaults that apply to new affiliates:
- Default discount amount — what % off the affiliate's code gives the buyer (default: 20%)
- Default commission type — Percentage or Fixed amount
- Default commission value — what the affiliate earns per qualified order (default: 10%)
- Subscription only — restrict affiliate codes to subscription orders, ignore one-time purchases
- Discount mode — see below; controls where the discount applies
- Notify affiliate on conversion — sends an email via Resend when their code is used
- Notify merchant weekly — sends you a summary of conversions every week
Save the settings, then add your first affiliate. Each affiliate gets a unique discount code generated via Shopify's Discount API and a personal dashboard URL.
Three discount modes
The discount mode controls where the affiliate's code applies. Same code, three different behaviors:
Full discount
The affiliate's discount applies to every line in the cart (subscription products and one-time products both). Conversion tracking treats the whole order as the affiliate's referral.
Use this when you want the most aggressive affiliate program — easy for the affiliate to sell because the discount is real on every product.
One-time only
Default mode. The affiliate's discount applies only to the first (one-time) order. Subscription renewals after that order go through at the regular plan price (or with the standard plan discount if any).
Use this when you want affiliate-driven first-order conversions but full margin on long-term subscribers.
Tracking only
The discount code is applied for tracking purposes only — Daima writes a $0.01 line discount so the code stays "applicable" and the order/conversion gets attributed to the affiliate, but the buyer pays full price. The affiliate still earns their commission.
Use this when you want measured affiliate marketing without giving up margin on the buy side.
The affiliate dashboard
Every affiliate gets a personal dashboard hosted on your storefront at
yourstore.com/apps/daima/affiliate. Their welcome email contains a signed
direct link that opens it with no login step — the link carries an HMAC token derived
from their record, so it's tamper-proof: an affiliate can bookmark it, but they can't
modify it to view another affiliate's data.
The dashboard shows:
- Their personal discount code (with copy-to-clipboard)
- Total conversions and pending conversions
- Total commissions earned and paid
- Per-conversion breakdown with order reference numbers
- Payout settings — where they set the PayPal email their commissions are sent to
How affiliates sign in
Affiliates who don't have their welcome-email link handy have two secure ways in from the sign-in page:
- Email sign-in link. They enter their affiliate code and email; if the pair matches, a one-click sign-in link lands in their inbox. Knowing a code and email alone never opens a dashboard — access always goes through the affiliate's own inbox.
- Log in with PayPal. One click, no password. As a bonus, affiliates who sign in with PayPal get paid to their PayPal-verified account rather than a typed email — which eliminates misdirected payouts from typos. An affiliate who works with several Daima-powered stores sees all their programs in one portal after signing in.
Your store's sign-in page URL is shown on the Affiliates admin page (with a copy button) — link it from your site's footer or a "Partners" page so affiliates can always find it. If an affiliate's payout email is ever changed, they automatically receive a security notification, so a hijacked payout can't happen silently.
How conversions are tracked
When a customer checks out using an affiliate code, Daima receives a webhook from Shopify and creates a pending conversion record. Pending conversions become confirmed after a configurable hold period (typically the order's refund window) — this prevents you from paying out commissions on orders that get refunded.
Confirmed commissions accumulate into 30-day payout periods. When a period closes, you pay every affiliate in it with one click — directly from the app, through your own connected PayPal Business account. Daima calculates the amounts, shows you exactly who gets what before you send, executes the batch through PayPal's Payouts API, tracks per-affiliate delivery status, and emails each affiliate a payment notification. Funds go straight from your PayPal to theirs; Daima never touches the money. See Affiliate payouts with PayPal for setup and the full payout lifecycle.
Note: connecting PayPal is required before you can enable the affiliate program or add affiliates — it guarantees every affiliate has a payout rail from day one.
Changing discount mode for an existing program
When you switch your default discount mode (e.g., from "one-time only" to "full discount"), Daima automatically updates the metafield on every existing affiliate code so the new mode applies everywhere. You don't need to regenerate codes or notify your affiliates — their existing codes just start behaving differently on the next checkout.
The bulk update runs server-side as part of the settings save. If any individual code update fails (e.g., it was already deleted in Shopify), Daima logs the failure and continues; the page reports how many were updated, skipped, or failed.
Under the hood — the Shopify Function
The actual discount application runs as a Shopify Function at the purchase.product-discount.run target. The function reads the discount mode from the daima-affiliate metafield namespace on each discount and applies the correct logic at checkout time. This means:
- Discount logic runs in Shopify's edge — no network round-trip to Daima
- Latency is negligible at checkout
- The function is content-addressed — same input always produces same output, no caching weirdness
You don't need to manage the function. Daima deploys it as part of the app extension, updates it when needed, and handles all metafield writes automatically.
Designing a good affiliate program
- Match the discount to the affiliate's audience. 20% off is generous for high-margin DTC; 10% is enough for affiliate-saturated categories.
- Recurring commission is your retention tool. Daima pays the affiliate on every renewal, not just the first order — that's a real differentiator vs apps that pay once. Make sure your affiliates know this.
- Start with "one-time only" mode. It limits your downside while you learn what affiliates drive real value.
- Use "tracking only" for influencers with large reach but low conversion. They drive awareness, you keep margin, you still attribute their impact.