Appearance
Referral and affiliate commission
Who: listener (referrer, referred); affiliate (ambassador); staff (programmes, review); system (attribution, commission posting).
Entry points
| Kind | Entry |
|---|---|
| REST (referral) | GET /me/referral, GET /me/referrals, POST /me/referral, GET/POST /me/attribution, POST /referrals/clicks, GET /referrals/:code/qr.svg |
| REST (affiliate) | GET /affiliate-programmes, GET /affiliate-programmes/:slug, GET /affiliates/pages/:slug, GET /affiliates/codes/:code, GET /affiliates/links/:code/qr.svg, POST /affiliates/clicks, POST /affiliate-programmes/:slug/applications, GET /me/affiliate-applications, POST /me/affiliate-applications/:id/withdraw, /accept, /decline, GET /me/affiliates, PATCH /me/affiliates/:id/page, GET /me/affiliates/:id/dashboard, /commissions, GET/POST /me/affiliates/:id/links, PATCH …/links/:linkId |
| Staff | /staff/affiliate-programmes… (create, status, invitations), /staff/affiliate-applications/:id/approve, /reject, /cancel, /staff/affiliates/:id/suspend, /reinstate, /terminate, GET /staff/affiliate-reports |
| Deep link | referral (r/:code), referrals, affiliate (a/:slug), affiliateDashboard, affiliateInvitation, affiliateCommissions, affiliateApplications |
| Push | referral.joined, referral.reward_earned, affiliate.invited, affiliate.approved, affiliate.application_rejected, affiliate.status_changed, affiliate.commission_earned, affiliate.commission_reversed |
Flow: referral
- Referrer shares
GET /me/referral(webUrl,deepLink, QR). - The opener's page or app calls
POST /referrals/clicks { code, channel }→clickToken; kept through sign-up. - After sign-in
POST /me/attribution { referralCode | clickToken }→ one attribution per person forever (identity.user.attributed,identity.user.referred); referrer getsreferral.joined. Fraud checks: inactive referrer, blocks, shared device. - On the referred person's first paid (non-trial) subscription charge a reward is written,
referral.reward_earnedfires and both sides are credited subscription days.
Flow: affiliate
- Staff create a programme (commission %, duration) and may invite (
affiliate.invited); people applyPOST /affiliate-programmes/:slug/applications→ staff approve (affiliate.approved) or reject. - Affiliate creates links and a landing page; opens are
POST /affiliates/clicks; attribution as above withaffiliateCodeor ana_click token (an affiliate wins over a referral). - Each paid subscription charge in the window accrues commission (
affiliates.commission.accrued,affiliate.commission_earned); never on trials.affiliates.post-commissionsposts matured commission to the affiliate's earnings (affiliates.commission.posted). A refund or chargeback reverses it (affiliates.commission.reversed). affiliates.expire-invitationscloses old invitations.
Exit states
| State | Code | Actions | Client next |
|---|---|---|---|
| Attributed | — | — | — |
| Already attributed | REFERRAL_ALREADY_SET | — | Ignore silently |
| Window closed / invalid | REFERRAL_WINDOW_CLOSED, REFERRAL_CODE_INVALID, REFERRAL_CLICK_INVALID | — | Drop the code |
| Fraud check | REFERRAL_NOT_ELIGIBLE | — | Drop the code |
| Programme | AFFILIATE_PROGRAMME_NOT_FOUND, AFFILIATE_PROGRAMME_CLOSED | — | — |
| Application | AFFILIATE_APPLICATION_EXISTS, AFFILIATE_APPLICATION_DECIDED, AFFILIATE_ALREADY_MEMBER | — | — |
| Affiliate | AFFILIATE_SUSPENDED, AFFILIATE_LINK_LIMIT, AFFILIATE_CODE_TAKEN, AFFILIATE_SLUG_TAKEN | — | — |
| One BVN per account | KYC_DOCUMENT_ALREADY_USED | — | — |