{
"status": true,
"message": "Affiliate code applied successfully! You received 0.2 bonus."
}
{
"status": false,
"message": "Code is required"
}
{
"status": false,
"message": "Promo code is invalid"
}
{
"status": false,
"message": "You cannot use your own promo code"
}
{
"status": false,
"message": "You've already used a promo code."
}
{
"status": false,
"message": "Unauthorized"
}
{
"status": false,
"message": "An error occurred while using the affiliate code."
}
{
username: string; // Affiliate's display name
avatar: string; // Affiliate's avatar URL
deposited: number; // Total amount deposited by affiliate
withdraws: number; // Total amount withdrawn by affiliate
steamid: string; // Affiliate's Steam ID
earned: number; // Amount earned from this affiliate
}
{
affiliate: {
code: string; // User's own affiliate code (empty if not set)
used: string; // Code the user used (empty if not used)
}
}
{
user: string; // Steam ID of code owner
code: string; // The affiliate code (uppercase)
affiliates: string[]; // Array of Steam IDs who used this code
earning: number; // Current unclaimed earnings
totalEarnings: number; // Lifetime total earnings
lastClaimed: Date; // Last time earnings were claimed
deposits: Array<{ // Deposit history from affiliates
user: string;
amount: number;
date: Date;
}>;
withdraws: Array<{ // Withdrawal history from affiliates
user: string;
amount: number;
date: Date;
}>;
bonuses: Array<{ // Bonus history from affiliates
user: string;
amount: number;
date: Date;
}>;
}