> 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/raschet-verkhnei-komissii.md).

# Расчет верхней комиссии

<mark style="color:yellow;">`POST`</mark>`https://agwsapi.tarlanpayments.kz/showcase-gateway/api/v1/calculate/upper/commission`&#x20;

### Headers

| Name         | Value                                                             |
| ------------ | ----------------------------------------------------------------- |
| Content-Type | `application/json`                                                |
| X-Signature  | [Авторизационный хэш](/platezhnyi-shlyuz/formirovanie-podpisi.md) |

### Request body parameters

<table><thead><tr><th width="188">Name</th><th width="146">Type</th><th>Description</th></tr></thead><tbody><tr><td>agent</td><td>string</td><td>Код витрины в системе Tarlanpayments</td></tr><tr><td>project</td><td>string</td><td>Код Проекта в системе Tarlanpayments</td></tr><tr><td>service_code</td><td>string</td><td>Идентификатор услуги в системе Tarlanpayments</td></tr><tr><td>amount</td><td>float64</td><td>Сумма для которой необходимо расчитать верхнюю комиссию</td></tr></tbody></table>

### Response body parameters

<table><thead><tr><th width="227">Name</th><th width="172">Type</th><th>Descriotion</th></tr></thead><tbody><tr><td>status</td><td>boolean</td><td>Статус обработки запроса</td></tr><tr><td>status_code</td><td>uint</td><td>Код ошибки</td></tr><tr><td>message</td><td>string</td><td>Описание ошибки</td></tr><tr><td>result</td><td>Object</td><td>Объект хранящий результат запроса</td></tr><tr><td>-amount</td><td>float64</td><td>Сумма для которой необходимо было расчитать верхнюю комиссию</td></tr><tr><td>-amount_with_commission</td><td>float64</td><td><p>Итоговая сумма с верхней комиссией</p><p>(amount + commission)</p></td></tr><tr><td>-commission</td><td>float64</td><td>Сумма верхней комиссией</td></tr></tbody></table>

### Response examples

{% tabs %}
{% tab title="200: OK Пример успешного ответа" %}

```json
{
    "status": true,
    "message": "Success",
    "status_code": 0,
    "result": {
        "amount": 10.4,
        "amount_with_commission": 11.84,
        "commission": 1.44
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Пример ответа с ошибкой" %}

```json
{
    "status": false,
    "status_code": 1014,
    "message": "Invalid signature",
    "result": {}
}
```

{% endtab %}
{% endtabs %}

```bash
curl --location 'https://agwsapi.tarlanpayments.kz/showcase-gateway/api/v1/calculate/upper/commission' \
--header 'X-Signature: 7ff51c9f26c287e42fa37537df719974e297a751c4e2eba26d7622sgwgf225543sa' \
--header 'Content-Type: application/json' \
--data '{
    "agent":"agent",
    "project":"project",
    "service_code":"service",
    "amount": 10.42
}'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tarlanpayments.kz/raschet-verkhnei-komissii.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
