Commission Tiers
Configure tiered commission rates.
Updated
On this page
Overview
Affiliates earn commission on each sale made through their referral codes. Commission rates are organized into tiers configured in the dashboard.
Configure tiered commission rates.
Updated
Affiliates earn commission on each sale made through their referral codes. Commission rates are organized into tiers configured in the dashboard.
import dash from "@/lib/dash"
// Authenticated as an approved affiliate
const dashboard = await dash.affiliates.getMyDashboard()
// dashboard = {
// tier_name: "Silver",
// commission_rate: "10%",
// total_orders: 45,
// total_revenue: "2,340.50",
// total_earned: "234.05",
// paypal_email: "john@paypal.com",
// discount_codes: [
// { code: "JOHNS-CODE", uses: 23, revenue: "1,200.00" }
// ]
// }
const { success, discount_code } = await dash.affiliates.createCode({
code: "JOHNS-DEAL",
})
await dash.affiliates.updateProfile({
paypal_email: "newemail@paypal.com",
})
Tiers are configured in the dashboard under Marketing → Affiliates → Tiers. As affiliates generate more sales, they can advance to higher tiers with better commission rates.
# Affiliate dashboard
GET /storefront/affiliates/dashboard
Authorization: Bearer {access_token}
# Create code
POST /storefront/affiliates/create-code
Authorization: Bearer {access_token}
Content-Type: application/json
{ "code": "JOHNS-DEAL" }