The affiliate object is providing access to essential affiliate information for users participating in the affiliate program. This object is part of the user object and contains details about the user’s affiliate status, earnings, and payout preferences.

Availability

The affiliate object is always available as a property of the user object when a user is logged in. Affiliate accounts are automatically generated for each user, so you can safely access user.affiliate properties without additional checks for its existence.

Properties

The affiliate object contains the following properties:

id
string
required

A unique identifier for the affiliate account, always in UUID version 4 format (e.g., “0191acee-3bf1-71cf-ac75-7a9e06fd6a3c”).

paypal_email
string|null
required

The PayPal email address associated with the affiliate account for payouts. This field may be null if not set by the user.

bank_requisites
string|null
required

Bank account details for payouts. This field may be null if not set by the user.

code
string
required

The unique affiliate code assigned to the user (e.g., “87a052aa0996”). This code is used to track referrals.

clicks
integer
required

The total number of clicks on the user’s affiliate links.

referrals
integer
required

The total number of successful referrals made by the affiliate.

balance
integer
required

The current balance of earnings available for payout to the affiliate. Amount in currency minor units.

pending
integer
required

The amount of earnings that have been requested for payout but not yet processed or paid out. Amount in currency minor units.

withdrawn
integer
required

The total amount of earnings that have been paid out to the affiliate. Amount in currency minor units.

currency
Currency
required

An object containing information about the currency used for affiliate earnings. See Currency Object for more details.

payout_method
enum
required

The preferred payout method chosen by the affiliate. Possible values are:

  • paypal: PayPal payout method
  • bank_transfer: Bank transfer payout method