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:
- System checks withdrawable amount.
- Referral stats are updated.
- 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