Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Referral Program

This flow explains how customers invite others and earn referral rewards.

What customers can do

  • Create invite codes (within configured limits)
  • Share invite codes with prospective users
  • Earn rewards when referred users complete qualifying purchases
  • Track referral performance and withdraw available rewards to wallet

Referral flow

flowchart TD
    code[CreateInviteCode] --> share[ShareCode]
    share --> signup[NewUserRegistersWithCode]
    signup --> purchase[ReferredUserCompletesQualifyingPayment]
    purchase --> reward[CommissionCalculated]
    reward --> stats[AffiliateStatsUpdated]
    stats --> withdraw[WithdrawToWallet]

Reward principles

  • Reward is based on a configured commission rate.
  • Each referred user can trigger rewards only up to a configured number of times.
  • Rewards are tracked as available amount until withdrawn.

Withdrawal

When user withdraws referral rewards:

  1. System checks withdrawable amount.
  2. Referral stats are updated.
  3. Wallet available balance is credited.

This should appear in both referral records and wallet history.

What customers cannot do

  • Create unlimited invite codes
  • Earn commission from non-qualifying payments (for example, restricted methods per policy)
  • Withdraw more than currently available reward
  • Change historical referral relation records