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 ($9.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
Each affiliate gets a personal dashboard URL: daima.app/affiliate/[handle]?token=.... The token is an HMAC signature derived from the affiliate's record, so the URL is tamper-proof — an affiliate can bookmark it and share it with their accountant, but they can't modify the URL to view another affiliate's data.
The dashboard shows:
- Their personal discount code (with copy-to-clipboard)
- Total clicks (from referral links if you've shared analytics tags)
- Total conversions and pending conversions
- Total commissions earned and paid
- Per-conversion breakdown with order reference numbers
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.
The Affiliates admin page shows a "Pending conversions" list at the top with a one-click Mark paid action once you've sent the affiliate's payout. Daima doesn't process payouts directly — that's a manual step using your preferred method (Stripe, PayPal, ACH, whatever).
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.