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

# Payout Fees

With Modem Pay, you can check how much a transfer will cost before proceeding. This allows you to estimate the total amount, including any fees that will be applied based on the payment network and transfer amount.

### Check Payout Fees

To check the fee for a transfer, use the `/v1/transfers/fees` endpoint. You can specify the transfer amount, currency, and network to get an estimate of the transfer fee.

#### Request Parameters

| Field      | Type     | Description                                           |
| ---------- | -------- | ----------------------------------------------------- |
| `amount`   | `number` | The amount to be transferred.                         |
| `currency` | `string` | The currency code (e.g., "GMD", "USD").               |
| `network`  | `string` | The payment network used (e.g., "afrimoney", "wave"). |

#### Response

The response will include the transfer fee, the currency of the fee, and the amount that will be sent.

| Field      | Type     | Description                                                            |
| ---------- | -------- | ---------------------------------------------------------------------- |
| `fee`      | `number` | The fee for the transfer.                                              |
| `currency` | `string` | The currency code of the fee (e.g., "GMD", "USD").                     |
| `network`  | `string` | The payment network used for the transfer (e.g., "afrimoney", "wave"). |
| `amount`   | `number` | The total amount to be transferred.                                    |

### Example

<CodeGroup>
  ```typescript nodejs theme={null}
  import ModemPay from "modem-pay";

  const modemPay = new ModemPay("sk_test_...");

  const feeResponse = await modemPay.transfers.fee({
    amount: 1000,
    currency: "GMD",
    network: "afrimoney"
  });

  console.log(`Payout fee: ${feeResponse.fee} ${feeResponse.currency}`);
  console.log(`Total amount: ${feeResponse.amount} ${feeResponse.currency}`);
  ```

  ```python python theme={null}
  from modempay import ModemPay

  modem_pay = ModemPay(api_key="sk_test_...")

  fee_response = modem_pay.transfers.fee(
      {"amount": 1000, "currency": "GMD", "network": "afrimoney"}
  )

  print(f"Payout fee: {fee_response['fee']} {fee_response['currency']}")
  print(f"Total amount: {fee_response['amount']} {fee_response['currency']}")
  ```

  ```php php theme={null}
  use ModemPay\ModemPay;

  $modemPay = new ModemPay('sk_test_...');

  $fee_response = $modemPay->transfers()->fee([
      'amount' => 1000,
      'currency' => 'GMD',
      'network' => 'afrimoney',
  ]);

  print_r($fee_response);
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.modempay.com/v1/transfers/fees \
    -H "Authorization: Bearer sk_test_..." \
    -H "Content-Type: application/json" \
    -d '{
      "amount": 1000,
      "currency": "GMD",
      "network": "afrimoney"
    }'
  ```
</CodeGroup>

### Example Response

The following is a sample response returned from the API after querying the transfer fee:

```json theme={null}
{
  "fee": 5,
  "currency": "GMD",
  "network": "afrimoney",
  "amount": 1000
}
```

In this example, the transfer fee is **5 GMD**, and the total amount to be debited (including fees) is **1,005 GMD**.
