> For the complete documentation index, see [llms.txt](https://docs.tarlanpayments.kz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tarlanpayments.kz/eng/acquiring/supplementary-methods/upper-fee-calculation.md).

# Upper fee calculation

<mark style="color:blue;">`GET`</mark> `https://prapi.tarlanpayments.kz/commission/api/v1/system/project/upper/commission`

#### Query Parameters

| Name                                                   | Type    | Description                                                  |
| ------------------------------------------------------ | ------- | ------------------------------------------------------------ |
| project\_id<mark style="color:red;">\*</mark>          | Integer | Project ID assigned by the payment system                    |
| merchant\_id<mark style="color:red;">\*</mark>         | Integer | Merchant ID assigned by the payment system                   |
| aggregated\_type\_id<mark style="color:red;">\*</mark> | Integer | <p>Type of transaction<br>(1 - pay in</p><p>2 - pay out)</p> |
| transaction\_amount<mark style="color:red;">\*</mark>  | Float   | Transaction amount                                           |

#### Headers

| Name                                            | Type   | Description                                        |
| ----------------------------------------------- | ------ | -------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Auto-rotation hash (see Signature Creating) |

{% tabs %}
{% tab title="200: OK Example of a successful response" %}

```json
{
    "status": true,
    "message": "Success",
    "result": {
        "total_commission_amount": 999.00
    }
}
```

{% endtab %}

{% tab title="500: Internal Server Error Example of an error response" %}

```json
{
    "status": false,
    "status_code": 5102,
    "message": "commission not found",
    "result": {}
}
```

{% endtab %}
{% endtabs %}

{% code fullWidth="true" %}

```bash
curl --location 'https://prapi.tarlanpayments.kz/comission/api/v1/system/project/upper/commission?merchant_id=999&project_id=999&transaction_amount=1000.00&transaction_type_code=in' \
--header 'Authorization: Bearer sign' \
--data ''
```

{% endcode %}
