# Collect Fees

### Integrator Fee Structure

Squid allows integrators to implement their own fee structure on top of Squid's platform fees. This document details the structure of Integrator fees implemented on through Squid.

<mark style="color:yellow;">**To implement fees please contact the Squid team.**</mark>\
Note, Squid splits all fees collected by integrators 50/50. Please see the Platform Fee Structure section for more detail.

#### Integrator Fee Configuration

As an integrator, you can implement the following fee structures:

1. Flat fee: A fixed amount per transaction
2. Percentage fee: A percentage of the transaction amount
3. Secondary address fees (optional): Fees sent to a second address
4. Option to waive platform fee (if allowed by Squid)

#### Fee Display

Within the returned route request, all fees (including your integrator fees and Squid's platform fees) are aggregated into a single "Service fee" in the route response. This appears in the `feeCosts` array and `route.actions`:

```json
{
  "feeCosts": [
    {
      "amount": "31178739678247",
      "amountUsd": "0.12",
      "description": "Service fee",
      "name": "Service fee",
      "token": {
        "type": "evm",
        "chainId": "42161",
        "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
        "name": "Ethereum",
        "symbol": "ETH",
        "decimals": 18,
        "logoURI": "https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/eth.svg",
        "coingeckoId": "ethereum",
        "usdPrice": 3798.076408348585
      }
    }
  ],
  "actions": [
    {
      // ... other action properties
      "provider": "Service fee",
      "description": "Service fee",
      "priceImpact": 0,
      "exchangeRate": "0.99"
    }
  ]
}
```

### Platform Fee Structure

<mark style="color:yellow;">Squid splits all fees collected by integrators 50/50.</mark>

In the future, Squid may charge additional platform fees on top of integrator fees.

The total fee for a transaction is calculated as:

```
Total Fee = Platform Fees + Integrator Fees
```

Note: In some cases, Squid may allow integrators to waive certain platform fees. Please contact us for more information on fee customization options.


---

# 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.squidrouter.com/api-and-sdk-integration/key-concepts/collect-fees.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.
