Aller au contenu

processReferral

Ce contenu n’est pas encore disponible dans votre langue.

processReferral(client, args): "success" | "idle" | "processing" | "no-referrer" | "self-referral"

Defined in: actions/referral/processReferral.ts:149

Handle the full referral interaction flow:

  1. Check if the user has been referred (if not, early exit)
  2. Preflight self-referral check (if yes, early exit)
  3. Track the arrival event
  4. Replace the current URL with the user’s own referral context
  5. Return the resulting referral state

FrakClient

The current Frak Client

FrakContext | null

The referral context parsed from the URL

ProcessReferralOptions

Options for URL replacement and merchant context

WalletStatusReturnType

The current user wallet status

"success" | "idle" | "processing" | "no-referrer" | "self-referral"

The referral state

@frak-labs/core-sdk!ModalStepTypes for modal step types