Affiliate
Client affiliate information
If a WHMCS operator turns on the affiliate payment system, then a client account can become an affiliate. An affiliate record is attached to a specific client and provides configuration information to the affiliate system so that client can handle payments and commissions. It also tracks the balance available, amount withdrawn, and the number of visitors an affiliate has brought to an operator's WHMCS installation.
class
Affiliate extends AbstractModel
Properties summary
Type | Property | Description | |
---|---|---|---|
protected | $table | ||
protected | $columnMap | ||
protected | $dates | ||
int | $id | An affiliate record's unique id. | |
Carbon | $date | The date an affiliate record was added to a client. | |
int | $clientId | The id of the client associated with an affiliate record. | |
int | $visitorCount | The number of visitors who have followed affiliate links belonging to an affiliate account. | |
string | $commissionType | The type of commission payment made to an affiliate, either "percentage", "fixed", or null. | |
float | $paymentAmount | Either the percentage or fixed amount paid to an affiliate based on the commission type. | |
bool | $isPaidOneTimeCommission | Whether or not an affiliate is only paid commission on initial sale. Otherwise, an affiliate's commission applies to recurring payments. | |
float | $balance | The total balance of unclaimed commission belonging to an affiliate. | |
float | $amountWithdrawn | The total balance withdrawn by an affiliate. | |
Carbon | $createdAt | The date an affiliate record was created. | |
Carbon | $updatedAt | The date an affiliate record was last modified. | |
Client | $client | The client associated with an affiliate record. |
Methods summary
Return Type | Method Name | Description | |
---|---|---|---|
BelongsTo | client() | Each affiliate belongs to one client. |
Details
BelongsTo
client ()
Each affiliate belongs to one client.