Affiliate Programs
Launch a powerful affiliate program to grow your sales. stryhub supports flexible commissions with automatic payouts via Stripe Express — no manual tracking or payments needed.
Overview
The affiliate system in stryhub allows you to recruit partners who promote your products in exchange for commissions. When a customer purchases through an affiliate's unique link, the affiliate earns a percentage of the sale.
Key features:
- Flexible commission structure — Set custom rates per product and per affiliate
- Automatic payouts — Affiliates receive commissions via Stripe Express
- Real-time tracking — Clicks, conversions, and earnings tracked instantly
- Unique referral links — Each affiliate gets a trackable URL
- Cookie-based attribution — First-party cookies ensure accurate tracking
Creating an Affiliate Program
To create an affiliate program:
- In the admin dashboard, go to Affiliate Program
- Click Create Program (or configure the existing one)
- Set your program details:
- Program name: Displayed to affiliates during registration
- Commission rates: Set default percentage and customize per product
- Cookie duration: How long referral cookies last (default: 30 days)
- Save and activate the program
Commission Structure
stryhub supports a flexible commission structure with three levels of configuration:
| Level | Description | Example Rate |
|---|---|---|
| Program Default | Base commission rate applied to all products and affiliates | 20% |
| Per Product | Override the default rate for specific products or prices | 15% |
| Per Affiliate | Set custom rates for individual affiliates on specific products | 25% |
The most specific rate always wins: if an affiliate has a custom rate for a product, that rate is used. Otherwise, the product rate applies. If neither is set, the program default is used.
You can also choose the commission type:
- Recurring: Affiliate earns on every subscription renewal
- One-time: Affiliate earns only on the initial purchase
Affiliate Registration
Affiliates can register through a dedicated signup page linked to your program. The registration process:
- Share your affiliate registration link with potential partners
- Affiliates create an account with their email and details
- They connect a Stripe Express account for receiving payouts
- Once approved, they receive their unique referral link
As an admin, you can manage affiliates from the dashboard:
- View all registered affiliates
- See each affiliate's performance (clicks, conversions, earnings)
- Manage affiliate status (active/inactive)
Referral Tracking
When a customer clicks an affiliate's referral link, stryhub:
- Sets a first-party cookie in the customer's browser
- The cookie stores the affiliate ID and persists for the configured duration (default: 30 days)
- When the customer completes a checkout, the cookie is read to attribute the sale
- Commissions are calculated automatically for every sale
Affiliate Dashboard
Each affiliate has access to a dedicated dashboard showing:
- Unique referral link — Easy to copy and share
- Click statistics — Total clicks, unique visitors
- Conversion data — Number of sales, conversion rate
- Earnings overview — Total earned, pending, paid out
- Payout history — Complete log of all payouts
- Referral links — Unique tracking URLs for each affiliate
Payouts
stryhub handles affiliate payouts automatically through Stripe Express. No manual work is required — commissions are calculated and transferred in real-time.
How payouts work
- A customer purchases through an affiliate's referral link
- Stripe processes the payment and the commission is calculated automatically
- The commission is transferred directly to the affiliate's Stripe Express account via
stripe.transfers.create() - The transfer is linked to the original charge (
source_transaction), so Stripe releases the funds only when the payment clears (2–30 days depending on payment method) - The affiliate receives the funds in their bank account through Stripe's standard payout schedule
How the money flows
Here's what happens when a customer pays $100 through an affiliate link (example with 20% commission):
| Deduction | Amount | Who receives |
|---|---|---|
| Stripe processing fee (2.9% + $0.30) | $3.20 | Stripe |
| stryhub platform fee (5%) | $5.00 | stryhub |
| Transfer fee (0.25% + $0.25) | $0.50 | Covers Stripe Connect payout cost |
| Affiliate commission (20%) | $20.00 | Affiliate (via Stripe Express) |
| Net amount | $71.50 | Program owner (you) |
application_fee at checkout time. The program owner receives the net amount directly in their Stripe account — no manual calculations needed.Stripe Express for affiliates
Stripe Express provides affiliates with:
- Easy onboarding — Simple registration flow handled by Stripe
- Direct bank deposits — Funds go directly to their bank account
- Tax forms — Stripe handles 1099s and tax reporting (US)
- Global support — Available in 40+ countries
Fees & Costs
There are three separate fees involved when affiliates receive payouts. Understanding each one ensures full transparency.
1. stryhub platform fee — 5% per transaction
This is stryhub's fee, charged on every transaction processed through the platform. It is deducted automatically at checkout time via the Stripe application_fee. There are no monthly fees or subscription plans — you only pay when you earn.
2. Stripe payment processing fees
These are Stripe's own fees for processing credit cards and other payment methods. They are completely separate from stryhub's fee and are set by Stripe:
- Domestic cards: 2.9% + $0.30
- International cards: 3.1% + $0.30
For current rates, see Stripe Pricing.
3. Stripe Connect fees (affiliate payouts)
Stripe charges additional fees for transferring money to affiliate Express accounts:
| Fee | Amount | How it's handled |
|---|---|---|
| Per-payout fee | 0.25% + $0.25 | Already included in the transaction's application_fee at checkout. No action needed. |
| Active account fee | $2.00/month per active Express account | Deducted from the affiliate's first commission transfer of each month. Visible in both admin and affiliate dashboards. |
| Instant payouts (optional) | 1.5% (min $0.50) | Only if the affiliate chooses instant payout to a debit card. |
For full details on Stripe Connect pricing, see Stripe Connect Pricing. For stryhub's complete fee policy, see our Terms of Service (Section 5).
Testing Your Affiliate Setup
Before going live, you should verify that your program, affiliate links and the full payment flow are working correctly. Here's a step-by-step checklist:
1. Verify the affiliate link is tracking
- In your admin panel, go to Programs and note a test affiliate's ref_code
- Open an incognito/private browser window (to avoid cached cookies)
- Visit a product page or checkout link appending the ref code:
https://your-site.com?ref=AFFILIATE_CODE - Open the browser's DevTools (F12) → Application → Cookies
- You should see a cookie named
affiliate_refwith the affiliate's code and an expiration date matching your cookie duration (default: 30 days)
tracking.js) reads the ?ref= URL parameter and sets a first-party cookie. On checkout, stryhub reads this cookie and attributes the sale to that affiliate. Last-click attribution is used — if the customer clicks a different affiliate's link later, the cookie is overwritten.2. Make a test purchase
- With the
affiliate_refcookie active (from step 1), proceed to checkout using a product's Payment Link - If in Stripe test mode, use the card
4242 4242 4242 4242with any future expiry date - Complete the payment
3. Verify in the admin panel
After the purchase, check three places in your stryhub admin dashboard:
| Where to check | What you should see |
|---|---|
| Dashboard → Recent Commissions | A new commission entry with the affiliate's name, the invoice amount, the commission amount, and the platform fee |
| Affiliates → click the affiliate | A new referral with status "active" linked to the customer's email and the subscription |
| Transactions | A new transaction with status "succeeded", showing gross amount, platform fee, Stripe fee, and net amount |
| Webhooks → Logs | Outgoing webhook deliveries with status 200 (if you configured a webhook endpoint) |
4. Verify affiliate sees their commission
- Log in as the test affiliate (or have them log in)
- In the affiliate dashboard, they should see:
- Updated total earnings
- The new referral in Referrals with status "active"
- A new entry in Commissions with the correct amount and status (pending or approved, depending on your approval mode)
5. Verify automatic payout (if using Stripe Express)
If the affiliate has connected their Stripe Express account and your program has stripe_express_enabled = true:
- After the commission is approved (automatic or manual), a Stripe Transfer is created automatically
- In your Stripe Dashboard → Connect → Transfers, you should see the transfer to the affiliate's Express account
- The affiliate sees the payout in their Stripe Express dashboard
Troubleshooting
| Issue | Likely cause | Fix |
|---|---|---|
Cookie affiliate_ref not appearing |
Tracking script not loaded on the page | Ensure tracking.js is embedded on your site. Check the browser console for errors. |
| Purchase completed but no commission created | Cookie was cleared or expired before checkout | Ensure the cookie duration is long enough (default 30 days). The customer must have the affiliate_ref cookie at the time of checkout. |
| Commission created but with wrong amount | Commission tier not configured correctly | Check: affiliate-level override → product-level commission → program default commission. The most specific tier takes priority. |
| Transfer not created (commission stays pending) | Affiliate hasn't connected Stripe Express, or Express onboarding is incomplete | The affiliate needs to complete Stripe Express onboarding. Check the affiliate's stripe_onboarded status in the admin panel. |
| Webhook not delivered | Endpoint URL is wrong or returned a non-2xx status | Check Webhooks → Logs for delivery attempts and error codes. The signing secret must match what your application expects. |