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.
Affiliate 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" }
// ]
// }
Creating Discount Codes
const { success, discount_code } = await dash.affiliates.createCode({
code: "JOHNS-DEAL",
})
Updating Affiliate Profile
await dash.affiliates.updateProfile({
paypal_email: "newemail@paypal.com",
})
Tier Structure
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.
REST API
# 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" }
Next Steps
- Tracking Referrals — How referrals are tracked
- Payouts — Getting paid