# Calculating Fees Dynamically

Some platforms have variable pricing strategies that depend on a number of factors such as promotions, concessions, and other criteria.

## Using supplemental fee

Finix allows you to use our `supplemental_fee` on our /Transfers API. This `supplemental_fee` works with our Merchant Fee Profiles to unlock several pricing strategies.

In all of these strategies below, you will need to supply this field using logic you control into our API.

## Common implementation strategies

### Passing fees to Buyers

Many platforms choose to offer a pricing strategy where the buyer pays for processing fees. These are usually considered Buyer Fees. You should consult your own legal counsel if what you are doing is considered a Buyer Fee.

Goal: Merchant does not pay for fees. This means they pass through the fees to the buyer.

Example:

- $100.00 Item
- $4.00 Buyer Fee passed onto buyer (Displayed as "Processing Fee" to Buyer or "Platform Fee")
- $4.00 Fee charged to merchant


To accomplish this example, we will need to:

1. Set the Merchant Fee Profile for the merchant to be $0.00 for Card and ACH transactions
2. Run a Sale or Capture with a `supplemental_fee` of $4.00 and the amount to be passed to be the buyer to be $104.00



```API
curl -i -X POST \
  -u USfdccsr1Z5iVbXDyYt7hjZZ:313636f3-fac2-45a7-bff7-a334b93e7bda \
  https://finix.sandbox-payments-api.com/transfers \
  -H 'Content-Type: application/json' \
  -H 'Finix-Version: 2022-02-01' \
  -d '{
    "amount": 10400,
    "supplemental_fee": 400,
    "currency": "USD",
    "merchant": "MUmfEGv5bMpSJ9k5TFRUjkmm",
    "source": "PI6iQcTtJNCS8GZAVKYi5Ueb",
    "tags": {
      "test": "Sale"
    }
  }'
```

### Charging an additional fee on top of interchange plus or blended pricing

This pricing strategy requires the use of Merchant Fee Profiles along with calculating the fees at transaction time.

Let's take a simplified example where we charge a flat rate of $1.00 on top of interchange plus pricing strategy for transactions less than $150.00. For transactions more than $150.00, we charge $1.50.

Goal: Charge $1.00 fee on top of fees calculated by the fee profile

To accomplish this example we will need to:

1. Set the merchant fee profile to the desired setting & rates
2. Supply a `supplemental_fee` of $1.00 for transactions less than $150.00 and $1.50 for a transactions over $150.00



```API
curl -i -X POST \
  -u USfdccsr1Z5iVbXDyYt7hjZZ:313636f3-fac2-45a7-bff7-a334b93e7bda \
  https://finix.sandbox-payments-api.com/transfers \
  -H 'Content-Type: application/json' \
  -H 'Finix-Version: 2022-02-01' \
  -d '{
    "amount": 10000,
    "supplemental_fee":100,
    "currency": "USD",
    "merchant": "MUmfEGv5bMpSJ9k5TFRUjkmm",
    "source": "PI6iQcTtJNCS8GZAVKYi5Ueb",
    "tags": {
      "test": "Sale"
    }
  }'
```

A `Fee` of $1.00 will be created on top of the additional fees created by the Fee Profile.