# 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="/files/4de9IZxtKB3oyjaOlCbj" 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>
  )
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wheelx.fi/widget/referral-commission.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
