> ## Documentation Index
> Fetch the complete documentation index at: https://docs.debridge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Affiliate Fees

> Earn revenue by integrating deBridge into your application

# Monetize Your Integration

Affiliate fees let you earn a percentage of every swap that flows through your integration. Whether you're building a DeFi
aggregator, wallet, or trading interface — affiliate fees turn your integration into a revenue stream.

Affiliate fees are supported on the **deBridge Liquidity Network API**. The mechanism works the same way:
you specify a fee percentage and recipient address, and the fee is collected from each swap.

<Note>
  Affiliate fees require building an integration using the deBridge API (DLN) or Widget. For earning without writing
  code, see [deBridge Points](/home/monetization/debridge-points) and [Custom Linking](/home/monetization/custom-linking).
</Note>

## Why Affiliate Fees Matter

<Note>
  Maximum affiliate fee is 10% (1000 basis points). The fee is taken from the input amount before the swap. Keep in mind that
  higher affiliate fees result in worse exchange rates for your users, so balance revenue with competitive pricing.
</Note>

## How It Works

1. User initiates a swap through your integration
2. You specify your affiliate fee percentage and recipient address
3. deBridge collects the fee from the swap amount
4. Fee is sent to your wallet automatically (EVM) or manually claimed (Solana)

## Quick Implementation

### DLN API Integration

[Add parameters to your `create-tx` request](/dln-details/integration-guidelines/order-creation/creating-order/api-parameters/api-parameters#affiliate-fee-percent).

### Widget Integration

Add the parameters to your [widget configuration](/dln-details/integration-guidelines/order-creation/creating-order/api-parameters/api-parameters#affiliate-fee-percent).

## Receiving Your Fees

### EVM Chains

Affiliate fees are **automatically transferred** to your wallet when a solver claims the order. No action required on your part.

<Warning>
  If your `affiliateFeeRecipient` is a smart contract requiring more than 2300 gas, fees won't be sent automatically. Call
  `DlnSource.withdrawUnclaimedAffiliateFees(...)` to claim manually.
</Warning>

### Solana

Affiliate fees must be **manually withdrawn**. Use the `withdrawAffiliateFee` method of the DLN program.

For cross-chain swaps, see the [withdrawal guide](/dln-details/affiliates/withdrawing-affiliate-fees).

For same-chain swaps on Solana, the `affiliateFeeRecipient` must be a [Jupiter referral key](https://referral.jup.ag/dashboard).

## Getting Started

<Steps>
  <Step title="Get a Referral Code">
    Generate your referral code at [app.debridge.com/refer](https://app.debridge.com/refer). Choose Polygon for the cheapest
    option—it works across all chains including Solana.
  </Step>

  <Step title="Add Parameters">
    Include `affiliateFeePercent` and `affiliateFeeRecipient` in your API calls or widget config.
  </Step>

  <Step title="Receive Fees">
    Affiliate fees are sent directly to your `affiliateFeeRecipient` address—automatically on EVM chains, or via manual withdrawal
    on Solana.
  </Step>
</Steps>

## Technical Deep-Dives

For detailed technical specifications, see the DLN reference documentation:

<CardGroup cols={2}>
  <Card title="Affiliate Fees (Technical)" href="/dln-details/affiliates/affiliate-fees">
    Complete API parameters and fee mechanics
  </Card>

  <Card title="Withdrawing Fees" href="/dln-details/affiliates/withdrawing-affiliate-fees">
    Manual withdrawal process for Solana and edge cases
  </Card>

  <Card title="Referral Codes" href="/home/monetization/referral-codes">
    Using referral codes for tracking and features
  </Card>

  <Card title="Auto-Cancellation" href="/dln-details/affiliates/auto-cancellations">
    Automatic order cancellation for improved UX
  </Card>
</CardGroup>
