> 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/platezhnyi-shlyuz/vzaimodeistvie-s-formoi-oplaty/iniciaciya-vyvoda-denezhnykh-sredstv.md).

# Инициация вывода денежных средств

## Вывод средств без сохранённой карты

## Создание транзакции на вывод

<mark style="color:green;">`POST`</mark> `https://prapi.tarlanpayments.kz/transaction/api/v1/transaction/primal/pay-out`

#### Headers

| Name                                            | Type   | Description                                                                                         |
| ----------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer  Авторизационный хэш (см [Формирование подписи](/platezhnyi-shlyuz/formirovanie-podpisi.md)) |

#### Request Body

| Name                                                     | Type    | Description                                                                                                                                                               |
| -------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| amount<mark style="color:red;">\*</mark>                 | Float   | Сумма платежа                                                                                                                                                             |
| project\_client\_id                                      | String  | Идентификатор клиента на стороне проекта                                                                                                                                  |
| callback\_url                                            | String  | URL проекта для оправки коллбэка со статусом транзакции (см Отправка callback)                                                                                            |
| failure\_redirect\_url                                   | String  | Страница проекта на которую будет выполнен редирект пользователя после неуспешной оплаты. Если параметр не был передан, редирект будет выполнен на `success_redirect_url` |
| merchant\_id<mark style="color:red;">\*</mark>           | Integer | Идентификатор мерчанта присваиваемый платежной системой                                                                                                                   |
| project\_id<mark style="color:red;">\*</mark>            | Integer | <p>Идентификатор проекта присваиваемый платежной системой</p><p></p>                                                                                                      |
| project\_reference\_id<mark style="color:red;">\*</mark> | String  | Номер заказа на стороне проекта                                                                                                                                           |
| success\_redirect\_url<mark style="color:red;">\*</mark> | String  | Страница проекта на которую будет выполнен редирект пользователя после успешной оплаты                                                                                    |
| shipment                                                 | String  | Адрес доставки                                                                                                                                                            |
| confirm\_url                                             | String  | URL Проекта для подтверждения проведения оплаты (см. [Подтверждение проведения оплаты](/platezhnyi-shlyuz/webhook-platezhnoi-sistemy/gotovnost-provedeniya-oplaty.md))    |
| description<mark style="color:red;">\*</mark>            | String  | Описание платежа (50 символов)                                                                                                                                            |
| additional\_data                                         | Object  | [Дополнительные параметры](/platezhnyi-shlyuz/dopolnitelnye-parametry.md)                                                                                                 |
| c\_info                                                  | String  | Информация о кредите                                                                                                                                                      |

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

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "status": true,
    "message": "Success",
    "result": "https://process.tarlanpayments.kz?hash=$2a$10$nhrUYWm9sDVYqCL4LKxn9ugrdC4Pszz5wGaUsDYYIqCGc8ZA4Vu0y&#x26;transaction_id=100474"
}

</code></pre>

{% endtab %}

{% tab title="500: Internal Server Error Примет ответа с ошибкой" %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "status": false,
    "status_code": 5000,
    "message": "transaction already exists",
    "result": {}
}
</code></pre>

{% endtab %}
{% endtabs %}

Пример запроса CURL:

{% code fullWidth="true" %}

```bash
curl --location 'https://prapi.tarlanpayments.kz/transaction/api/v1/transaction/primal/pay-out' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sign' \
--data-raw '{
    "amount": 10,
    "callback_url": "https://test.site/callback_url",
    "confirm_url": "",
    "description": "999",
    "failure_redirect_url": "https://www.test.com",
    "merchant_id": 9999,
    "project_client_id": "999",
    "project_id": 9999,
    "project_reference_id": "999",
    "shipment": "",
    "success_redirect_url": "https://www.test.com",
    "additional_data": {
        "test1": "value1",
        "test2": 2
    }
}'
```

{% endcode %}

## Вывод средств сохранённой карте

При передаче параметра `project_client_id` у пользователя на форме оплаты появится возможность сохранения карты. Для сохранения карты, пользователю, на форме оплаты необходимо кликнуть "сохранить карту" и провести успешный вывод средств по этой карте.

Для последующих платежей по сохранённой карте необходимо передавать параметр `project_client_id`.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.tarlanpayments.kz/platezhnyi-shlyuz/vzaimodeistvie-s-formoi-oplaty/iniciaciya-vyvoda-denezhnykh-sredstv.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
