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

# Calculate Fiat Transfer Fee

> Calculate the payout fee for a fiat transfer amount in NGN

## Request

<ParamField header="x-api-key" type="string" required>
  API Key for authentication
</ParamField>

## Query Parameters

<ParamField query="amount" type="number" required>
  The transfer amount in NGN for which to calculate the fee. Must be a positive number (minimum `0.01`).
</ParamField>

Fees are always calculated for **NGN** payouts. You do not pass a currency parameter on this endpoint.

### Request Example

```bash theme={null}
curl -g 'https://api-production.fossapay.com/api/v1/transfers/fiat/calculate-fee?amount=50000' \
  -H "x-api-key: your_api_key_here"
```

```javascript theme={null}
const params = new URLSearchParams({ amount: '50000' });
const response = await fetch(
  `https://api-production.fossapay.com/api/v1/transfers/fiat/calculate-fee?${params}`,
  {
    method: 'GET',
    headers: {
      'x-api-key': 'your_api_key_here',
    },
  }
);

if (!response.ok) {
  throw new Error(`Request failed: ${response.status} ${response.statusText}`);
}

const feeData = await response.json();
```

<Note>
  When using `curl` in a shell, wrap the full URL in quotes (or use `curl -g`) so query string characters are not interpreted by the shell.
</Note>

## Response

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": true,
    "statusCode": 200,
    "message": "Transfer fee calculated successfully",
    "data": {
      "amount": 50000,
      "currency": "NGN",
      "feeAmount": 500,
      "total": 50500
    }
  }
  ```
</ResponseExample>

| Field            | Description                                          |
| ---------------- | ---------------------------------------------------- |
| `data.amount`    | The amount you passed in the query (NGN)             |
| `data.currency`  | Always `NGN` for fiat payout fee quotes              |
| `data.feeAmount` | The fee charged for the payout                       |
| `data.total`     | `amount` + `feeAmount` (total debited including fee) |
