> For the complete documentation index, see [llms.txt](https://developers.friendlypay.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.friendlypay.io/transactions/sbp/poluchit-tranzakciyu.md).

# Получить транзакцию

## Получение информации о SBP транзакции

> Возвращает детальную информацию о транзакции по её идентификатору.

```json
{"openapi":"3.0.3","info":{"title":"FriendlyPay API","version":"1.0.0"},"tags":[{"name":"СБП","description":"Транзакции через Систему быстрых платежей (СБП)"}],"servers":[{"url":"https://pay.friendlypay.io","description":"Production API server (эндпоинты доступны по префиксу /api)"}],"security":[{"FpTimestamp":[],"FpNonce":[],"FpApiToken":[],"FpSignature":[]}],"components":{"securitySchemes":{"FpTimestamp":{"type":"apiKey","in":"header","name":"x-fp-timestamp","description":"Unix timestamp запроса (целое число, минимум 1)"}},"parameters":{"XFpTimestamp":{"name":"x-fp-timestamp","in":"header","required":true,"description":"Временная метка Unix.","schema":{"type":"integer","format":"int64","minimum":1}},"XFpNonce":{"name":"x-fp-nonce","in":"header","required":true,"description":"Уникальная строка.","schema":{"type":"string"}},"XFpApiToken":{"name":"x-fp-api-token","in":"header","required":true,"description":"Публичный api токен мерчанта.","schema":{"type":"string"}},"XFpSignature":{"name":"x-fp-signature","in":"header","required":true,"description":"HMAC-SHA256 подпись. Алгоритм формирования см. в разделе «Аутентификация».","schema":{"type":"string"}}},"schemas":{"SbpTransactionResponse":{"type":"object","description":"Детальная информация о SBP транзакции","required":["id","orderId","type","status","orderAmount","paymentAmount","createdAt","expireAt"],"properties":{"id":{"type":"string","description":"Идентификатор транзакции в системе FriendlyPay"},"merchantOrderId":{"type":"string","nullable":true,"description":"Внешний идентификатор транзакции на стороне мерчанта"},"orderId":{"type":"integer","format":"int64","minimum":1,"description":"Номер заказа в рамках магазина"},"type":{"$ref":"#/components/schemas/TransactionType"},"status":{"$ref":"#/components/schemas/TransactionStatus"},"orderAmount":{"$ref":"#/components/schemas/MoneyDto"},"paymentAmount":{"$ref":"#/components/schemas/MoneyDto"},"createdAt":{"type":"string","format":"date-time","description":"Дата и время создания транзакции в UTC"},"expireAt":{"type":"string","format":"date-time","description":"Дата и время истечения срока действия транзакции в UTC"},"qrLink":{"type":"string","format":"uri","nullable":true,"description":"Ссылка на QR-код для оплаты. Доступна начиная со статуса 'initialized'."}}},"TransactionType":{"type":"string","description":"Тип платежной системы","enum":["sbp","crypto"]},"TransactionStatus":{"type":"string","description":"Текущий статус транзакции","enum":["created","initialized","success","failed","expired"]},"MoneyDto":{"type":"object","description":"Денежная сумма с валютой","required":["value","currency"],"properties":{"value":{"type":"number","format":"decimal","description":"Сумма денег","exclusiveMinimum":true,"minimum":0},"currency":{"type":"string","description":"Код валюты по ISO 4217","pattern":"^[A-Z]{3}$"}}}},"responses":{"Unauthorized":{"description":"Ошибка авторизации — неверные или отсутствующие заголовки аутентификации"},"Forbidden":{"description":"Доступ запрещён — недостаточно прав для выполнения операции"},"InternalServerError":{"description":"Внутренняя ошибка сервера"}}},"paths":{"/api/v1/transactions/sbp/{transactionId}":{"get":{"tags":["СБП"],"summary":"Получение информации о SBP транзакции","description":"Возвращает детальную информацию о транзакции по её идентификатору.","operationId":"getSbpTransaction","parameters":[{"$ref":"#/components/parameters/XFpTimestamp"},{"$ref":"#/components/parameters/XFpNonce"},{"$ref":"#/components/parameters/XFpApiToken"},{"$ref":"#/components/parameters/XFpSignature"},{"name":"transactionId","in":"path","required":true,"description":"Идентификатор транзакции, полученный при создании","schema":{"type":"string"}}],"responses":{"200":{"description":"Информация о транзакции успешно получена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SbpTransactionResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```
