# Referral Commission

WheelX Widget supports affiliate attribution through `referralCode`.

{% hint style="success" %}
If you are embedding the widget on your own website, community product, trading portal, or partner page, you can attach your affiliate code and receive revenue share for attributed usage.
{% endhint %}

### 1. Get Your Referral Code

Go to the WheelX affiliate portal and create or copy your referral code:

* <https://affiliate.wheelx.fi/>

<figure><img src="https://3290327279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EAKZhuxOqSuWbssTngc%2Fuploads%2FJDcCC1JyUXnEUlGU2FRH%2FHapiGo_2026-03-10_16.49.40.png?alt=media&#x26;token=78407849-f901-476a-8924-cc6a3ac80dbe" alt=""><figcaption></figcaption></figure>

In the dashboard, look at the **Channel referral link** panel on the right side. You will see a row labeled **Code**. That value is your referral code, and that is the exact value you should pass into the widget config.

#### 2. Add It to the Widget Config <a href="#id-2.-add-it-to-the-widget-config" id="id-2.-add-it-to-the-widget-config"></a>

Pass your code through `referralCode`:

```javascript
import type { WheelxWidgetConfig } from '@wheelx/widget'

const widgetConfig: WheelxWidgetConfig = {
  referralCode: 'YOUR_REFERRAL_CODE'
}
```

#### ⚙️ Full Example <a href="#full-example" id="full-example"></a>

You can use `referralCode` together with your normal widget setup:

```js
'use client'

import {
  WheelxBridgeSwapWidget,
  WheelxWidgetProvider,
  type WheelxWidgetConfig
} from '@wheelx/widget'

const widgetConfig: WheelxWidgetConfig = {
  mode: 'bridge-and-swap',
  referralCode: 'YOUR_REFERRAL_CODE',
  networks: {
    from: [1, 8453],
    to: [8453, 137]
  }
}

export default function Page() {
  return (
    <WheelxWidgetProvider>
      <WheelxBridgeSwapWidget config={widgetConfig} />
    </WheelxWidgetProvider>
  )
}
```
