# Developer Fees

A developer fee is an optional amount kept from each payment and settled to one organization address. It is a percentage configured per account, or a fixed amount set on a payment link. The payout address belongs to the organization and is set in the Fluxis Dashboard, not through this API.

## Percentage

The API uses **percent points**. `"1.5"` means 1.5 percent. The maximum is `"20"`. At most two decimal places are accepted. `"0"` is rejected.

Fluxis stores the value as a fraction for the fee calculation (`"1.5"` is stored as `0.015`) and applies it to the amount left after the service fee. Turning the fee off keeps the percentage. A later update can turn it back on without sending `percentage` again, and the stored rate is used. The first time the fee is enabled, `percentage` is required. A stored row written before the on/off switch, with no `enabled` field, still charges.

## Read and update an account

Organization credentials only. Account credentials receive `403`.

```
GET /v1/account/{accountId}/developer-fee
PUT /v1/account/{accountId}/developer-fee
```

```json
{
  "enabled": true,
  "percentage": "1.5"
}
```

`GET` returns `404` when the account has never been configured. `percentage` is `null` only when a stored row has no rate.

To turn the fee off without changing the rate, or to turn it back on at the stored rate, omit `percentage`.

Enabling the fee requires the organization developer-fee settlement address. If it is missing, the update returns `422` with code `DF0001`. The public API cannot read or write that address.

## Fixed fee on a payment link

Send `developer_fee_amount` when you create a [payment link](/docs/developers/payment-links) to charge a fixed amount on the payments of that link instead of the account percentage. Organization credentials only. An account credential that sends the field receives `403`, and never sees it in a response.

```json
{
  "point_of_sale_id": "5d1b3f0e-8a52-4c8e-9d0b-2f6f0a4d7c11",
  "name": "Deposit",
  "amount": "100.00",
  "currency": "USD",
  "developer_fee_amount": "30.00"
}
```

| `developer_fee_amount` | Developer fee on payments of the link |
| ---------------------- | ------------------------------------- |
| Omitted | The account percentage, as before |
| `"0"` | None, even when the account percentage is on |
| Greater than `0` | That amount, in the link currency. It replaces the account percentage. The two are never added |

- The value is a decimal string with at most two decimal places, in the link currency (`USD` or `ARS`).
- There is no percentage cap. The maximum of `"20"` applies to the account percentage only. The one limit is that the fee plus the Fluxis service fee must be less than the link amount.
- The account percentage does not need to be enabled.
- The fee is set when the link is created and cannot be changed. Delete the link and create another.
- Fluxis never reduces the fee to make it fit. A fee that cannot be charged is an error and the link is not created.

`POST /v1/payment-links`, `GET /v1/payment-links` and `GET /v1/payment-links/:id` return `developer_fee_amount` to organization credentials when the link sets one. `"0.00"` means the link charges no developer fee. The checkout does not show it.

### Errors when creating the link

| Case | Response |
| ---- | -------- |
| Negative, more than two decimal places, or not a number | `400` `MD0004` |
| Sent with an account credential | `403` |
| Greater than `0` and the organization has no developer-fee settlement address | `422` `DF0001` |
| The fee plus the estimated service fee is equal to or greater than the link amount | `422` `DF0002`. `details` gives the estimated service fee and the highest fee the link accepts |

With `"0"` the settlement address is not required. The service fee is estimated with the rate of the account, then the organization, then the Fluxis default.

### How it is charged

The service fee is taken from the gross amount first, then the developer fee, then revenue share on what is left. The fixed fee is converted to the token of the payment in proportion to the link amount: fee × expected token amount ÷ link amount, rounded to 6 decimal places.

The fee is charged in full on every payment of the link and does not move with the amount received. A reusable link charges it each time it is paid, so a link for a deposit should be paid once.

| Payment | Developer fee |
| ------- | ------------- |
| Exact amount | The full fixed fee |
| More than the amount | The full fixed fee. The excess goes to the merchant |
| Less, within the point of sale tolerance | The full fixed fee. The merchant absorbs the difference |
| Less, outside the tolerance | The payment is held as `underpaid`. If the merchant accepts it, the full fixed fee is charged |
| The amount received does not cover the fixed fee plus the service fee | The payment is held as `underpaid` and cannot be accepted |

### Payments that do not cover the fee

When the amount received, after the service fee, does not cover the fixed fee, the payment ends as `underpaid` even if it is within the point of sale tolerance. The webhook reports `underpaid` and the transaction stays on hold with no developer fee.

The merchant cannot accept that payment in the Fluxis Dashboard: accepting it returns `422` with code `DF0003`. It stays on hold until Fluxis resolves it. Contact [support@fluxis.us](mailto:support@fluxis.us).

## Error codes

| Code | Status | Meaning |
| ---- | ------ | ------- |
| `DF0001` | `422` | The organization has no developer-fee settlement address. Returned when enabling the account percentage or creating a link with a fixed fee greater than `0` |
| `DF0002` | `422` | The fixed fee plus the service fee does not fit in the payment link amount |
| `DF0003` | `422` | The amount received does not cover the fixed fee plus the service fee, so the payment cannot be accepted |

## Settlement

Once the organization address is saved, developer fees on payments created at or after that moment are included in the settlement batch and sent to that address on the payment's network. The same EVM address is used on every network. A fixed fee settles the same way as the percentage.

Payments created before the address was saved are still settled for the net amount. Their developer fee is not transferred, including fees that were already pending when the address was added. Replacing the address does not move that cutoff: the original save time stays. The address cannot be removed.

A missing address does not block the merchant's net settlement. Revenue share is calculated on the payment and is not paid out by settlement.

See [Settlements and Consolidation](/docs/key-concepts/settlements-and-consolidation).
