> For the complete documentation index, see [llms.txt](https://alfabit.gitbook.io/alfabit-pay/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alfabit.gitbook.io/alfabit-pay/api-reference.md).

# API Reference

## GET /api/v2/integration/orders

> Получение списка ордеров мерчанта с типизированным поиском

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v2/integration/orders":{"get":{"operationId":"ApiOrderController_getOrders2","summary":"Получение списка ордеров мерчанта с типизированным поиском","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Страница","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Кол-во элементов на странице","schema":{"type":"number"}},{"name":"orderBy","required":false,"in":"query","description":"Сортировка по полю","schema":{"type":"string"}},{"name":"statuses","required":false,"in":"query","description":"Статус заявки","schema":{"type":"array","items":{"type":"string","enum":["success","failed","inProgress","invoiceWaitCreate","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked","blocked"]}}},{"name":"types","required":false,"in":"query","description":"Тип заявки","schema":{"type":"array","items":{"type":"string","enum":["invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","currency-to-currency","deposit","account-transfer","account-deposit"]}}},{"name":"merchantsUids","required":false,"in":"query","description":"Uid мерчантов","schema":{"type":"array","items":{"type":"string"}}},{"name":"billingTags","required":false,"in":"query","description":"Биллинг тэг","schema":{"type":"array","items":{"type":"string"}}},{"name":"assets","required":false,"in":"query","description":"Активы","schema":{"type":"array","items":{"type":"string"}}},{"name":"networks","required":false,"in":"query","description":"Сети","schema":{"type":"array","items":{"type":"string"}}},{"name":"createdAtSince","required":false,"in":"query","description":"Дата создания (начало периода) строка должна соответствовать формату ISO8601 и быть в экранированном URL-encoded format. <br> Допустимо 2025-01-14T21:00:00.000%2b03:00 знак \"+\" -> \"%2B\" или 2025-01-14T21:00:00.000Z. <br> Правильно 2025-01-14T21%3A00%3A00.000%2B03%3A00","schema":{"format":"date-time","type":"string"}},{"name":"createdAtBefore","required":false,"in":"query","description":"Дата создания (конец периода) строка должна соответствовать формату ISO8601 и быть в экранированном URL-encoded format. <br> Допустимо 2025-01-14T21:00:00.000%2b03:00 знак \"+\" -> \"%2B\" или 2025-01-14T21:00:00.000Z. <br> Правильно 2025-01-14T21%3A00%3A00.000%2B03%3A00","schema":{"format":"date-time","type":"string"}},{"name":"showProtectedMerchantsOrders","required":false,"in":"query","description":"Показать ордера защищаемых (внутренних) мерчантов","schema":{"type":"boolean"}},{"name":"searchType","required":false,"in":"query","description":"Тип реквизитов для поиска","schema":{"enum":["byComments","byMerchantDetails","byOrderDetails","byHopsDetails"],"type":"string"}},{"name":"searchText","required":false,"in":"query","description":"Текст для поиска в реквизитах указанного типа","schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение списка ордеров мерчанта","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderSerializerNoRelationsAsync"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializerNoRelationsAsync":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

<details>

<summary>Примечание</summary>

Для получения данных по всем ордерам рекомендуется использовать версию /api/**v2**/integration/orders\
\
Параметры <mark style="color:blue;">`statuses`</mark>, <mark style="color:blue;">`types`</mark>, <mark style="color:blue;">`merchantsUids`</mark>, <mark style="color:blue;">`billingTags`</mark> и <mark style="color:blue;">`assets`</mark> метода <mark style="color:blue;">`/client/v1/api/orders`</mark> фактически являются массивами строк. \
\
Пример использования:

<mark style="color:blue;">`curl -X 'GET'`</mark>\ <mark style="color:blue;">`'https://gateway.tst.alfacore.net/client/v1/api/orders?statuses=failed&types=invoice&types=invoice-without-amount&assets=BTC&assets=BNB'`</mark>

Примеры и схему ответов можно посмотреть в соответствующем подразделе метода.\
\
Описания статусов заявок:

* **created** - Заявка успешно создана.
* **success** - Заявка успешно выполнена.
* **failed** - Выполнение заявки завершилось неудачей.
* **inProgress** - Заявка находится в процессе выполнения.
* **invoiceWaitCreate** - Ожидание создания счета.
* **invoiceNotCreated** - Счет не был создан.
* **invoiceWaitRequisites** - Ожидание предоставления реквизитов для создания счета.
* **invoiceWaitPay** - Ожидание оплаты по счету.
* **invoiceWaitCheck** - Ожидание проверки оплаты.
* **invoiceWaitConfirms -** Транзакция в сети, ожидаем подтверждения.
* **invoiceNotPayed** - Оплата по счету не произведена.
* **invoiceCheckBlocked** - Проверка оплаты заблокирована.
* **transferBlocked** - Перевод заблокирован.
* **exchangeBlocked** - Обмен заблокирован.
* **withdrawBlocked** - Вывод средств заблокирован.

Жизненный цикл статусов заявок:

* Не было выбрано чем платить

`created -> invoiceWaitCreate -> invoiceNotCreated`

* Выбрано чем платить, но не оплачено

`created -> invoiceWaitCreate -> invoiceWaitRequisites -> invoiceWaitPay -> invoiceNotPayed`

* Был оплачен, но блок AML

`created -> invoiceWaitCreate-> invoiceWaitRequisites -> invoiceWaitPay -> invoiceWaitCheck -> invoiceCheckBlocked`&#x20;

* Был оплачен, транзакция появилась в сети и ждёт подтверждений (для активов, которые не проверяются на AML)

`created -> invoiceWaitCreate-> invoiceWaitRequisites -> invoiceWaitPay -> invoiceWaitConfirms`

* Успешно завершен (inProgress = принято и позитивный AML, началось хеджирование и т.д., можно отгружать товар)

`created -> invoiceWaitCreate -> invoiceWaitRequisites-> invoiceWaitPay -> invoiceWaitCheck -> inProgress -> success`

</details>

## GET /api/v1/integration/orders/{orderUid}

> Получение информации по ордеру

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/{orderUid}":{"get":{"operationId":"ApiOrderController_getOrder","summary":"Получение информации по ордеру","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"orderUid","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение информации по ордеру","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/OrderSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"},"paymentTiming":{"type":"string","description":"Оплата во время или после просрочки","enum":["onTime","afterDue"]},"amountValidity":{"type":"string","description":"Валидность суммы платежа","enum":["less","valid","greater"]},"signature":{"type":"string","description":"Подпись запроса в хуке (для проверки подлинности)"},"warningCode":{"type":"string","description":"Код предупреждения"},"giftCode":{"type":"string","description":"Код активации услуги"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists","paymentTiming","amountValidity","signature","warningCode","giftCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## Создание инвойса

> &#x20;     Создание инвойса с указанием суммы оплаты.\
> &#x20;     Инвойс формируется в валюте invoiceAssetCode. \
> &#x20;     Платеж производится в валюте, указанной в параметре currencyInCode. \
> &#x20;     Если не заполнено - покупателю будет предложен список доступных для оплаты валют.   &#x20;

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/invoice":{"post":{"operationId":"ApiOrderController_createInvoice","summary":"Создание инвойса","description":"      Создание инвойса с указанием суммы оплаты.\n      Инвойс формируется в валюте invoiceAssetCode. \n      Платеж производится в валюте, указанной в параметре currencyInCode. \n      Если не заполнено - покупателю будет предложен список доступных для оплаты валют.    ","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDto"}}}},"responses":{"200":{"description":"Успешное создание инвойса","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/OrderSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"InvoiceDto":{"type":"object","properties":{"currencyInCode":{"type":"string","description":"Валюта, выбранная для оплаты покупателем"},"invoiceAssetCode":{"type":"string","description":"Ассет, в котором выстален счет покупателю"},"comment":{"type":"string","description":"Комментарий к ордеру. Опциональное поле","minLength":5},"publicComment":{"type":"string","description":"Публичный комментарий к ордеру. Опциональное поле","minLength":5},"callbackUrl":{"type":"string","description":"Callback url для отправки хуков","minLength":5},"redirectUrl":{"type":"string","description":"Url для перенаправления покупателя после оплаты","minLength":5},"isBayerPaysService":{"type":"boolean","description":"Включить комиссию сервиса в счет покупателю (если не указано, то берется из настроек мерчанта)"},"isAwaitRequisites":{"type":"boolean","description":"Ожидать реквизиты для оплаты в респонсе (по дефолту false)"},"expiryDurationMinutes":{"type":"number","description":"Время жизни инвойса, в минутах (по дефолту 20)"},"invoiceTpl":{"description":"Шаблон макета формы оплаты","nullable":true,"allOf":[{"$ref":"#/components/schemas/InvoiceTemplateDto"}]},"idempotencyKey":{"type":"string","description":"Ключ идемпотентности для предотвращения дублирования заявок при сетевых разрывах и состоянии гонки. Должен быть уникальным для каждого мерчанта.","maxLength":255},"invoiceAmount":{"type":"string","description":"Сумма для оплаты в $invoiceAssetCode"}},"required":["invoiceAssetCode","invoiceAmount"]},"InvoiceTemplateDto":{"type":"object","properties":{"locales":{"type":"array","description":"Массив поддерживаемых языков формы оплаты","items":{"type":"string","enum":["en","ru","es"]}},"returnUrl":{"type":"string","description":"Url для перенаправления покупателя по кнопке \"Вернуться на сайт\""}}},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"},"paymentTiming":{"type":"string","description":"Оплата во время или после просрочки","enum":["onTime","afterDue"]},"amountValidity":{"type":"string","description":"Валидность суммы платежа","enum":["less","valid","greater"]},"signature":{"type":"string","description":"Подпись запроса в хуке (для проверки подлинности)"},"warningCode":{"type":"string","description":"Код предупреждения"},"giftCode":{"type":"string","description":"Код активации услуги"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists","paymentTiming","amountValidity","signature","warningCode","giftCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

<details>

<summary>Примечание</summary>

1. Инвойс (счет на оплату) должен быть сформирован в валюте, указанной в параметре `invoiceAssetCode`. Однако платеж может быть произведен в другой валюте, указанной в параметре `currencyInCode`. Если параметр `currencyInCode` не заполнен, покупателю будет предложен список доступных для оплаты валют.
2. При обращении к методу существует 2 формата получения реквизитов\
   \
   -Получение реквизитов в ответе\
   -Получение реквизитов в вебхуке\
   \
   Для переключения между режимами необходимо использовать параметр isAwaitRequisites (boolean)

```
// Some code

{
  "currencyInCode": "BTC",
  "comment": "Заказ №234",
  "publicComment": "Заказ №234",
  "callbackUrl": "https://api.myip.com",
  "redirectUrl": "https://marketplace.com/cart",
  "isBayerPaysService": true,
  "isAwaitRequisites": true,
  "invoiceAssetCode": "USD",
  "invoiceAmount": 5000
}
 
 
```

</details>

## Создание вывода

> Вывод средств на внешний адрес.

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/withdraw":{"post":{"operationId":"ApiOrderController_createWithdraw","summary":"Создание вывода","description":"Вывод средств на внешний адрес.","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoWithdraw"}}}},"responses":{"200":{"description":"Успешное создание вывода","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/OrderSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"CryptoWithdraw":{"type":"object","properties":{"amount":{"type":"string","description":"Сумма выхода"},"toCurrencyCode":{"type":"string","description":"Валюта получения (с сетью)"},"recipient":{"type":"string","description":"Реципиент (адрес)"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"callbackUrl":{"type":"string","description":"Callback url для отправки хуков","minLength":5},"comment":{"type":"string","description":"Комментарий к переводу. Опциональное поле"},"idempotencyKey":{"type":"string","description":"Ключ идемпотентности для предотвращения дублирования заявок при сетевых разрывах и состоянии гонки. Должен быть уникальным для каждого мерчанта.","maxLength":255}},"required":["amount","toCurrencyCode","recipient"]},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"},"paymentTiming":{"type":"string","description":"Оплата во время или после просрочки","enum":["onTime","afterDue"]},"amountValidity":{"type":"string","description":"Валидность суммы платежа","enum":["less","valid","greater"]},"signature":{"type":"string","description":"Подпись запроса в хуке (для проверки подлинности)"},"warningCode":{"type":"string","description":"Код предупреждения"},"giftCode":{"type":"string","description":"Код активации услуги"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists","paymentTiming","amountValidity","signature","warningCode","giftCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## Создание фиатного вывода

> &#x20;   Эндпоинт позволяет создать заявку на вывод фиатных средств для мерчанта.\
> &#x20;   Основные параметры вывода:\
> &#x20;   currency - валюта\
> &#x20;   amount - сумма\
> &#x20;   paymentMethod - метод вывода,\
> &#x20;   providerOutAliasCode - код банка вывода\
> &#x20;   code - код способа вывода\
> &#x20;   Для получения данных по доступным способам, банкам, лимитам, кодам вывода и тд. обратитесь к API методу fiat-withdraw-config.\
> &#x20;  &#x20;

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/fiat-withdraw":{"post":{"operationId":"ApiOrderController_createFiatWithdraw","summary":"Создание фиатного вывода","description":"    Эндпоинт позволяет создать заявку на вывод фиатных средств для мерчанта.\n    Основные параметры вывода:\n    currency - валюта\n    amount - сумма\n    paymentMethod - метод вывода,\n    providerOutAliasCode - код банка вывода\n    code - код способа вывода\n    Для получения данных по доступным способам, банкам, лимитам, кодам вывода и тд. обратитесь к API методу fiat-withdraw-config.\n    ","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiatWithdrawDto"}}}},"responses":{"200":{"description":"Успешное создание фиатного вывода","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/OrderSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"FiatWithdrawDto":{"type":"object","properties":{"currency":{"type":"string","description":"Валюта","enum":["RUB","USD","EUR","KZT","KGS","AZN","BYN","UZS","AMD","TRY","TJS"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerOutAliasCode":{"type":"string","description":"Код банка вывода"},"code":{"type":"string","description":"Способ вывода"},"amount":{"type":"string","description":"Сумма выхода"},"comment":{"type":"string","description":"Комментарий к переводу. Опциональное поле"},"recipient":{"type":"string","description":"Реквизиты реципиента"},"callbackUrl":{"type":"string","description":"Callback url для отправки хуков","minLength":5},"details":{"type":"object","description":"Доп поля для вывода"},"idempotencyKey":{"type":"string","description":"Ключ идемпотентности для предотвращения дублирования заявок при сетевых разрывах и состоянии гонки. Должен быть уникальным для каждого мерчанта.","maxLength":255}},"required":["currency","paymentMethod","providerOutAliasCode","code","amount","recipient"]},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"},"paymentTiming":{"type":"string","description":"Оплата во время или после просрочки","enum":["onTime","afterDue"]},"amountValidity":{"type":"string","description":"Валидность суммы платежа","enum":["less","valid","greater"]},"signature":{"type":"string","description":"Подпись запроса в хуке (для проверки подлинности)"},"warningCode":{"type":"string","description":"Код предупреждения"},"giftCode":{"type":"string","description":"Код активации услуги"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists","paymentTiming","amountValidity","signature","warningCode","giftCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## Создание фиатного инвойса

> &#x20;   Эндпоинт позволяет создать заявку на оплату фиатного инвойса.\
> &#x20;   Основные параметры инвойса:\
> &#x20;   invoiceAssetCode - валюта\
> &#x20;   invoiceAmount - сумма\
> &#x20;   providerInAliasCode - код банка приема платежа\
> &#x20;   paymentProviderAliasCode - код банка с которого будет происходить оплата\
> &#x20;   code - код способа оплаты\
> &#x20;   Для получения данных по доступным способам, банкам, лимитам, кодам оплаты и тд. обратитесь к API методу fiat-deposit-config.\
> &#x20;  &#x20;

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/fiat-invoice":{"post":{"operationId":"ApiOrderController_createFiatInvoice","summary":"Создание фиатного инвойса","description":"    Эндпоинт позволяет создать заявку на оплату фиатного инвойса.\n    Основные параметры инвойса:\n    invoiceAssetCode - валюта\n    invoiceAmount - сумма\n    providerInAliasCode - код банка приема платежа\n    paymentProviderAliasCode - код банка с которого будет происходить оплата\n    code - код способа оплаты\n    Для получения данных по доступным способам, банкам, лимитам, кодам оплаты и тд. обратитесь к API методу fiat-deposit-config.\n    ","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiatInvoiceDto"}}}},"responses":{"200":{"description":"Успешное создание фиатного инвойса","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/OrderSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"FiatInvoiceDto":{"type":"object","properties":{"comment":{"type":"string","description":"Комментарий к ордеру. Опциональное поле","minLength":5},"publicComment":{"type":"string","description":"Публичный комментарий к ордеру. Опциональное поле","minLength":5},"callbackUrl":{"type":"string","description":"Callback url для отправки хуков","minLength":5},"redirectUrl":{"type":"string","description":"Url для перенаправления покупателя после оплаты","minLength":5},"isBayerPaysService":{"type":"boolean","description":"Включить комиссию сервиса в счет покупателю (если не указано, то берется из настроек мерчанта)"},"isAwaitRequisites":{"type":"boolean","description":"Ожидать реквизиты для оплаты в респонсе (по дефолту false)"},"idempotencyKey":{"type":"string","description":"Ключ идемпотентности для предотвращения дублирования заявок при сетевых разрывах и состоянии гонки. Должен быть уникальным для каждого мерчанта.","maxLength":255},"invoiceAssetCode":{"type":"string","description":"Ассет, в котором выстален счет покупателю"},"expiryDurationMinutes":{"type":"number","description":"Время жизни инвойса, в минутах (по дефолту 15)"},"code":{"type":"string","description":"Способ вывода"},"providerInAliasCode":{"type":"string","description":"Банк приема платежа"},"paymentProviderAliasCode":{"type":"string","description":"Банк с которого будет происходить оплата"},"invoiceAmount":{"type":"string","description":"Сумма для оплаты в $invoiceAssetCode"}},"required":["invoiceAssetCode","providerInAliasCode","invoiceAmount"]},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"},"paymentTiming":{"type":"string","description":"Оплата во время или после просрочки","enum":["onTime","afterDue"]},"amountValidity":{"type":"string","description":"Валидность суммы платежа","enum":["less","valid","greater"]},"signature":{"type":"string","description":"Подпись запроса в хуке (для проверки подлинности)"},"warningCode":{"type":"string","description":"Код предупреждения"},"giftCode":{"type":"string","description":"Код активации услуги"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists","paymentTiming","amountValidity","signature","warningCode","giftCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## Создание обмена

> &#x20;   Конвертация на сумму amountIn в валюте assetCodeIn в валюту assetCodeOut.\
> &#x20;   Система поддерживает два режима приоритета:\
> &#x20;     exchangePriority: "in" - фиксируется сумма входа (amountIn)\
> &#x20;     exchangePriority: "out" - фиксируется сумма выхода (amountOut)\
> &#x20;  &#x20;

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/exchange":{"post":{"operationId":"ApiOrderController_createExchange","summary":"Создание обмена","description":"    Конвертация на сумму amountIn в валюте assetCodeIn в валюту assetCodeOut.\n    Система поддерживает два режима приоритета:\n      exchangePriority: \"in\" - фиксируется сумма входа (amountIn)\n      exchangePriority: \"out\" - фиксируется сумма выхода (amountOut)\n    ","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeDto"}}}},"responses":{"200":{"description":"Успешное создание обмена","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/OrderSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"ExchangeDto":{"type":"object","properties":{"assetCodeIn":{"type":"string","description":"Ассет на входе в обмен"},"amountIn":{"type":"number","description":"Обмениваемая сумма (обязательно если exchangePriority=in)"},"assetCodeOut":{"type":"string","description":"Ассет на выходе"},"amountOut":{"type":"number","description":"Ожидаемая сумма (обязательно если exchangePriority=out)"},"comment":{"type":"string","description":"Комментарий к обмену. Опциональное поле"},"exchangePriority":{"type":"string","description":"Приоритет обмена (по дефолту \"in\")"},"idempotencyKey":{"type":"string","description":"Ключ идемпотентности для предотвращения дублирования заявок при сетевых разрывах и состоянии гонки. Должен быть уникальным для каждого мерчанта.","maxLength":255}},"required":["assetCodeIn","assetCodeOut"]},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"},"paymentTiming":{"type":"string","description":"Оплата во время или после просрочки","enum":["onTime","afterDue"]},"amountValidity":{"type":"string","description":"Валидность суммы платежа","enum":["less","valid","greater"]},"signature":{"type":"string","description":"Подпись запроса в хуке (для проверки подлинности)"},"warningCode":{"type":"string","description":"Код предупреждения"},"giftCode":{"type":"string","description":"Код активации услуги"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists","paymentTiming","amountValidity","signature","warningCode","giftCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## Создание перевода между аккаунтами

> Перевод средств на другой аккаунт внутри системы.

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/account-transfer":{"post":{"operationId":"ApiOrderController_createAccountTransfer","summary":"Создание перевода между аккаунтами","description":"Перевод средств на другой аккаунт внутри системы.","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTransferDto"}}}},"responses":{"200":{"description":"Успешное создание перевода","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/OrderSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AccountTransferDto":{"type":"object","properties":{"amount":{"type":"number","description":"Сумма для перевода"},"assetCode":{"type":"string","description":"Отправляемый ассет"},"recipientId":{"type":"number","description":"Реципиент (ID мерчанта)"},"comment":{"type":"string","description":"Комментарий к переводу. Опциональное поле"},"callbackUrl":{"type":"string","description":"Callback url для отправки хуков","minLength":5},"idempotencyKey":{"type":"string","description":"Ключ идемпотентности для предотвращения дублирования заявок при сетевых разрывах и состоянии гонки. Должен быть уникальным для каждого мерчанта.","maxLength":255}},"required":["amount","assetCode","recipientId"]},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"},"paymentTiming":{"type":"string","description":"Оплата во время или после просрочки","enum":["onTime","afterDue"]},"amountValidity":{"type":"string","description":"Валидность суммы платежа","enum":["less","valid","greater"]},"signature":{"type":"string","description":"Подпись запроса в хуке (для проверки подлинности)"},"warningCode":{"type":"string","description":"Код предупреждения"},"giftCode":{"type":"string","description":"Код активации услуги"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists","paymentTiming","amountValidity","signature","warningCode","giftCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## Оценка входа

> &#x20;     Метод предназначен для оценки суммы, которую необходимо заплатить в валюте fromCurrencyCode \
> &#x20;     для получения суммы amountTo в валюте toCurrencyCode (с учетом курса обмена и комиссии).\
> &#x20;  &#x20;

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/estimate-in":{"post":{"operationId":"ApiOrderController_estimateIn","summary":"Оценка входа","description":"      Метод предназначен для оценки суммы, которую необходимо заплатить в валюте fromCurrencyCode \n      для получения суммы amountTo в валюте toCurrencyCode (с учетом курса обмена и комиссии).\n    ","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateInDto"}}}},"responses":{"200":{"description":"Успешная оценка входа","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/EstimationSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"EstimateInDto":{"type":"object","properties":{"fromCurrencyCode":{"type":"string","description":"Валюта на входе"},"toCurrencyCode":{"type":"string","description":"Валюта на выходе"},"amountTo":{"type":"number","description":"Сумма на выходе"}},"required":["toCurrencyCode","amountTo"]},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"EstimationSerializer":{"type":"object","properties":{"currencyCode":{"type":"string","description":"Код валюты"},"assetCode":{"type":"string","description":"Код ассета"},"amount":{"type":"string","description":"Сумма"}},"required":["currencyCode","assetCode","amount"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## Оценка выхода

> &#x20;     Метод предназначен для оценки суммы, которая будет получена в валюте toCurrencyCode \
> &#x20;     при оплате суммы amountFrom в валюте fromCurrencyCode (с учетом курса обмена и комиссии).\
> &#x20;  &#x20;

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/estimate-out":{"post":{"operationId":"ApiOrderController_estimateOut","summary":"Оценка выхода","description":"      Метод предназначен для оценки суммы, которая будет получена в валюте toCurrencyCode \n      при оплате суммы amountFrom в валюте fromCurrencyCode (с учетом курса обмена и комиссии).\n    ","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateOutDto"}}}},"responses":{"200":{"description":"Успешная оценка выхода","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/EstimationSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"EstimateOutDto":{"type":"object","properties":{"toCurrencyCode":{"type":"string","description":"Выходная валюта"},"fromCurrencyCode":{"type":"string","description":"Отдаваемая валюта"},"amountFrom":{"type":"number","description":"Отдаваемая сумма"}},"required":["toCurrencyCode","fromCurrencyCode","amountFrom"]},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"EstimationSerializer":{"type":"object","properties":{"currencyCode":{"type":"string","description":"Код валюты"},"assetCode":{"type":"string","description":"Код ассета"},"amount":{"type":"string","description":"Сумма"}},"required":["currencyCode","assetCode","amount"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## Создание инвойса без суммы

> &#x20;     Создание инвойса без указания суммы оплаты.\
> &#x20;     Инвойс формируется в валюте invoiceAssetCode. \
> &#x20;     Платеж производится в валюте, указанной в параметре currencyInCode. \
> &#x20;     Если не заполнено - покупателю будет предложен список доступных для оплаты валют.   &#x20;

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/invoice/without-amount":{"post":{"operationId":"ApiOrderController_createFreeAmountInvoice","summary":"Создание инвойса без суммы","description":"      Создание инвойса без указания суммы оплаты.\n      Инвойс формируется в валюте invoiceAssetCode. \n      Платеж производится в валюте, указанной в параметре currencyInCode. \n      Если не заполнено - покупателю будет предложен список доступных для оплаты валют.    ","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithoutAmountInvoiceDto"}}}},"responses":{"200":{"description":"Успешное создание инвойса без суммы","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/OrderSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"WithoutAmountInvoiceDto":{"type":"object","properties":{"currencyInCode":{"type":"string","description":"Валюта, выбранная для оплаты покупателем"},"invoiceAssetCode":{"type":"string","description":"Ассет, в котором выстален счет покупателю"},"comment":{"type":"string","description":"Комментарий к ордеру. Опциональное поле","minLength":5},"publicComment":{"type":"string","description":"Публичный комментарий к ордеру. Опциональное поле","minLength":5},"callbackUrl":{"type":"string","description":"Callback url для отправки хуков","minLength":5},"redirectUrl":{"type":"string","description":"Url для перенаправления покупателя после оплаты","minLength":5},"isBayerPaysService":{"type":"boolean","description":"Включить комиссию сервиса в счет покупателю (если не указано, то берется из настроек мерчанта)"},"isAwaitRequisites":{"type":"boolean","description":"Ожидать реквизиты для оплаты в респонсе (по дефолту false)"},"expiryDurationMinutes":{"type":"number","description":"Время жизни инвойса, в минутах (по дефолту 20)"},"invoiceTpl":{"description":"Шаблон макета формы оплаты","nullable":true,"allOf":[{"$ref":"#/components/schemas/InvoiceTemplateDto"}]},"idempotencyKey":{"type":"string","description":"Ключ идемпотентности для предотвращения дублирования заявок при сетевых разрывах и состоянии гонки. Должен быть уникальным для каждого мерчанта.","maxLength":255}},"required":["invoiceAssetCode"]},"InvoiceTemplateDto":{"type":"object","properties":{"locales":{"type":"array","description":"Массив поддерживаемых языков формы оплаты","items":{"type":"string","enum":["en","ru","es"]}},"returnUrl":{"type":"string","description":"Url для перенаправления покупателя по кнопке \"Вернуться на сайт\""}}},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"},"paymentTiming":{"type":"string","description":"Оплата во время или после просрочки","enum":["onTime","afterDue"]},"amountValidity":{"type":"string","description":"Валидность суммы платежа","enum":["less","valid","greater"]},"signature":{"type":"string","description":"Подпись запроса в хуке (для проверки подлинности)"},"warningCode":{"type":"string","description":"Код предупреждения"},"giftCode":{"type":"string","description":"Код активации услуги"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists","paymentTiming","amountValidity","signature","warningCode","giftCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## Создание заявки на Валюта -> Валюта (мост)

> &#x20;     Заявка на конвертацию и перевод средств между различными сетями.\
> &#x20;     Процесс включает три этапа: Получение -> Обмен -> Вывод.\
> &#x20;     Например, при переводе USDTERC20 в BNBBEP20:\
> &#x20;       1\. Предоставляется адрес для внесения USDTERC20 (fromCurrencyCode) в сети Ethereum\
> &#x20;       2\. Полученные средства конвертируются в BNB\
> &#x20;       3\. BNB выводятся как BNBBEP20 (toCurrencyCode) на указанный адрес (recipient) в сети Binance Smart Chain\
> &#x20;     \
> &#x20;     Важно: Сумма перевода (amount) указывается в toCurrencyCode.\
> &#x20;    \
> &#x20;     Совет: Для оценки суммы fromCurrencyCode можно воспользоваться методом "orders/estimate-in".   &#x20;

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/currency-to-currency":{"post":{"operationId":"ApiOrderController_createCurrencyToCurrencyOrder","summary":"Создание заявки на Валюта -> Валюта (мост)","description":"      Заявка на конвертацию и перевод средств между различными сетями.\n      Процесс включает три этапа: Получение -> Обмен -> Вывод.\n      Например, при переводе USDTERC20 в BNBBEP20:\n        1. Предоставляется адрес для внесения USDTERC20 (fromCurrencyCode) в сети Ethereum\n        2. Полученные средства конвертируются в BNB\n        3. BNB выводятся как BNBBEP20 (toCurrencyCode) на указанный адрес (recipient) в сети Binance Smart Chain\n      \n      Важно: Сумма перевода (amount) указывается в toCurrencyCode.\n     \n      Совет: Для оценки суммы fromCurrencyCode можно воспользоваться методом \"orders/estimate-in\".    ","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrencyToCurrencyDto"}}}},"responses":{"200":{"description":"Успешное создание СТС заявки","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/OrderSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"CurrencyToCurrencyDto":{"type":"object","properties":{"amount":{"type":"string","description":"Сумма выхода"},"toCurrencyCode":{"type":"string","description":"Валюта получения (с сетью)"},"recipient":{"type":"string","description":"Реципиент (адрес)"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"callbackUrl":{"type":"string","description":"Callback url для отправки хуков","minLength":5},"comment":{"type":"string","description":"Комментарий к переводу. Опциональное поле"},"idempotencyKey":{"type":"string","description":"Ключ идемпотентности для предотвращения дублирования заявок при сетевых разрывах и состоянии гонки. Должен быть уникальным для каждого мерчанта.","maxLength":255},"details":{"type":"object","description":"Детали для фиатных выводов"},"fromCurrencyCode":{"type":"string","description":"Входная валюта"}},"required":["amount","toCurrencyCode","recipient","fromCurrencyCode"]},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"},"paymentTiming":{"type":"string","description":"Оплата во время или после просрочки","enum":["onTime","afterDue"]},"amountValidity":{"type":"string","description":"Валидность суммы платежа","enum":["less","valid","greater"]},"signature":{"type":"string","description":"Подпись запроса в хуке (для проверки подлинности)"},"warningCode":{"type":"string","description":"Код предупреждения"},"giftCode":{"type":"string","description":"Код активации услуги"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists","paymentTiming","amountValidity","signature","warningCode","giftCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## Создание заявки Вывод с обменом

> &#x20;     Заявка на вывод с конвертацией.\
> &#x20;     Процесс включает два этапа: Обмен -> Вывод.\
> &#x20;     Например, при выводе USDT в BTC:\
> &#x20;       1\. USDT (fromAssetCode) с баланса мерчанта конвертируются в BTC\
> &#x20;       2\. BTC (toCurrencyCode) выводятся  на указанный адрес (recipient) в сети Bitcoin.\
> &#x20;     \
> &#x20;     Важно:Сумма вывода (amount) указывается в toCurrencyCode.\
> &#x20;    \
> &#x20;     Совет: Для оценки суммы currencyInCode можно воспользоваться методом "orders/estimate-in".   &#x20;

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/withdraw-with-exchange":{"post":{"operationId":"ApiOrderController_createWithdrawWithExchange","summary":"Создание заявки Вывод с обменом","description":"      Заявка на вывод с конвертацией.\n      Процесс включает два этапа: Обмен -> Вывод.\n      Например, при выводе USDT в BTC:\n        1. USDT (fromAssetCode) с баланса мерчанта конвертируются в BTC\n        2. BTC (toCurrencyCode) выводятся  на указанный адрес (recipient) в сети Bitcoin.\n      \n      Важно:Сумма вывода (amount) указывается в toCurrencyCode.\n     \n      Совет: Для оценки суммы currencyInCode можно воспользоваться методом \"orders/estimate-in\".    ","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawWithExchangeDto"}}}},"responses":{"200":{"description":"Успешное создание заявки на вывод с обменом","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/OrderSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"WithdrawWithExchangeDto":{"type":"object","properties":{"amount":{"type":"string","description":"Сумма выхода"},"toCurrencyCode":{"type":"string","description":"Валюта получения (с сетью)"},"recipient":{"type":"string","description":"Реципиент (адрес)"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"callbackUrl":{"type":"string","description":"Callback url для отправки хуков","minLength":5},"comment":{"type":"string","description":"Комментарий к переводу. Опциональное поле"},"idempotencyKey":{"type":"string","description":"Ключ идемпотентности для предотвращения дублирования заявок при сетевых разрывах и состоянии гонки. Должен быть уникальным для каждого мерчанта.","maxLength":255},"fromAssetCode":{"type":"string","description":"Ассет из которого конвертируется"}},"required":["amount","toCurrencyCode","recipient","fromAssetCode"]},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"},"paymentTiming":{"type":"string","description":"Оплата во время или после просрочки","enum":["onTime","afterDue"]},"amountValidity":{"type":"string","description":"Валидность суммы платежа","enum":["less","valid","greater"]},"signature":{"type":"string","description":"Подпись запроса в хуке (для проверки подлинности)"},"warningCode":{"type":"string","description":"Код предупреждения"},"giftCode":{"type":"string","description":"Код активации услуги"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists","paymentTiming","amountValidity","signature","warningCode","giftCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/orders/filters/assets

> Получить значения для фильтра ассетов

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/filters/assets":{"get":{"operationId":"ApiOrderController_getAssetsFilterValues","summary":"Получить значения для фильтра ассетов","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Возвращает массив строк, которые возможно использовать как фильтр для query-параметра \"assets\" в эндпоинте получения списка ордеров","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"type":"string"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/orders/filters/networks

> Получить значения для фильтра сетей

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/orders/filters/networks":{"get":{"operationId":"ApiOrderController_getNetworksFilterValues","summary":"Получить значения для фильтра сетей","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Возвращает массив строк, которые возможно использовать как фильтр для query-параметра \"networks\" в эндпоинте получения списка ордеров","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"type":"string"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/assets/exchange-rate

> Получение доступных пар обмена мерчанта

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/assets/exchange-rate":{"get":{"operationId":"ApiAssetsController_exchangeRates","summary":"Получение доступных пар обмена мерчанта","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"Код получаемого токена","schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"Код отдаваемого токена","schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение пар обмена мерчанта","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PairSerializer"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"PairSerializer":{"type":"object","properties":{"pairCode":{"description":"Код пары","allOf":[{"$ref":"#/components/schemas/Function"}]},"fromAssetCode":{"type":"string","description":"Код отдаваемого токена"},"toAssetCode":{"type":"string","description":"Код получаемого токена"},"fromCurrencyType":{"type":"string","description":"Тип отдаваемого токена"},"toCurrencyType":{"type":"string","description":"Тип получаемого токена"},"minIn":{"type":"string","description":"Минимальная сумма на вход"},"minOut":{"type":"string","description":"Минимальная сумма на выход"},"rate":{"type":"string","description":"Курс обмена"},"isTurnRate":{"type":"boolean","description":"Обратный курс?"}},"required":["pairCode","fromAssetCode","toAssetCode","fromCurrencyType","toCurrencyType","minIn","minOut","rate","isTurnRate"]},"Function":{"type":"object","properties":{}},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/assets/enabled

> Получение включенных ассетов мерчанта

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/assets/enabled":{"get":{"operationId":"ApiAssetsController_getEnabledAssets","summary":"Получение включенных ассетов мерчанта","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение включенных ассетов мерчанта","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AssetSerializer"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"AssetSerializer":{"type":"object","properties":{"code":{"type":"string","description":"Код ассета"},"type":{"type":"string","description":"Тип валюты"},"usdPrice":{"type":"string","description":"Курс в USD"},"eurPrice":{"type":"string","description":"Курс в EUR"},"rubPrice":{"type":"string","description":"Курс в RUB"},"exponent":{"type":"number","description":"Округление до"},"name":{"type":"string","description":"Полное название"},"minDeposit":{"type":"string","description":"Минимальная сумма приема"},"maxDeposit":{"type":"string","description":"Максимальная сумма приема"},"minWithdraw":{"type":"string","description":"Минимальная сумма вывода"},"maxWithdraw":{"type":"string","description":"Максимальная сумма вывода"},"currencies":{"description":"Валюты","type":"array","items":{"$ref":"#/components/schemas/CurrencySerializer"}}},"required":["code","type","usdPrice","eurPrice","rubPrice","exponent","name","minDeposit","maxDeposit","minWithdraw","maxWithdraw","currencies"]},"CurrencySerializer":{"type":"object","properties":{"assetCode":{"type":"string","description":"Код актива"},"fiatCode":{"type":"string","description":"Код фиатной валюты"},"bestChangeCode":{"type":"string","description":"Код bestChange"},"isInternal":{"type":"boolean","description":"Внутренняя валюта?"},"assetName":{"type":"string","description":"Название ассета"},"networkName":{"type":"string","description":"Название сети"},"publicName":{"type":"string","description":"Полное название валюты"},"publicCode":{"type":"string","description":"Полный код валюты"},"isUseMemoTag":{"type":"boolean","description":"Использует ли мемотеги?"},"storageProviderCode":{"type":"string","description":"Код системы хранения (банка или сети)"},"publicStorageProviderName":{"type":"string","description":"Полное название системы хранения (банка или сети)"},"depositFee":{"type":"string","description":"Комиссия сети на прием"},"withdrawFee":{"type":"string","description":"Комиссия сети на вывод"},"exponent":{"type":"string","description":"Знаков после точки"},"re":{"type":"string","description":"Регулярка для валидации адреса"},"currencyType":{"type":"string","description":"Тип валюты"},"minDeposit":{"type":"string","description":"Минимальная сумма приема"},"maxDeposit":{"type":"string","description":"Максимальная сумма приема"},"minWithdraw":{"type":"string","description":"Минимальная сумма вывода"},"maxWithdraw":{"type":"string","description":"Максимальная сумма вывода"},"expiryDurationMinutes":{"type":"string","description":"Максимальная сумма вывода"},"usdPrice":{"type":"string","description":"Курс в USD"},"eurPrice":{"type":"string","description":"Курс в EUR"},"rubPrice":{"type":"string","description":"Курс в RUB"}},"required":["assetCode","isInternal","assetName","networkName","publicName","publicCode","example","isUseMemoTag","storageProviderCode","publicStorageProviderName","depositFee","withdrawFee","exponent","re","currencyType","minDeposit","maxDeposit","minWithdraw","maxWithdraw","expiryDurationMinutes","usdPrice","eurPrice","rubPrice"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/assets/settings

> Получение настроек ассетов мерчанта

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/assets/settings":{"get":{"operationId":"ApiAssetsController_getAssetsSettings","summary":"Получение настроек ассетов мерчанта","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение настроек ассетов мерчанта","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AssetSettingsSerializer"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"AssetSettingsSerializer":{"type":"object","properties":{"code":{"type":"string","description":"Ассет продажи","minLength":2},"invoiceHedge":{"type":"boolean","description":"Включить автохеджирование инвойсов?"},"invoiceHedgeToAsset":{"type":"string","description":"Хеджировать инвойсы в валюту"},"autoWithdraw":{"type":"boolean","description":"Включить автовывод?"},"autoWithdrawToAddress":{"type":"string","description":"Выводить на адрес"},"autoWithdrawCurrencyCode":{"type":"string","description":"Валюта вывода"},"createdByUid":{"type":"string","description":"UID создавшего настройки ассетов"}},"required":["code","invoiceHedge","autoWithdraw"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/assets/currencies

> Получение валют мерчанта

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/assets/currencies":{"get":{"operationId":"ApiAssetsController_getCurrencies","summary":"Получение валют мерчанта","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"currency","required":false,"in":"query","description":"Код валюты (code) или ассета (assetCode) для фильтрации","schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение валют мерчанта","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CurrencySerializer"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"CurrencySerializer":{"type":"object","properties":{"assetCode":{"type":"string","description":"Код актива"},"fiatCode":{"type":"string","description":"Код фиатной валюты"},"bestChangeCode":{"type":"string","description":"Код bestChange"},"isInternal":{"type":"boolean","description":"Внутренняя валюта?"},"assetName":{"type":"string","description":"Название ассета"},"networkName":{"type":"string","description":"Название сети"},"publicName":{"type":"string","description":"Полное название валюты"},"publicCode":{"type":"string","description":"Полный код валюты"},"isUseMemoTag":{"type":"boolean","description":"Использует ли мемотеги?"},"storageProviderCode":{"type":"string","description":"Код системы хранения (банка или сети)"},"publicStorageProviderName":{"type":"string","description":"Полное название системы хранения (банка или сети)"},"depositFee":{"type":"string","description":"Комиссия сети на прием"},"withdrawFee":{"type":"string","description":"Комиссия сети на вывод"},"exponent":{"type":"string","description":"Знаков после точки"},"re":{"type":"string","description":"Регулярка для валидации адреса"},"currencyType":{"type":"string","description":"Тип валюты"},"minDeposit":{"type":"string","description":"Минимальная сумма приема"},"maxDeposit":{"type":"string","description":"Максимальная сумма приема"},"minWithdraw":{"type":"string","description":"Минимальная сумма вывода"},"maxWithdraw":{"type":"string","description":"Максимальная сумма вывода"},"expiryDurationMinutes":{"type":"string","description":"Максимальная сумма вывода"},"usdPrice":{"type":"string","description":"Курс в USD"},"eurPrice":{"type":"string","description":"Курс в EUR"},"rubPrice":{"type":"string","description":"Курс в RUB"}},"required":["assetCode","isInternal","assetName","networkName","publicName","publicCode","example","isUseMemoTag","storageProviderCode","publicStorageProviderName","depositFee","withdrawFee","exponent","re","currencyType","minDeposit","maxDeposit","minWithdraw","maxWithdraw","expiryDurationMinutes","usdPrice","eurPrice","rubPrice"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/assets

> Получение списка доступных ассетов

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/assets":{"get":{"operationId":"ApiAssetsController_getAssets","summary":"Получение списка доступных ассетов","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение списка доступных ассетов","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AssetSerializer"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"AssetSerializer":{"type":"object","properties":{"code":{"type":"string","description":"Код ассета"},"type":{"type":"string","description":"Тип валюты"},"usdPrice":{"type":"string","description":"Курс в USD"},"eurPrice":{"type":"string","description":"Курс в EUR"},"rubPrice":{"type":"string","description":"Курс в RUB"},"exponent":{"type":"number","description":"Округление до"},"name":{"type":"string","description":"Полное название"},"minDeposit":{"type":"string","description":"Минимальная сумма приема"},"maxDeposit":{"type":"string","description":"Максимальная сумма приема"},"minWithdraw":{"type":"string","description":"Минимальная сумма вывода"},"maxWithdraw":{"type":"string","description":"Максимальная сумма вывода"},"currencies":{"description":"Валюты","type":"array","items":{"$ref":"#/components/schemas/CurrencySerializer"}}},"required":["code","type","usdPrice","eurPrice","rubPrice","exponent","name","minDeposit","maxDeposit","minWithdraw","maxWithdraw","currencies"]},"CurrencySerializer":{"type":"object","properties":{"assetCode":{"type":"string","description":"Код актива"},"fiatCode":{"type":"string","description":"Код фиатной валюты"},"bestChangeCode":{"type":"string","description":"Код bestChange"},"isInternal":{"type":"boolean","description":"Внутренняя валюта?"},"assetName":{"type":"string","description":"Название ассета"},"networkName":{"type":"string","description":"Название сети"},"publicName":{"type":"string","description":"Полное название валюты"},"publicCode":{"type":"string","description":"Полный код валюты"},"isUseMemoTag":{"type":"boolean","description":"Использует ли мемотеги?"},"storageProviderCode":{"type":"string","description":"Код системы хранения (банка или сети)"},"publicStorageProviderName":{"type":"string","description":"Полное название системы хранения (банка или сети)"},"depositFee":{"type":"string","description":"Комиссия сети на прием"},"withdrawFee":{"type":"string","description":"Комиссия сети на вывод"},"exponent":{"type":"string","description":"Знаков после точки"},"re":{"type":"string","description":"Регулярка для валидации адреса"},"currencyType":{"type":"string","description":"Тип валюты"},"minDeposit":{"type":"string","description":"Минимальная сумма приема"},"maxDeposit":{"type":"string","description":"Максимальная сумма приема"},"minWithdraw":{"type":"string","description":"Минимальная сумма вывода"},"maxWithdraw":{"type":"string","description":"Максимальная сумма вывода"},"expiryDurationMinutes":{"type":"string","description":"Максимальная сумма вывода"},"usdPrice":{"type":"string","description":"Курс в USD"},"eurPrice":{"type":"string","description":"Курс в EUR"},"rubPrice":{"type":"string","description":"Курс в RUB"}},"required":["assetCode","isInternal","assetName","networkName","publicName","publicCode","example","isUseMemoTag","storageProviderCode","publicStorageProviderName","depositFee","withdrawFee","exponent","re","currencyType","minDeposit","maxDeposit","minWithdraw","maxWithdraw","expiryDurationMinutes","usdPrice","eurPrice","rubPrice"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/assets/withdraw-fee

> Получение комиссий для вывода ассетов

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/assets/withdraw-fee":{"get":{"operationId":"ApiAssetsController_getWithdrawFee","summary":"Получение комиссий для вывода ассетов","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение комиссий для вывода","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AssetWithdrawFee"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"AssetWithdrawFee":{"type":"object","properties":{"toAssetCode":{"type":"string","description":"Код ассета"},"toCurrencyCode":{"type":"string","description":"Код валюты"},"toCurrencyName":{"type":"string","description":"Полное название валюты"},"fixFee":{"type":"number","description":"Комиссия сети"},"rate":{"type":"number","description":"Курс обмена"},"isTurnRate":{"type":"boolean","description":"Обратный курс?"},"minOut":{"type":"number","description":"Минимальная сумма на вывод"},"maxOut":{"type":"number","description":"Максимальная сумма на вывод"}},"required":["toAssetCode","toCurrencyName","fixFee","rate","isTurnRate","minOut","maxOut"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/merchant

> Получение информации о мерчанте

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/merchant":{"get":{"operationId":"ApiMerchantController_getMerchant","summary":"Получение информации о мерчанте","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение информации по мерчанту","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/MerchantSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"MerchantSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"name":{"type":"string","description":"Имя мерчанта.","minLength":3},"enabledAssets":{"description":"Включенные ассеты мерчанта","type":"array","items":{"type":"array"}},"status":{"type":"string","description":"Статус мерчанта","enum":["active","archived","underFirstReview","contactCheck","rejected","blocked"]},"balanceUsd":{"type":"string","description":"Эквивалент в $ балансов"},"equal":{"type":"string","description":"Эквивалент в основной валюте клиента"},"maxBillingCount":{"type":"number","description":"Максимальное количество биллингов"},"pricing":{"description":"Тариф мерчанта","allOf":[{"$ref":"#/components/schemas/PricingSerializer"}]},"merchantInfo":{"description":"Дополнительная информация мерчанта","allOf":[{"$ref":"#/components/schemas/MerchantInfoSerializer"}]},"merchantSettings":{"description":"Настройки мерчанта","allOf":[{"$ref":"#/components/schemas/MerchantSettingsSerializer"}]},"createdByUid":{"type":"string","description":"UID создавшего мерчанта"},"updatedByUid":{"type":"string","description":"UID обновившего мерчанта"}},"required":["id","uid","createdAt","updatedAt","deletedAt","name","enabledAssets","status","balanceUsd","maxBillingCount","pricing","merchantInfo","merchantSettings"]},"PricingSerializer":{"type":"object","properties":{"name":{"type":"string","description":"Имя тарифа"},"percentIn":{"type":"number","description":"Процент на прием"},"percentOut":{"type":"number","description":"Процент на вывод"},"percentExchange":{"type":"number","description":"Процент на обмен"},"processingFeeUsdt":{"type":"number","description":"Фикс комиссия (сеть+AML) в USDT эквиваленте"}},"required":["name","percentIn","percentOut","percentExchange","processingFeeUsdt"]},"MerchantInfoSerializer":{"type":"object","properties":{"projectName":{"type":"string","description":"Название проекта","minLength":3,"maxLength":128},"projectLink":{"type":"string","description":"Ссылка на проект","minLength":12,"maxLength":512},"projectDescription":{"type":"string","description":"Описание проекта","minLength":3,"maxLength":512},"country":{"type":"string","description":"Страна.","minLength":2,"maxLength":64},"turnover":{"type":"string","description":"Предполагаемые обороты","minLength":3},"activity":{"type":"string","description":"Вид деятельности","minLength":3,"maxLength":128},"businessStartDate":{"format":"date-time","type":"string","description":"Дата создания проекта"},"licence":{"type":"string","description":"Лицензирование вида деятельности","enum":["licensed","unlicensed","notRequired"]},"phone":{"type":"string","description":"Телефон.","minLength":7,"maxLength":40},"otherCommunications":{"type":"string","description":"Другие средства связи. Опциональное поле.","minLength":3,"maxLength":512},"updatedByUid":{"type":"string","description":"UID обновившего информацию о мерчанте"}},"required":["projectName","projectLink","projectDescription","country","turnover","activity","businessStartDate","licence"]},"MerchantSettingsSerializer":{"type":"object","properties":{"callbackUrl":{"type":"string","description":"Урл колбека","minLength":3,"nullable":true},"isBayerPaysService":{"type":"boolean","description":"Оплата комиссии сервиса (эквайринг) покупателем"},"secretKey":{"type":"string","description":"Секретный ключ","minLength":1},"updatedByUid":{"type":"string","description":"UID обновившего настройки мерчанта"}},"required":["secretKey"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/merchant/pricing

> Получение тарифа мерчанта

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/merchant/pricing":{"get":{"operationId":"ApiMerchantController_getMerchantPricing","summary":"Получение тарифа мерчанта","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение тарифа мерчанта","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/PricingSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"PricingSerializer":{"type":"object","properties":{"name":{"type":"string","description":"Имя тарифа"},"percentIn":{"type":"number","description":"Процент на прием"},"percentOut":{"type":"number","description":"Процент на вывод"},"percentExchange":{"type":"number","description":"Процент на обмен"},"processingFeeUsdt":{"type":"number","description":"Фикс комиссия (сеть+AML) в USDT эквиваленте"}},"required":["name","percentIn","percentOut","percentExchange","processingFeeUsdt"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/merchant/balances

> Получение валют мерчанта

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/merchant/balances":{"get":{"operationId":"ApiMerchantController_getBalances","summary":"Получение валют мерчанта","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение балансов мерчанта","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BalanceDto"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"BalanceDto":{"type":"object","properties":{"code":{"type":"string","description":"Код ассета"},"rate":{"type":"number","description":"Курс в валюте клиента"},"equal":{"type":"string","description":"Эквивалент в валюте клиента"},"balance":{"type":"string","description":"Баланс"},"pendingWds":{"type":"string","description":"Выводы в пендинге"},"pendingIn":{"type":"string","description":"Инвойсы в пендинге"},"type":{"type":"string","description":"Тип ассета","enum":["COIN","FIAT"]}},"required":["code","rate","equal","balance","pendingWds","pendingIn","type"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/merchant/deposit-wallets

> Получить крипто адреса мерчанта

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/merchant/deposit-wallets":{"get":{"operationId":"ApiMerchantController_getWallets","summary":"Получить крипто адреса мерчанта","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение крипто адресов мерчанта","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/DepositWalletDto"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"DepositWalletDto":{"type":"object","properties":{"assetCode":{"type":"string","description":"Адрес"}},"required":["assetCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/merchant/billings

> Получить список биллингов мерчанта

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/merchant/billings":{"get":{"operationId":"ApiMerchantController_getBillings","summary":"Получить список биллингов мерчанта","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Страница","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Кол-во элементов на странице","schema":{"type":"number"}},{"name":"orderBy","required":false,"in":"query","description":"Сортировка по полю","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Поиск","schema":{"type":"string"}},{"name":"billingUid","required":false,"in":"query","description":"Uid биллинга","schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение списка биллингов мерчанта","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingsSerializer"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"BillingsSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"tag":{"type":"string","description":"Billing тэг","minLength":1},"publicName":{"type":"string","description":"Публичное имя (видно покупателю)","minLength":1},"totalDeposits":{"description":"Депозиты","type":"array","items":{"$ref":"#/components/schemas/TotalDeposit"}},"wallets":{"description":"Кошельки","type":"array","items":{"$ref":"#/components/schemas/Wallet"}},"usdEqual":{"type":"string","description":"Эквивалент в $"}},"required":["id","uid","createdAt","updatedAt","deletedAt","tag","publicName","totalDeposits","wallets","usdEqual"]},"TotalDeposit":{"type":"object","properties":{"currencyInCode":{"type":"string","description":"Валюта оплаты"},"amount":{"type":"string","description":"Сумма депозитов"}},"required":["currencyInCode","amount"]},"Wallet":{"type":"object","properties":{"currencyCode":{"type":"string","description":"Код валюты + сеть"},"address":{"type":"string","description":"Адрес"},"assetCode":{"type":"string","description":"Код валюты"}},"required":["currencyCode","address","assetCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## POST /api/v1/integration/merchant/billings/{billingTag}

> Получить/создать биллинг

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/merchant/billings/{billingTag}":{"post":{"operationId":"ApiMerchantController_getOrCreateBilling","summary":"Получить/создать биллинг","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"billingTag","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBillingDto"}}}},"responses":{"200":{"description":"Успешное получение списка биллингов мерчанта","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"$ref":"#/components/schemas/BillingsSerializer"}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"CreateBillingDto":{"type":"object","properties":{"publicName":{"type":"string","description":"Публичное имя счета (показывается покупателю)"}}},"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"BillingsSerializer":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"tag":{"type":"string","description":"Billing тэг","minLength":1},"publicName":{"type":"string","description":"Публичное имя (видно покупателю)","minLength":1},"totalDeposits":{"description":"Депозиты","type":"array","items":{"$ref":"#/components/schemas/TotalDeposit"}},"wallets":{"description":"Кошельки","type":"array","items":{"$ref":"#/components/schemas/Wallet"}},"usdEqual":{"type":"string","description":"Эквивалент в $"}},"required":["id","uid","createdAt","updatedAt","deletedAt","tag","publicName","totalDeposits","wallets","usdEqual"]},"TotalDeposit":{"type":"object","properties":{"currencyInCode":{"type":"string","description":"Валюта оплаты"},"amount":{"type":"string","description":"Сумма депозитов"}},"required":["currencyInCode","amount"]},"Wallet":{"type":"object","properties":{"currencyCode":{"type":"string","description":"Код валюты + сеть"},"address":{"type":"string","description":"Адрес"},"assetCode":{"type":"string","description":"Код валюты"}},"required":["currencyCode","address","assetCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/merchant/fiat-withdraw-config/{currency}

> Получить список фиатных способов вывода

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/merchant/fiat-withdraw-config/{currency}":{"get":{"operationId":"ApiMerchantController_getFiatWithdrawConfig","summary":"Получить список фиатных способов вывода","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"currency","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"    Эндпоинт позволяет получить список доступных способов для вывода фиатных средств для мерчанта.\n    Эти данные необходимы для формирования запроса API метода fiat-withdraw\n    ","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ClientFiatSettingsSerializer"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"ClientFiatSettingsSerializer":{"type":"object","properties":{"name":{"type":"string","description":"Название"},"code":{"type":"string","description":"Код способа вывода"},"paymentMethod":{"type":"string","description":"Метод оплаты","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"currency":{"type":"string","description":"Валюта","enum":["RUB","USD","EUR","KZT","KGS","AZN","BYN","UZS","AMD","TRY","TJS"]},"currencyOutCode":{"type":"string","description":"Валюта на выходе (вывод с обменом)","enum":["RUB","USD","EUR","KZT","KGS","AZN","BYN","UZS","AMD","TRY","TJS"]},"paymentType":{"type":"string","description":"Тип платежного направления (прием/вывод)","enum":["deposit","withdraw"]},"providersOut":{"description":"Список провайдеров","type":"array","items":{"$ref":"#/components/schemas/ProviderOutSerializer"}},"providersIn":{"description":"Список провайдеров с которых можно платить (для deposit)","type":"array","items":{"$ref":"#/components/schemas/ProviderOutSerializer"}},"amountMin":{"type":"string","description":"Минимальная сумма"},"amountMax":{"type":"string","description":"Максимальная сумма"},"feePercent":{"type":"string","description":"Процент комиссии"},"isPackageService":{"type":"boolean","description":"Является ли услуга пакетной"},"requiredFields":{"type":"string","description":"Список обязательных полей","enum":["first_name","last_name","email","sender_first_name","sender_last_name"]},"categories":{"type":"string","description":"Список категорий","enum":["services","ps_games","xbox_games","gift_cards","new","top","others","phone","transfer_bank_card","internet","e_wallet","tv","education","gosuslugi","public_utilities","taxi","fun"]},"minFeeAmount":{"type":"string","description":"Минимальная сумма комиссии"},"additionalPercentForMinFee":{"type":"string","description":"Дополнительный процент комиссии, который применяется вместе с minFeeAmount"},"extraServiceFeeAmount":{"type":"string","description":"Фиксированная дополнительная сервисная комиссия","default":"0"}},"required":["name","code","paymentMethod","currency","providersOut","amountMin","amountMax","feePercent","isPackageService","requiredFields","categories","minFeeAmount","additionalPercentForMinFee"]},"ProviderOutSerializer":{"type":"object","properties":{"name":{"type":"string","description":"Название"},"code":{"type":"string","description":"Код"},"aliasCode":{"type":"string","description":"Код"},"method":{"type":"string","description":"Код метода вывода","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]}},"required":["name","code","aliasCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v1/integration/merchant/fiat-deposit-config/{currency}

> Получить список фиатных способов пополнения

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v1/integration/merchant/fiat-deposit-config/{currency}":{"get":{"operationId":"ApiMerchantController_getFiatDepositConfig","summary":"Получить список фиатных способов пополнения","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"currency","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"    Эндпоинт позволяет получить список доступных способов для приема фиатных средств для мерчанта.\n    Эти данные необходимы для формирования запроса API метода fiat-deposit\n    ","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ClientFiatSettingsSerializer"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"ClientFiatSettingsSerializer":{"type":"object","properties":{"name":{"type":"string","description":"Название"},"code":{"type":"string","description":"Код способа вывода"},"paymentMethod":{"type":"string","description":"Метод оплаты","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"currency":{"type":"string","description":"Валюта","enum":["RUB","USD","EUR","KZT","KGS","AZN","BYN","UZS","AMD","TRY","TJS"]},"currencyOutCode":{"type":"string","description":"Валюта на выходе (вывод с обменом)","enum":["RUB","USD","EUR","KZT","KGS","AZN","BYN","UZS","AMD","TRY","TJS"]},"paymentType":{"type":"string","description":"Тип платежного направления (прием/вывод)","enum":["deposit","withdraw"]},"providersOut":{"description":"Список провайдеров","type":"array","items":{"$ref":"#/components/schemas/ProviderOutSerializer"}},"providersIn":{"description":"Список провайдеров с которых можно платить (для deposit)","type":"array","items":{"$ref":"#/components/schemas/ProviderOutSerializer"}},"amountMin":{"type":"string","description":"Минимальная сумма"},"amountMax":{"type":"string","description":"Максимальная сумма"},"feePercent":{"type":"string","description":"Процент комиссии"},"isPackageService":{"type":"boolean","description":"Является ли услуга пакетной"},"requiredFields":{"type":"string","description":"Список обязательных полей","enum":["first_name","last_name","email","sender_first_name","sender_last_name"]},"categories":{"type":"string","description":"Список категорий","enum":["services","ps_games","xbox_games","gift_cards","new","top","others","phone","transfer_bank_card","internet","e_wallet","tv","education","gosuslugi","public_utilities","taxi","fun"]},"minFeeAmount":{"type":"string","description":"Минимальная сумма комиссии"},"additionalPercentForMinFee":{"type":"string","description":"Дополнительный процент комиссии, который применяется вместе с minFeeAmount"},"extraServiceFeeAmount":{"type":"string","description":"Фиксированная дополнительная сервисная комиссия","default":"0"}},"required":["name","code","paymentMethod","currency","providersOut","amountMin","amountMax","feePercent","isPackageService","requiredFields","categories","minFeeAmount","additionalPercentForMinFee"]},"ProviderOutSerializer":{"type":"object","properties":{"name":{"type":"string","description":"Название"},"code":{"type":"string","description":"Код"},"aliasCode":{"type":"string","description":"Код"},"method":{"type":"string","description":"Код метода вывода","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]}},"required":["name","code","aliasCode"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```

## GET /api/v2/integration/orders

> Получение списка ордеров мерчанта с типизированным поиском

```json
{"openapi":"3.0.0","info":{"title":"Интеграция API","version":"0.0.4.1-alpha"},"tags":[{"name":"api","description":""}],"paths":{"/api/v2/integration/orders":{"get":{"operationId":"ApiOrderController_getOrders2","summary":"Получение списка ордеров мерчанта с типизированным поиском","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Страница","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Кол-во элементов на странице","schema":{"type":"number"}},{"name":"orderBy","required":false,"in":"query","description":"Сортировка по полю","schema":{"type":"string"}},{"name":"statuses","required":false,"in":"query","description":"Статус заявки","schema":{"type":"array","items":{"type":"string","enum":["success","failed","inProgress","invoiceWaitCreate","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked","blocked"]}}},{"name":"types","required":false,"in":"query","description":"Тип заявки","schema":{"type":"array","items":{"type":"string","enum":["invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","currency-to-currency","deposit","account-transfer","account-deposit"]}}},{"name":"merchantsUids","required":false,"in":"query","description":"Uid мерчантов","schema":{"type":"array","items":{"type":"string"}}},{"name":"billingTags","required":false,"in":"query","description":"Биллинг тэг","schema":{"type":"array","items":{"type":"string"}}},{"name":"assets","required":false,"in":"query","description":"Активы","schema":{"type":"array","items":{"type":"string"}}},{"name":"networks","required":false,"in":"query","description":"Сети","schema":{"type":"array","items":{"type":"string"}}},{"name":"createdAtSince","required":false,"in":"query","description":"Дата создания (начало периода) строка должна соответствовать формату ISO8601 и быть в экранированном URL-encoded format. <br> Допустимо 2025-01-14T21:00:00.000%2b03:00 знак \"+\" -> \"%2B\" или 2025-01-14T21:00:00.000Z. <br> Правильно 2025-01-14T21%3A00%3A00.000%2B03%3A00","schema":{"format":"date-time","type":"string"}},{"name":"createdAtBefore","required":false,"in":"query","description":"Дата создания (конец периода) строка должна соответствовать формату ISO8601 и быть в экранированном URL-encoded format. <br> Допустимо 2025-01-14T21:00:00.000%2b03:00 знак \"+\" -> \"%2B\" или 2025-01-14T21:00:00.000Z. <br> Правильно 2025-01-14T21%3A00%3A00.000%2B03%3A00","schema":{"format":"date-time","type":"string"}},{"name":"showProtectedMerchantsOrders","required":false,"in":"query","description":"Показать ордера защищаемых (внутренних) мерчантов","schema":{"type":"boolean"}},{"name":"searchType","required":false,"in":"query","description":"Тип реквизитов для поиска","schema":{"enum":["byComments","byMerchantDetails","byOrderDetails","byHopsDetails"],"type":"string"}},{"name":"searchText","required":false,"in":"query","description":"Текст для поиска в реквизитах указанного типа","schema":{"type":"string"}}],"responses":{"200":{"description":"Успешное получение списка ордеров мерчанта","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AResponseType"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderSerializerNoRelationsAsync"}}}}]}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBadRequestException"}}}},"401":{"description":"Необходимо авторизоваться для запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUnauthorizedException"}}}},"403":{"description":"Недостаточно прав","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomForbiddenException"}}}},"500":{"description":"Системная ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInternalErrorException"}}}}},"tags":["api"]}}},"components":{"schemas":{"AResponseType":{"type":"object","properties":{"message":{"type":"string","description":"Сообщение статуса"},"data":{"type":"object","description":"Данные"},"count":{"type":"number","description":"Общее кол-во элементов в БД"}},"required":["message"]},"OrderSerializerNoRelationsAsync":{"type":"object","properties":{"id":{"type":"number","description":"Id"},"uid":{"type":"string","description":"UUID"},"createdAt":{"format":"date-time","type":"string","description":"Дата создания"},"updatedAt":{"format":"date-time","type":"string","description":"Дата обновления"},"deletedAt":{"format":"date-time","type":"string","description":"Дата удаления"},"serviceCommission":{"type":"string","description":"Комиссия сервиса"},"netCommission":{"type":"string","description":"Комиссия сети"},"comment":{"type":"string","description":"Комментарий"},"publicComment":{"type":"string","description":"Публичный комментарий"},"merchantUid":{"type":"string","description":"UUID мерчанта"},"merchantName":{"type":"string","description":"Имя мерчанта"},"merchantId":{"type":"string","description":"ID мерчанта"},"type":{"type":"string","description":"Тип заявки","enum":["deposit","invoice","invoice-without-amount","payment","payment-without-amount","exchange","withdraw","withdraw-with-exchange","account-transfer","currency-to-currency","account-deposit","ref-payment"]},"status":{"type":"string","description":"Статус заявки","enum":["created","success","warning","failed","inProgress","invoiceWaitCreate","invoiceNotCreated","invoiceWaitRequisites","invoiceWaitPay","invoiceWaitConfirms","invoiceWaitCheck","invoiceNotPayed","invoiceCheckBlocked","transferBlocked","exchangeBlocked","withdrawBlocked","waitRefundRequisites","waitRefundRequisitesCheck","waitToRefund","refunded","revoked"]},"invoiceCurrencyCode":{"type":"string","description":"Валюта, в которой выставлен инвойс"},"currencyInCode":{"type":"string","description":"Валюта оплаты"},"currencyOutCode":{"type":"string","description":"Получаемая валюта"},"invoiceAmount":{"type":"string","description":"Сумма инвойса"},"amountInExpected":{"type":"string","description":"Ожидаемая сумма оплаты"},"amountInFact":{"type":"string","description":"Фактическая сумма оплаты"},"amountOutExpected":{"type":"string","description":"Ожидаемая получаемая сумма"},"amountOutFact":{"type":"string","description":"Фактическая получаемая сумма"},"hedgeRate":{"type":"string","description":"Курс хеджирования"},"isDone":{"type":"boolean","description":"Заявка завершена?"},"apiMode":{"type":"string","description":"Источник создания заявки (UI | API)","enum":["ui","api","gateway"]},"risk":{"type":"string","description":"Оценка риска"},"requisites":{"type":"string","description":"Реквизиты заявки"},"requisitesIn":{"type":"string","description":"Реквизиты заявки вход"},"requisitesOut":{"type":"string","description":"Реквизиты заявки выход"},"requisitesMemoTag":{"type":"string","description":"Мемо тег (для XRP, TON и т.д.)"},"requisitesMemoTagIn":{"type":"string","description":"Мемо тег вход (для XRP, TON и т.д.)"},"requisitesMemoTagOut":{"type":"string","description":"Мемо тег выход (для XRP, TON и т.д.)"},"billingTag":{"type":"string","description":"Биллинг тэг"},"requisitesQrCode":{"type":"string","description":"Ссылка на QR с реквизитами"},"assetInCode":{"type":"string","description":"Входящий ассет"},"assetOutCode":{"type":"string","description":"Исходящий ассет"},"networkInCode":{"type":"string","description":"Входящяя сеть ассета"},"networkOutCode":{"type":"string","description":"Исходящяя сеть ассета"},"balanceAfter":{"type":"string","description":"Баланс после завершения заявки"},"balanceAccountAfter":{"type":"string","description":"Баланс после завершения заявки в ledger"},"callbackUrl":{"type":"string","description":"Колбэк урл"},"invoicePublicUrl":{"type":"string","description":"Публичный урл инвойса"},"txId":{"type":"string","description":"Айди транзакции"},"refundTxId":{"type":"string","description":"Айди транзакции возврата"},"expirationTime":{"format":"date-time","type":"string","description":"Оплатить до"},"isImPayed":{"type":"boolean","description":"Нажал оплатил?"},"isBayerPaysService":{"type":"boolean","description":"Покупатель оплачивает сервисную комиссию инвойсов?"},"serviceFeeCurrencyCode":{"type":"string","description":"Валюта оплаты комиссии сервиса"},"netFeeCurrencyCode":{"type":"string","description":"Валюта возмещения комиссии сети"},"requisitesInUrl":{"type":"string","description":"Ссылка для оплаты от внешнего платежного провайдера"},"orderCurrencyType":{"type":"string","description":"Тип валют участвующих в операции","enum":["fiat","crypto","fiatToCrypto","cryptoToFiat"]},"paymentMethod":{"type":"string","description":"Платежный метод","enum":["card","phone","sbp","wallet","transgran","transgran_crypto","wire_transfer","bank_transfer","service"]},"providerCode":{"type":"string","description":"Код фиатного провайдера"},"providerAliasCode":{"type":"string","description":"Человекочитаемый код фиатного провайдера"},"paymentSettingsName":{"type":"string","description":"Название фиатной настройки"},"providerName":{"type":"string","description":"Название фиатного провайдера"},"amlReportExists":{"type":"boolean","description":"Существует AML отчет по ордеру?"},"minFeeTriggerAmount":{"type":"string","description":"Порог, на котором изменяется принцип рассчета комиссии"}},"required":["id","uid","createdAt","updatedAt","deletedAt","serviceCommission","netCommission","comment","publicComment","merchantUid","merchantName","merchantId","type","status","invoiceCurrencyCode","currencyInCode","currencyOutCode","invoiceAmount","amountInExpected","amountInFact","amountOutExpected","amountOutFact","hedgeRate","isDone","apiMode","risk","requisites","requisitesIn","requisitesOut","requisitesMemoTag","requisitesMemoTagIn","requisitesMemoTagOut","billingTag","requisitesQrCode","assetInCode","assetOutCode","networkInCode","networkOutCode","balanceAfter","balanceAccountAfter","callbackUrl","invoicePublicUrl","txId","refundTxId","expirationTime","isImPayed","isBayerPaysService","serviceFeeCurrencyCode","netFeeCurrencyCode","requisitesInUrl","orderCurrencyType","amlReportExists"]},"CustomBadRequestException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomUnauthorizedException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomForbiddenException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]},"CustomInternalErrorException":{"type":"object","properties":{"error":{"type":"string","description":"Описание ошибки"},"errorCode":{"type":"number","description":"Код ошибки"}},"required":["errorCode"]}}}}
```
