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

# Get Merchant Fees — GET /merchants/{merchantID}/fees

> Retrieve fee structures and token-amount fee calculations for a merchant by invoice type and payment method. Includes two endpoints for rate and amount queries.

The merchant fees endpoints return the fee structure applied to a merchant for a given transaction type. IteraPay charges fees that vary by invoice type (`onetime`, `reusable`, `collect`, `withdrawal`) and optionally by payment method. There are two related endpoints: one for fee rates, and one for the fee calculated against a specific transaction amount.

## Get fee rates

Returns the fee structure (percentage or flat rate) for a given transaction type.

**`GET /merchants/{merchantID}/fees`**

### Authentication

Accepts a Bearer token (`Authorization: Bearer <token>`) or an API key (`X-Api-Key: <key>`).

### Path parameters

<ParamField path="merchantID" type="string" required>
  The UUID of the merchant.
</ParamField>

### Query parameters

<ParamField query="type" type="string" required placeholder="onetime | reusable | collect | withdrawal">
  The transaction type to retrieve fees for. One of: `onetime`, `reusable`, `collect`, `withdrawal`.
</ParamField>

<ParamField query="paymentMethodID" type="integer">
  The payment method ID to filter fees for. If omitted, the default fee structure for the type is returned.
</ParamField>

### Response fields

<ResponseField name="type" type="string" required>
  The transaction type the fee applies to.
</ResponseField>

<ResponseField name="percentage" type="string">
  The fee as a percentage of the transaction amount (e.g., `"1.50"` for 1.5%).
</ResponseField>

<ResponseField name="flat" type="string">
  A flat fee amount applied per transaction.
</ResponseField>

### Example request

```bash theme={null}
curl --request GET \
  --url 'https://api.iterapay.com/merchants/b0fcc813-a7ce-4bbc-932f-dbef6f59ca7f/fees?type=onetime&paymentMethodID=1' \
  --header 'Authorization: Bearer <token>'
```

### Example response

```json theme={null}
{
  "type": "onetime",
  "percentage": "1.50",
  "flat": "0.00"
}
```

***

## Get fees for a transaction amount

Calculates the actual fee amounts for a specific transaction value.

**`GET /merchants/{merchantID}/fees/amount`**

### Authentication

Accepts a Bearer token (`Authorization: Bearer <token>`) or an API key (`X-Api-Key: <key>`).

### Path parameters

<ParamField path="merchantID" type="string" required>
  The UUID of the merchant.
</ParamField>

### Query parameters

<ParamField query="type" type="string" required placeholder="onetime | reusable | collect | withdrawal">
  The transaction type. One of: `onetime`, `reusable`, `collect`, `withdrawal`.
</ParamField>

<ParamField query="amount" type="string" required placeholder="e.g. 100.00">
  The transaction amount as a decimal string. The fee is calculated against this value.
</ParamField>

<ParamField query="paymentMethodID" type="integer">
  The payment method ID. If omitted, the default fee structure for the type is used.
</ParamField>

### Response fields

<ResponseField name="type" type="string" required>
  The transaction type the fee applies to.
</ResponseField>

<ResponseField name="feeAmount" type="string" required>
  The total fee amount in the same unit as the `amount` query parameter.
</ResponseField>

<ResponseField name="netAmount" type="string" required>
  The amount after fees are deducted.
</ResponseField>

### Example request

```bash theme={null}
curl --request GET \
  --url 'https://api.iterapay.com/merchants/b0fcc813-a7ce-4bbc-932f-dbef6f59ca7f/fees/amount?type=onetime&paymentMethodID=1&amount=100.00' \
  --header 'Authorization: Bearer <token>'
```

### Example response

```json theme={null}
{
  "type": "onetime",
  "feeAmount": "1.50",
  "netAmount": "98.50"
}
```

## Error responses

| Status | Description                                     |
| ------ | ----------------------------------------------- |
| `400`  | Missing or invalid query parameters.            |
| `401`  | Missing or invalid credentials.                 |
| `403`  | Valid credentials but insufficient permissions. |
| `404`  | No merchant found with the given `merchantID`.  |
