Overview
The embedded dashboard displays:- Referral link with copy functionality
- Performance metrics (clicks, leads, sales)
- Commission earnings and payout status
- Optional program description card
- Coupon codes (with optional self-service creation)
- Marketing resources and creatives
Integration Flow
1
Your Server calls Affonso API
POST /v1/embed/token with user data (email, name, image)2
Affonso returns token
Response includes
publicToken, expiresAt, affiliate link, and partnershipStatus3
Frontend renders iframe
Embed the dashboard using the token in the iframe URL
Step 1: Generate Token
Create an API route on your server that generates a token. This keeps your API key secure.Body Parameters
string
required
Your affiliate program ID.
object
required
Information about the user you want to display the dashboard for.
string
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:
partnershipStatusisAPPROVED– affiliate can start referring immediately - Private:
partnershipStatusisPENDING– requires manual approval in your dashboard - Invite:
partnershipStatusisAPPROVED– but only pre-invited affiliates can join
Step 2: Render the Dashboard
Use thepublicToken in an iframe to display the dashboard.
For more reliable iframe delivery when ad blockers or privacy tools are
present, see
Proxy Setup (Optional) for the
first-party proxy approach.
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
Customization
URL Parameters
Add these parameters to the iframe URL for customization:Supported Languages
The dashboard supports 16 languages:
If an invalid language code is provided, the dashboard falls back to English.
Example with dark mode, custom background, and German:
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 16 languages – preview updates instantly
- Background: Pick a color that matches your app
- Card visibility: Toggle header, description, rewards, reports, and resources
- Click Integration Code to copy the configured code snippets

