> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.0x.org/llms.txt.
> For full documentation content, see https://docs.0x.org/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.0x.org/_mcp/server.

# Monetize Your App

> Collect a percentage-based fee on every cross-chain swap your users make.

The 0x Cross-Chain API is in private beta. [Request access](https://0x.org/products/cross-chain) to start building.

Collect a percentage-based fee on every cross-chain swap your users make. Fees are deducted from the `sellAmount` and sent directly to your wallet during the origin transaction.

## Quick Start

Add `feeBps` and `feeRecipient` to your quote request:

```typescript
const quoteParams = new URLSearchParams({
    originChain: '8453',
    destinationChain: '42161',
    sellToken: '0x4200000000000000000000000000000000000006',
    buyToken: '0xaf88d065e77c8cc2239327c5edb3a432268e5831',
    sellAmount: '1000000000000000000',
    originAddress: '$USER_TAKER_ADDRESS',
    sortQuotesBy: 'price',

    // Monetisation parameters
    feeRecipient: '0x2fb3a9fb601808e110b1ade14068d69c3bfe0fef', // address to which the fee should be sent
    feeBps: 100 // The amount in bps of the amount that will be delivered to the feeRecipient

    // The feeToken is optional as currently it is only possible to collect fees in sellToken
});
```

## How Fee Calculation Works

Fees are calculated as a percentage of the `sellAmount`:

```
feeAmount = sellAmount * feeBps / 10000
amountAfterFee = sellAmount - feeAmount
```

**Example:** User sells 1,000 USDC with `feeBps=50` (0.5%):

* Fee collected: `1,000,000,000 * 50 / 10000 = 5,000,000` (5 USDC)
* Amount that reaches the bridge: `995,000,000` (995 USDC)
* The `buyAmount` in the quote reflects the post-fee amount

The quote response includes a `fees` object:

```json
{
  "fees": {
    "integratorFees": [
      {
        "amount": "5000000",
        "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "type": "volume"
      }
    ],
    "zeroExFee": null,
    "bridgeNativeFee": null
  }
}
```

| Field             | Description                                                                                                                                                                                       |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `integratorFees`  | Array of your fees                                                                                                                                                                                |
| `zeroExFee`       | 0x protocol fee, if applicable.                                                                                                                                                                   |
| `bridgeNativeFee` | Additional bridge infrastructure cost paid by the user in native tokens. Please see [Native Tokens and Bridge Fees](/docs/cross-chain-api/key-concepts/understanding-bridging-costs) for details. |

## Multiple Fee Recipients

It is also possible to collect multiple fees, sent to different recipients as a part of a single trade.

```typescript
// To collect multiple fees
feeRecipient: '0xWalletA,0xWalletB'
feeBps: '30,20'
```

This collects:

* **Index 0:** 0.3% (30 bps) will go to wallet `0xWalletA`
* **Index 1:** 0.2% (20 bps) will go to wallet `0xWalletB`

Arrays are matched by position. All arrays must have the **same length**.

When multiple fees are used, the response contains `integratorFees` (array) instead of `integratorFee`:

```json
{
  "fees": {
    "integratorFees": [
      { "amount": "3000000", "token": "0x...", "type": "volume" },
      { "amount": "2000000", "token": "0x...", "type": "volume" }
    ]
  }
}
```

## Parameter Reference

| Parameter      | Type   | Required            | Description                                                    |
| -------------- | ------ | ------------------- | -------------------------------------------------------------- |
| `feeBps`       | string | With `feeRecipient` | Comma-separated basis points. Each: integer 0–10,000.          |
| `feeRecipient` | string | With `feeBps`       | Comma-separated wallet addresses. Must be valid EVM addresses. |
| `feeToken`     | string | No                  | Comma-separated token addresses. Defaults to `sellToken`.      |

### Validation Rules

* `feeBps` and `feeRecipient` must **both** be provided, or neither.
* If `feeToken` is provided, array length must match `feeBps`.
* `feeRecipient` addresses must be valid for the origin chain's address format.

## Pricing Considerations

* Fees reduce the `sellAmount` that reaches the bridge, reducing the user's `buyAmount`.
* Higher fees may make your quotes less competitive if users compare across aggregators.