Referrals and referral partners
Register a wallet's referral link, carry it into a cleanup, and read what it was paid.
There are two kinds of referral. A wallet's referral link (?ref=) earns a share of the service fee on the cleanups it brings. A referral partner's link (?rc=) is for organizations: it follows a new organization from the website's pricing page through checkout, for the partner's commission on the subscription.
Register a referral link
- Ask
POST /v1/wallet-proofs/challengesfor purposereferrer, with the wallet'saddressand asubject. - Have the wallet sign the challenge's
message, and send the base58 signature toPOST /v1/referrerswithchallengeIdandmethod: "signature". A wallet that can't sign a message lands a memo transaction carrying the challenge'smemoinstead, after the challenge was made, and registers withmethod: "memo". A challenge answers once: within 15 minutes, or within 72 hours when you asked for it withmethod: "memo", time for a multisig's members to approve and execute the memo. A challenge asked for with a method answers only that way.
The answer is the wallet's code and its link: share the link as it comes back. Registering again returns the same code. GET /v1/referrers/{codeOrAddress} looks a registration up, with whether the wallet can receive SOL now.
Attribute a cleanup
A referral link carries ?ref=<code>. Pass the code as referralCode on the quote and the round, beside burner and donationBps. Attribute a referral is the SDK's recipe.
The server looks the code up. The quote's referrer is the one it found; an unknown code, a wallet referring itself, or a referrer that can't receive SOL is a warning (referrer_unknown, self_referral, referrer_cannot_receive). The referrer takes the service fee's share slot and the donation still goes to the burner's organization, as Fees and donations shows. A share the referrer couldn't receive stays with the platform.
What a referrer earned
GET /v1/referrers/{codeOrAddress}/earnings?timeframe=month (this calendar month, UTC) or timeframe=all answers from the payout ledger: paidLamports, missedLamports, and the cleanups and wallets the link brought in. GET /v1/leaderboards/referrers ranks every registered referrer the same way. Clicks and referred wallets alone are not payments.
Referral partners
A referral partner applies at POST /v1/referral-partner-applications, with a solved Altcha (GET /v1/altcha/challenge) and a referral_partner wallet proof of the address its commissions would go to. Staff review each application. An approved partner gets a ?rc= link to the pricing page, which onboarding and checkout carry onto the organization it brings. Never pass an rc code as referralCode.