processReferral
processReferral(
client,args):"success"|"idle"|"processing"|"no-referrer"|"self-referral"
Defined in: actions/referral/processReferral.ts:149
Handle the full referral interaction flow:
- Check if the user has been referred (if not, early exit)
- Preflight self-referral check (if yes, early exit)
- Track the arrival event
- Replace the current URL with the user’s own referral context
- Return the resulting referral state
Parameters
Section titled “Parameters”client
Section titled “client”The current Frak Client
frakContext?
Section titled “frakContext?”FrakContext | null
The referral context parsed from the URL
options?
Section titled “options?”Options for URL replacement and merchant context
walletStatus?
Section titled “walletStatus?”The current user wallet status
Returns
Section titled “Returns”"success" | "idle" | "processing" | "no-referrer" | "self-referral"
The referral state
@frak-labs/core-sdk!ModalStepTypes for modal step types