# Earn fees as a partner

> Add your own partner fee on top of LayerHop's when you embed the widget, link to /swap or call the API — how to apply in the dashboard, select your fee, caps, earnings and payouts.

Source: https://docs.layerhop.com/guides/partner-fees

A LayerHop partner earns its own fee on every swap it sends through LayerHop: apply in the [dashboard](https://dashboard.layerhop.com) (you're live at once), set your fee, then select it with `integrator=<your-id>` (widget, deep links, browser apps) or with an API key from your account (servers). Your fee is added on top of LayerHop's channel fee, shown to the user as a separate line, and paid out to your wallets.

## How does a partner fee work?

Each liquidity provider (Relay, deBridge, Jupiter, 0x, KyberSwap, LI.FI) accepts only **one** fee recipient per trade. So LayerHop asks the provider for the **combined** fee (LayerHop's plus yours), collects it in LayerHop's fee wallets, records your share on the order, and pays it out to you.

Every quote reports both parts:

```json
"fees": { "ourFeeBps": 15, "integratorFeeBps": 20, "integrator": "myapp" }
```

| Field | Meaning |
|---|---|
| `ourFeeBps` | LayerHop's part, in bps of the **input** amount |
| `integratorFeeBps` | Your part, in bps of the input amount |
| `integrator` | Your partner id |

`dstAmount` already accounts for both parts. If a provider could not apply a fee on that route, both parts are `0`. If it applied less than requested (a provider cap), the applied fee is split pro rata between LayerHop and you. The widget and the web app include your part in the route's **Fees** total and name it in the fee details, for example **Partner fee (myapp) 0.20%**.

## 1. Apply in the dashboard

Sign in at [dashboard.layerhop.com](https://dashboard.layerhop.com) with your wallet (see [Dashboard & API keys](/guides/dashboard-and-api-keys)), open **Partner program** and apply with:

| Field | Rules |
|---|---|
| Partner id | Lowercase `[a-z0-9-]{1,32}`, unique, for example `myapp`. It is the `integrator` value you use everywhere. |
| Name | Shown in the dashboard. |
| Payout addresses | An EVM address, a Solana address, or both. |

Your profile is `active` straight away, with a starter `maxFeeBps` of **50 bps (0.50%)**: the highest fee you may charge. Your fee starts at `0`, so set it in the next step to start earning. LayerHop can raise your cap (talk to us at dev@layerhop.com once you have volume) or suspend a profile that is abused. Unknown or suspended ids are ignored, so links never break.

## 2. Set your fee

Set your default `feeBps` (0 up to `maxFeeBps`) and edit your payout addresses on the same page, or with [`PATCH /v1/dashboard/partner`](/api-reference#update-the-partner-profile). New quotes use the new fee within a minute.

## 3. Select your fee

There are two ways to select your partner fee on a request.

### Public label: `integrator`

Use it for the embed, `/swap` deep links and browser apps:

```html
<iframe src="https://layerhop.com/embed?dstChain=base&dstToken=USDC&integrator=myapp"></iframe>
```

```text
https://layerhop.com/swap?srcChain=base&dstChain=solana&dstToken=SOL&integrator=myapp
```

```ts
const lh = new LayerHop({ integrator: "myapp" });
```

The label is public, so anyone could copy it, but copying it only sends **you** fees. With a label your **configured** `feeBps` always applies; `integratorFeeBps` is ignored.

### API key: `x-api-key`

Use it for server-side integrations. Any API key of the account that owns an active partner profile selects that partner and **wins over any `integrator` label**. It also lets you choose a fee per request with `integratorFeeBps`, from `0` up to your `maxFeeBps`:

```ts
const lh = new LayerHop({ apiKey: process.env.LAYERHOP_API_KEY, integratorFeeBps: 50 });
```

```bash
curl -H "x-api-key: $LAYERHOP_API_KEY" \
  "https://api.layerhop.com/v1/quote?srcChain=base&srcToken=USDC&amount=100000000&dstChain=solana&dstToken=SOL&sender=0x…&recipient=…&integratorFeeBps=50"
```

A value above your `maxFeeBps`, or one that is not a whole number, returns [`INVALID_PARAMS`](/errors/INVALID_PARAMS). Keep the key on your server and never ship it to browsers.

Partner fees also apply to [deposit addresses](/guides/deposit-addresses): the fee is selected the same way when you create the address (your key, `integrator`, `integratorFeeBps`) and applies to every deposit made to it.

## What are the caps?

| Limit | Value |
|---|---|
| Total fee (LayerHop + partner) | 150 bps (1.50%) by default. When the sum would exceed it, only your part is trimmed. |
| Your fee | 0 to your `maxFeeBps` (50 bps to start; LayerHop can raise it) |
| Provider limits | Some routes cannot carry every fee; the quote shows what was applied. |

For example, the Telegram bot channel is 45 bps, so a partner on that channel can earn at most 105 bps; on the API channel (10 bps) up to 140 bps fits under the cap. See [Fees & channels](/concepts/fees-and-channels).

## How do I see my earnings?

The **Partner program** page of the dashboard, and [`GET /v1/dashboard/earnings`](/api-reference#partner-earnings), show estimates per input token and per month:

- **Filled:** orders that reached `filled`. These are what payouts are based on.
- **Unconfirmed:** orders that were built or submitted but are not final yet.

Your share of an order is `amount × integratorFeeBps / 10000`, in the input token's base units. Earnings are estimates (`basis: "estimate"`) until paid.

## How are payouts made?

- LayerHop pays out what it owes you at least monthly, in the tokens the fees were collected in, to your payout addresses.
- Only filled orders count. Orders that were built but never signed, refunded or failed earn nothing.
- The **Payouts** section of the dashboard, and [`GET /v1/dashboard/payouts`](/api-reference#partner-balances-and-payouts), show per token what you **earned** (filled orders), what was **paid**, and what is **owed**, with a USD estimate, plus every payout with its transaction hash.
- **Download statement (CSV)**, or [`GET /v1/dashboard/earnings/statement.csv`](/api-reference#partner-statement-csv), gives every earning and payout line for your books.
- Make sure your integration [reports the transaction hash](/concepts/order-tracking) after the wallet broadcasts, so wallet-sent orders can be tracked to `filled`. The widget and the web app do this for you.
