Overview
The embedded dashboard displays:- Referral link with copy functionality
- Performance metrics (clicks, leads, sales)
- Commission earnings and payout status
- Coupon codes (with optional self-service creation)
- Marketing resources and creatives
Integration Flow
Affonso returns token
Response includes
publicToken, expiresAt, affiliate link, and partnershipStatusStep 1: Generate Token
Create an API route on your server that generates a token. This keeps your API key secure.Body Parameters
Your affiliate program ID.
Information about the user you want to display the dashboard for.
Affiliate group ID to assign the user to. If not specified, the user is assigned to your program’s default group. Use this to place users in specific commission tiers. Find your group IDs in Dashboard → Affiliate Program → Groups.
Example Request
Response
New users are automatically registered as affiliates. Their partnership status depends on your program’s Access Mode setting:
- Public (auto-approve):
partnershipStatusisAPPROVED– affiliate can start referring immediately - Private (manual approval):
partnershipStatusisPENDING– requires manual approval in your dashboard
Step 2: Render the Dashboard
Use thepublicToken in an iframe to display the dashboard.
Next.js Example
1. Create API Route
First, create a server-side API route that generates the token:2. Create the Page Component
Then, fetch the token from your API route and render the iframe:Token Lifecycle
| Property | Details |
|---|---|
| Validity | 30 minutes |
| Refresh | Generate new token on each page load |
| Cleanup | Old tokens are automatically invalidated |
Customization
URL Parameters
Add these parameters to the iframe URL for customization:| Parameter | Values | Description |
|---|---|---|
theme | light, dark, system | Color scheme. Default: light |
bg | HEX color (without #) | Background color. Use this to match your app’s background. Example: 0f0f0f for dark, ffffff for white |
lang | Language code | UI language. Default: en. See supported languages below |
showHeader | true, false | Show header card with program logo and name. Default: true |
showRewards | true, false | Show rewards card with commission structure and incentives. Default: true |
showReports | true, false | Show reports tab with statistics and earnings table. Default: true |
showResources | true, false | Show resources tab with marketing materials and creative assets. Default: true |
enableQRCode | true, false | Enable QR code download for referral links. Default: true |
enableTrackingIdEdit | true, false | Allow affiliates to customize their tracking ID. Default: true |
enableSubParams | true, false | Enable sub-parameters (sub1-sub5) input fields. Default: true |
padding | true, false | Add padding around the dashboard. Default: true |
Supported Languages
The dashboard supports 14 languages:| Code | Language |
|---|---|
en | English (default) |
de | Deutsch |
fr | Français |
es | Español |
it | Italiano |
pt | Português |
nl | Nederlands |
pl | Polski |
tr | Türkçe |
ja | 日本語 |
zh | 中文 |
ko | 한국어 |
ru | Русский |
ar | العربية |
Brand Colors
The dashboard inherits your brand colors from Portal Settings:- Primary Color - Buttons, links, accents
- Secondary Color - Highlights, backgrounds
#881337) in your Affonso dashboard under Portal Settings.
Visual Preview Editor
Don’t want to write code to test settings? Use the visual editor:- Go to Affiliate Program → Appearance
- Click the Embed tab
- Customize in real-time:
- Theme: Light, dark, or system (follows user’s device preference)
- Language: Select from 14 languages – preview updates instantly
- Background: Pick a color that matches your app
- Click Integration Code to copy the configured code snippets

