Documentation / @frak-labs/core-sdk / actions / processReferral
Function: processReferral()
processReferral(
client,args):"idle"|"processing"|"success"|"no-referrer"|"self-referral"
Defined in: actions/referral/processReferral.ts:140
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
client
The current Frak Client
args
frakContext?
FrakContext | null
The referral context parsed from the URL
options?
Options for URL replacement and merchant context
walletStatus?
The current user wallet status
Returns
"idle" | "processing" | "success" | "no-referrer" | "self-referral"
The referral state
See
@frak-labs/core-sdk!ModalStepTypes for modal step types