> For the complete documentation index, see [llms.txt](https://support.trybit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.trybit.com/ru/integration/api.md).

# Интеграция по API

Узнайте, как интегрировать Trybit через API для автоматизации обработки платежей.

**API-интеграция** дает полный контроль над процессом приема платежей: автоматическое создание счетов под каждый заказ, автоматизация выплат, получение баланса и статистики, уведомления о платежах.

### Что нужно для начала работы

Для начала работы с интеграцией необходимо создать проект в личном кабинете Trybit и получить API-ключ и Shop ID — эти данные потребуются для настройки взаимодействия вашей системы с платформой и авторизации запросов.&#x20;

API-ключ проекта — выдаётся в настройках интеграции. Все запросы к API подписываются этим ключом. Полная документация методов — на [docs.trybit.com/ru](https://docs.trybit.com/ru), справочник — по адресу `/ru/api-reference-v2/[endpoint]`.

<figure><img src="https://743074228-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGGWSoL3mKvcqS0CBSqOz%2Fuploads%2FYHeJvlljit34aXjMbOI1%2Fimage.png?alt=media&amp;token=190f3a8f-e5a7-43e8-9f9b-11fa201a5f85" alt=""><figcaption></figcaption></figure>

### Как работает создание счета по API

1. При оформлении заказа на стороне мерчанта отправляется запрос на создание счета — с суммой, валютой и дополнительными данными заказа.
2. В ответ API возвращает готовую ссылку на оплату — ее нужно показать покупателю (например, перенаправить на нее или открыть в отдельном окне).
3. Покупатель оплачивает счет по этой ссылке.
4. После оплаты на Notification URL проекта приходит [POSTBACK](/ru/integration/postback.md)-уведомление.
5. Статус счета в любой момент можно дополнительно проверить методом API — по номеру счета (INV).

Такой сценарий подходит, если нужно встроить прием платежей в собственную систему заказов, не обязательно меняя интерфейс оплаты — сам процесс оплаты происходит на платежной странице Trybit.

{% hint style="success" %}
Если у вас возникли вопросы или требуется помощь, вы можете обратиться в наш чат поддержки на сайте и в личном кабинете, а также связаться с нами в Telegram. Контакты поддержки указаны [на нашем сайте](https://trybit.com/support).
{% endhint %}


---

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

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.trybit.com/ru/integration/api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

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