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

# Get order fee

> Calculate what a customer will be charged for a given amount and payment method

Returns the fee breakdown for an amount, currency and payment method. Fees are charged **on top
of** the order amount, so call this before the customer commits if you want to show them the
real total.

You do not need an existing order to call this.

## Endpoint

```
POST https://api-v4.reeple.ai/charge/order/fee
```

Authenticate with your **public key**. See [Authentication](/api-reference/authentication).

## Request body

| Field  | Type   | Description                                                             |
| ------ | ------ | ----------------------------------------------------------------------- |
| `data` | String | **Required.** The RSA-[encrypted](/encryption) payload described below. |

## Payload (before encryption)

| Field           | Type   | Description                                                                                   |
| --------------- | ------ | --------------------------------------------------------------------------------------------- |
| `amount`        | Number | **Required.** In the currency's standard unit — see [Amount units](/currencies#amount-units). |
| `currency`      | String | **Required.** See [Supported currencies](/currencies).                                        |
| `paymentoption` | String | **Required.** The method code — `C`, `BANK-TRANSFER` or `USSD`.                               |

```json theme={null}
{
  "amount": 100,
  "paymentoption": "C",
  "currency": "NGN"
}
```

## Request example

```bash theme={null}
curl -X POST https://api-v4.reeple.ai/charge/order/fee \
  -H "Content-Type: application/json" \
  -H "api-key: YOUR_PUBLIC_KEY" \
  -d '{ "data": "YOUR_ENCRYPTED_PAYLOAD" }'
```

## Response

```json theme={null}
{
  "data": {
    "fee": 1.40,
    "amount": 100.0,
    "subsidiaryFee": 0.00,
    "customerFee": 1.40,
    "totalChargedAmount": 101.40,
    "paymentOption": "C"
  },
  "status": "success",
  "statusCode": "00",
  "message": "Operation successful"
}
```

### Response fields

| Field                | Description                                                               |
| -------------------- | ------------------------------------------------------------------------- |
| `amount`             | The amount you asked about, unchanged.                                    |
| `fee`                | The total fee.                                                            |
| `subsidiaryFee`      | The portion of the fee charged to **you**.                                |
| `customerFee`        | The portion of the fee charged to the **customer**.                       |
| `totalChargedAmount` | What the customer's card or account is debited: `amount` + `customerFee`. |
| `paymentOption`      | Echoes the method you asked about.                                        |

<Tip>
  Fees differ by method. Quote the fee for the option the customer has actually selected —
  re-call this endpoint when they switch between card and bank transfer.
</Tip>

<Note>
  `subsidiaryFee` + `customerFee` = `fee`. When `subsidiaryFee` is `0`, the customer bears the
  whole fee; when `customerFee` is `0`, you absorb it and `totalChargedAmount` equals `amount`.
</Note>
