Developer Fees

Introduction

Developers can collect customized fees as funds are transferred by Bridge.

These fees are taken out of the customer's transaction amount and held in a separate ledger for the developer. These fees are distributed to the developer on a regular basis. By default, we will distribute developer fees monthly.

Transfers

To collect developer fees simply set developer_fee in the API request

curl --location --request POST 'https://api.bridge.xyz/v0/transfers' \
--header 'Api-Key: <API Key>' \
--header 'Idempotency-Key: <Unique Idempotency Key>' \
--data-raw '{
  "amount": "50.0",
  "on_behalf_of": "cust_alice",
  "developer_fee": "0.5",
  "source": {
    "payment_rail": "ach",
    "currency": "usd",
    "external_account_id": "external_account_123",
  },
  "destination": {
    "payment_rail": "ethereum",
    "currency": "usdc",
    "to_address": "0xdeadbeef",
  },
}'

In the above example, $0.50 is taken out of the customer's transaction amount and reserved for the developer. $49.50 will be sent to the destination specified by the customer.

Here are a few examples of how the developer fee calculation is made:

  • If the amount is "99.99" and the developer_fee is "0.99", then $0.99 will be reserved for you (the developer), and $99.00 will be sent to the destination
  • If the amount is "21.20" and the developer_fee is "5.19", then $5.19 will be reserved for you, and $16.01 will be sent to the destination
  • If the amount is "5.00" and the developer_fee is "5.00", then an error response will be returned. The developer_fee must be less than the amount
  • If the amount is "5.00" and the developer_fee is "5.01", then an error response will be returned

A few additional requirements on the developer fee:

  • The fee is always in USD. It is NOT a percentage. This gives you maximum flexibility to decide your fee structure. You only need to tell Bridge what gross fees to reserve out of the customer's transaction amount.
  • The fee is set on a per transaction basis
  • The fee must be less than the customer's transaction amount
  • The fee has maximum 2 digits of precision, i.e. 10.98 is allowed, but 10.987 is not
  • The destination will receive amount - fee
  • The minimum amount for onramp, offramp, and crypto-to-crypto transfers must account for the developer fee:
    • amount-fee must be greater than $20 for USDT transactions, $1 for all others
  • The fee is optional. If developer_fee is blank, then it’s equivalent to the fee being set to "0.0"
  • The fee is only valid on transactions where funds are transferred by Bridge (not to Bridge)

More details about off-ramping and on-ramping

Liquidation Address

Default developer fee percent

You may set a fee that will apply to all Liquidation Addresses by using the developer fees API.

curl --location --request POST 'https://api.bridge.xyz/v0/developer/fees' \
--header 'Api-Key: <API Key>' \
--header 'Idempotency-Key: <Unique Idempotency Key>' \
--data-raw '{
  "default_liquidation_address_fee_percent": 0.5,
}'

In the above example, this will set the fee collected on all liquidation addresses to .5%. If $50.00 is deposited to a liquidation address, then the customer will receive $49.75 and $0.25 will be added to the developer fee account.

Custom developer fee percent

Setting a custom_developer_fee_percent will override the default developer fee percent when creating a Liquidation Address.

curl --location --request POST 'https://api.bridge.xyz/v0/customers/cust_alice/liquidation_addresses' \
--header 'Content-Type: application/json' \
--header 'Api-Key: <Api-Key>' \
--header 'Idempotency-Key: <Unique Idempotency Key>' \
--data-raw '{
  "chain": "ethereum",
  "currency": "usdc",
  "external_account_id": "ea_alice_bofa"
  "destination_wire_message": "alice_wire_123"
  "destination_payment_rail": "wire",
  "destination_currency": "usd",
  "custom_developer_fee_percent": "10.2",
  "created_at": "2023-11-22T21:31:30.515Z",
  "updated_at": "2023-11-22T21:31:30.515Z"
}'

Payment

We collect developer fees on your behalf through the money that your customers send into Bridge. We set that aside into a special account reserved for you, that we pay out on a monthly basis. Reach out to learn more about how to get paid out.