Skip to content

Affiliates ​

Base /v1. A commission programme run by staff, separate from promo codes and from user referrals. Affiliates earn commissionBps of each referred person's net subscription revenue for commissionMonths after attribution; never on trials. Attribution is one per person across referrals and affiliates (see Referrals); the affiliate's code or click token is sent to POST /me/attribution.

Money: commission is computed with percentBps (half-up, once), held AFFILIATE_COMMISSION_HOLD_DAYS past payment, then posted hourly to the affiliate profile's creator_earnings (from platform_revenue) once the matured total in the programme currency reaches payoutThreshold. Idempotency keys: affiliate-commission:<paymentId>, reversals affiliate-commission-reversal:<commissionId>:<reversalId>. Refunds and chargebacks reverse proportionally (exact over partial refunds); posted commission is clawed back through the ledger. Self-paid or same-payment-method commissions are stored blocked.

Links: web SHARE_BASE_URL/a/<code>, deep plemuz://a/<code>, landing page SHARE_BASE_URL/ambassadors/<slug>.

Public (guest-safe) ​

MethodPathBody / queryResponseErrors
GET/affiliate-programmes–Programme[] open for applications–
GET/affiliate-programmes/:slug–Programme & { isOpen }AFFILIATE_PROGRAMME_NOT_FOUND
GET/affiliates/pages/:slug–LandingPageAFFILIATE_PAGE_NOT_FOUND
GET/affiliates/codes/:code–LandingPage for that codeAFFILIATE_PAGE_NOT_FOUND
GET/affiliates/links/:code/qr.svg–image/svg+xmlVALIDATION_FAILED
POST/affiliates/clicks (30/min/IP){ code, channel?: link|qr|deep_link|landing, deviceKey?, referrer? }201 { clickToken | null, expiresAt | null, deepLink }AFFILIATE_LINK_NOT_FOUND

Programme: { id, slug, name, description, termsUrl, commissionBps, commissionMonths, attributionWindowDays, payoutThreshold: Money, eligiblePlans[], benefits[], acceptsApplications }. Empty eligiblePlans = every paid plan. LandingPage: { slug, displayName, handle, avatarUrl, headline, bio, code, webUrl, deepLink, qrPath, landingUrl, programme: { name, description, benefits[], termsUrl }, isAcceptingSignUps }. Clicks from bots get no token; repeats from the same device within AFFILIATE_CLICK_DEDUPE_MINUTES are stored as duplicates and not counted.

Signed-in user ​

MethodPathBody / queryResponseErrors
POST/affiliate-programmes/:slug/applications{ profileId, pitch, audienceSize?, primaryChannelUrl?, countryCode? }201 ApplicationAFFILIATE_PROGRAMME_CLOSED, AFFILIATE_PROFILE_INVALID, AFFILIATE_APPLICATION_EXISTS, AFFILIATE_ALREADY_MEMBER
GET/me/affiliate-applications–Application[] (applications and invitations)–
POST/me/affiliate-applications/:id/withdraw–ApplicationAFFILIATE_APPLICATION_NOT_FOUND, AFFILIATE_APPLICATION_DECIDED
POST/me/affiliate-applications/:id/accept{ profileId } (invitation)Applicationas above, AFFILIATE_PROFILE_INVALID
POST/me/affiliate-applications/:id/decline–Applicationas above
GET/me/affiliates–Affiliate[]–
PATCH/me/affiliates/:id/page{ slug?, headline?, bio? }AffiliateAFFILIATE_NOT_FOUND, AFFILIATE_SUSPENDED, AFFILIATE_SLUG_TAKEN
GET/me/affiliates/:id/dashboard?from&to (ISO, default 30 days, max 367)DashboardAFFILIATE_NOT_FOUND, AFFILIATE_RANGE_INVALID
GET/me/affiliates/:id/commissions?cursor&limitpage of CommissionAFFILIATE_NOT_FOUND
GET/me/affiliates/:id/links–Link[]AFFILIATE_NOT_FOUND
POST/me/affiliates/:id/links{ label?, code? }201 LinkAFFILIATE_LINK_LIMIT, AFFILIATE_CODE_TAKEN, AFFILIATE_SUSPENDED
PATCH/me/affiliates/:id/links/:linkId{ label?, isActive? } (default link can't be switched off)LinkAFFILIATE_LINK_NOT_FOUND

Application: { id, programmeId, profileId, origin: application|invitation, status: pending|invited|approved|rejected|declined|withdrawn|expired, pitch, invitationMessage, decisionReason, expiresAt, createdAt }. Affiliate: { id, programmeId, programmeName, profileId, slug, headline, bio, status: active|suspended|terminated, landingUrl, joinedAt }. Link: { id, code, label, isDefault, isActive, webUrl, deepLink, qrPath }. Dashboard: { from, to, clicks, signUps, conversions, activeReferredSubscribers, commissions: [{ accrued, held, paid, reversed }] per currency, links: [{ linkId, code, label, clicks, signUps, conversions, commission: Money[] }] }. Commission: { id, planCode, base, commissionBps, amount, reversed, status: held|posted|reversed|blocked, paidAt, availableAt, postedAt }. Money is { amountMinor: string, currency }.

Staff (affiliates:read support+, affiliates:manage admin+) ​

MethodPathPermissionBody / queryResponse
GET/staff/affiliate-programmesread?status&cursor&limitpage of StaffProgramme (Programme + status, createdAt, updatedAt)
GET/staff/affiliate-programmes/:idread–StaffProgramme
POST/staff/affiliate-programmesmanage{ slug, name, description?, termsUrl?, commissionBps, commissionMonths, attributionWindowDays, payoutThreshold, eligiblePlans?, benefits?, acceptsApplications? }201, starts draft
PATCH/staff/affiliate-programmes/:idmanageany of the create fields but slugStaffProgramme
POST/staff/affiliate-programmes/:id/statusmanage{ status } (draft→active→paused⇄active→closed)StaffProgramme / AFFILIATE_PROGRAMME_INVALID_TRANSITION
POST/staff/affiliate-programmes/:id/invitationsmanage{ userId, message? }201 StaffApplication (expires after AFFILIATE_INVITATION_DAYS)
GET/staff/affiliate-applicationsread?status&programmeId&cursor&limitpage of StaffApplication
POST/staff/affiliate-applications/:id/approvemanage{ reason? }StaffApplication; creates the affiliate, slug and default code
POST/staff/affiliate-applications/:id/rejectmanage{ reason }StaffApplication
POST/staff/affiliate-applications/:id/cancelmanage–cancels an open invitation
GET/staff/affiliatesread?programmeId&status&cursor&limitpage of StaffAffiliate
POST/staff/affiliates/:id/suspend | /terminatemanage{ reason }StaffAffiliate
POST/staff/affiliates/:id/reinstatemanage{ reason? }StaffAffiliate
GET/staff/affiliate-reportsread?programmeId&from&to&limit{ from, to, programmeId, clicks, signUps, conversions, activeReferredSubscribers, blockedCommissions, commissions[], topAffiliates: [{ affiliateId, slug, accrued, conversions }] }

Suspended affiliates' links stop attributing and their held commission isn't posted until reinstated; paused/closed programmes take no new attributions but existing referrals keep earning until their window ends.

Events ​

TypePayload
affiliates.affiliate.joined{ affiliateId, programmeId, userId, profileId, joinedAt }
affiliates.affiliate.status_changed{ affiliateId, status, occurredAt }
affiliates.commission.accrued{ commissionId, affiliateId, programmeId, paymentId, amount, availableAt }
affiliates.commission.posted{ …, amount, postedAt }
affiliates.commission.reversed{ …, kind: refund|chargeback, amount, wasPosted, reversedAt }

Consumes identity.user.attributed. Notifications: affiliate.invited, affiliate.approved, affiliate.application_rejected, affiliate.status_changed, affiliate.commission_earned, affiliate.commission_reversed.

KYC: one document, one account ​

kyc_verifications.document_blind_index holds a keyed HMAC (purpose kyc.document) of the normalised BVN/NIN/ID number. A trigger sets is_document_claimed when the request becomes verified (any path) and clears it on revoked; a unique partial index on (type, document_blind_index) allows one claimed row. POST /verifications/kyc/bvn and POST /verifications/kyc/id-document refuse with KYC_DOCUMENT_ALREADY_USED (409) before any provider call; a lost race fails the request with document_already_used.

Account privacy ​

On identity.user.deleted: memberships become terminated (account_deleted), headline/bio cleared, links deactivated; applications and the person's own referral attribution are deleted. Commissions and reversals are kept as earnings records.

Plemuz API v2