Affiliate & Partner Program

Affiliate & partner: refer, earn, and resell

Mass has two complementary ways to grow through other people: lightweight referral codes that grant credits to inviter and invitee, and a full partner program with commission rates, approval, and payouts. This guide explains how codes are generated and redeemed, how a partner is approved and activated, how referrals are tracked and attributed, and how earnings are paid out.

14 min read · The complete affiliate & partner guide

Referral codes that grant credits

Every user can invite others with a personal code that grants credits on redemption.

The lightest-weight referral mechanism is the invite code. Each user can generate a personal referral code with a usage cap and a credit grant attached — for example a beta tester's code that allows a handful of uses and grants credits to each friend who redeems it. The code carries metadata identifying the referrer, and it's linked back to the referrer's onboarding progress so the relationship is recorded.

Codes are issued through a shared invite-code service that supports several flavors — beta, free, OG, and partner invites — each with its own prefix, landing page, and default credit grant. An admin-facing invite-codes screen lets the team mint and email codes, set a max-uses value, a credit grant, an expiry, and arbitrary metadata.

  • Personal codesa user generates a referral code with a max-uses cap and a credits-to-grant value.
  • Credits on redemptionredeeming a code grants the configured credits and records the referrer in metadata.
  • Invite flavorsbeta, free, OG, and partner invites each have a prefix, landing page, and default credit grant.
  • Admin mintingan admin screen mints and emails codes with max-uses, credits, expiry, and metadata.

The partner program

A first-class program with commission rates, payout settings, and lifetime stats.

Beyond simple codes, the platform has a partner program backed by a partner-settings record per tenant. It defines a sales commission percentage and a credit commission percentage, whether commissions recur and for how many months, the partner's referral code and affiliate link, and the payout configuration — method (Stripe, PayPal, bank transfer, or manual), a payout threshold, and a payout frequency.

The record also tracks the partner's running stats: total and active referrals, total earnings, pending payout, and lifetime payout. Partner settings are managed by platform super-admins through dedicated endpoints — creating a partner sets sensible commission defaults, and updates flow through the same partner service.

  • Commission ratesa sales commission % and a credit commission %, with optional recurring commissions over a set number of months.
  • Payout configmethod (Stripe / PayPal / bank / manual), a payout threshold, and a payout frequency.
  • Identityeach partner carries a referral code and an affiliate link to share.
  • Running statstotal/active referrals, total earnings, pending payout, and lifetime payout are tracked on the record.

Approval & activation

A partner is approved, and a partner invite upgrades the tenant.

Partner settings carry an approval state — a partner is only active once approved, recorded with who approved it and when. The public referral endpoints check this: a referral code only validates and tracks when the owning partner exists and is approved, so an unapproved or inactive partner can't accrue referrals.

Activation upgrades the underlying tenant. Redeeming a partner invite promotes the tenant to the partner tier and partner type, flips on the ability to earn referrals, sets a referral commission rate, and lifts the sub-account cap to unlimited — turning a regular account into a reselling agency partner in one step. Activation is idempotent: an already-activated partner is told they're all set rather than double-upgraded.

  • Approval gatea partner must be approved (with approver and timestamp) before referrals validate or track.
  • Tenant upgradea partner invite promotes the tenant to partner tier/type and enables referral earning.
  • Unlimited sub-accountsactivation lifts the sub-account cap so the partner can run agency sub-accounts.
  • Idempotentre-activating an existing partner is a no-op that confirms they're already set up.

Referral tracking & attribution

A referral is validated, then bound to the new tenant on signup.

Referral tracking runs through public endpoints. One validates a code (returning whether it's valid for an approved partner); another, called when a user signs up, resolves the user's tenant and records the referral against the partner's code. The signup endpoint uses dual auth — session cookies or a bearer token — so it works for white-label clients on an agency domain just as it does on the platform.

For the creator economy on the marketplace, attribution is cookie-based and built to survive the funnel. A long-lived referrer cookie holds the creator/referrer handle (set from a ?ref= query or a listing's creator reference) and a shorter-lived per-listing share token persists too, so a creator's referral chain doesn't snap when a visitor crosses an auth boundary or lands on a custom domain — even if they return days later.

  • Validate then trackone endpoint validates a code; another binds the referral to the new user's tenant at signup.
  • Dual authtracking accepts cookies or a bearer token, so it works on white-label domains too.
  • Durable cookiesa long-lived referrer cookie and a per-listing share token survive auth hops and custom domains.
  • Creator chainsmarketplace attribution from ?ref= or a listing reference keeps a creator's chain intact across the funnel.

Earnings & payouts

Commissions accrue against the partner record and pay out via Stripe Connect.

Earnings accumulate on the partner-settings record — pending payout grows as referrals convert, and lifetime payout records what's already been sent. Payouts respect the partner's configured threshold and frequency, so small balances roll forward until they're worth paying and disbursements run on a predictable cadence. The payout method is configurable, with Stripe Connect as the default rail and a recorded connect account and status.

Because the program supports both a sales commission and a credit commission, a partner can be rewarded in cash on revenue they drive and in platform credits — and with recurring commissions, that reward can continue for a configured number of months rather than a single one-off.

  • Accrualpending payout grows as referrals convert; lifetime payout records what's been disbursed.
  • Threshold & frequencybalances roll forward until the threshold is met and pay on the configured cadence.
  • Stripe Connectthe default payout rail records a connect account id and status; PayPal/bank/manual are options.
  • Cash + credits, recurringpartners earn a sales commission and a credit commission, optionally recurring for set months.