> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pague.dev/llms.txt
> Use this file to discover all available pages before exploring further.

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

> Возвращает детали конкретной транзакции по её ID.

**Требуемое разрешение:** `TRANSACTION:READ` или `FULL_ACCESS`



## OpenAPI

````yaml openapi.ru.json GET /transactions/{id}
openapi: 3.0.0
info:
  title: pague.dev API
  description: Документация платёжного API pague.dev
  version: '1.0'
  contact: {}
servers:
  - url: https://api-gateway.pague.dev/v2
security: []
paths:
  /transactions/{id}:
    get:
      tags:
        - External API - Transactions
      summary: Получить транзакцию по ID
      description: |-
        Возвращает детали конкретной транзакции по её ID.

        **Требуемое разрешение:** `TRANSACTION:READ` или `FULL_ACCESS`
      operationId: ExternalTransactionsController_getTransaction
      parameters:
        - name: id
          required: true
          in: path
          description: >-
            ID транзакции (UUID), ваш external_reference или Idempotency-Key,
            использованный при создании. Разрешаются в этом порядке. Вывод
            средств, ещё находящийся в обработке (без транзакции), также
            находится по любому из них.
          schema:
            type: string
        - $ref: '#/components/parameters/SubAccount'
      responses:
        '200':
          description: Детали транзакции
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTransactionOutput'
        '401':
          description: Unauthorized — требуется аутентификация
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not Found — ресурс не найден
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
        '500':
          description: Internal Server Error — внутренняя ошибка сервера
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    SubAccount:
      name: X-Sub-Account
      in: header
      required: false
      description: >-
        Reference субсчёта, в котором должна выполняться операция. Если
        заголовок не передан, операция выполняется в основном аккаунте;
        зарезервированное значение `principal` также указывает на основной
        аккаунт и равнозначно отсутствию заголовка. Принимается всеми
        эндпоинтами, кроме `POST /auth` и самих эндпоинтов `/sub-accounts`,
        которые всегда работают с основным аккаунтом.


        Возможные ошибки: `404 SUB_ACCOUNT_NOT_FOUND`, `403
        SUB_ACCOUNT_FORBIDDEN`, `403 SUB_ACCOUNT_SUSPENDED`.


        Требует, чтобы у учётных данных был включён **доступ к субсчетам**
        (Настройки → Интеграция → Учётные данные API). По умолчанию он выключен
        и не заменяется никаким разрешением, даже `FULL_ACCESS`: без него ответ
        — `403 SUB_ACCOUNT_FORBIDDEN`.
      schema:
        type: string
        pattern: ^[a-z0-9][a-z0-9_-]{1,31}$
        example: loja-centro
  schemas:
    GetTransactionOutput:
      type: object
      properties:
        id:
          type: string
          description: ID транзакции
          format: uuid
        status:
          type: string
          description: Статус транзакции
          enum:
            - pending
            - completed
            - failed
            - cancelled
        type:
          type: string
          description: >-
            Тип транзакции. `internal_transfer` — движение между счетами одного
            владельца: внутренний перевод или часть разделения платежа; по сети
            PIX он не проходит.
          enum:
            - payment
            - fee
            - refund
            - chargeback
            - withdrawal
            - adjustment
            - referral_commission
            - internal_transfer
        paymentMethod:
          type: string
          description: Использованный способ оплаты
          enum:
            - pix
            - credit_card
            - boleto
        amount:
          type: number
          description: Сумма в BRL
          example: 150.75
        currency:
          type: string
          description: Код валюты
          example: BRL
        description:
          type: string
          description: Описание транзакции
        externalReference:
          type: string
          description: Ваш внешний референс-ID
          example: pedido-12345
        customerId:
          type: string
          description: ID клиента
          format: uuid
        projectId:
          type: string
          description: ID проекта
          format: uuid
        metadata:
          type: object
          description: Персонализированные метаданные (пары ключ–значение)
          additionalProperties: true
          example:
            orderId: '12345'
            source: website
        pixCopyPaste:
          type: string
          description: >-
            Код PIX «копировать и вставить» (только для ожидающих транзакций
            PIX)
          example: 00020126580014br.gov.bcb.pix0136a1b2c3d4-e5f6-7890-abcd-ef1234567890
        expiresAt:
          type: string
          description: Дата истечения срока действия (только для ожидающих транзакций)
          format: date-time
        paidAt:
          type: string
          description: Дата оплаты транзакции
          format: date-time
        e2eId:
          type: string
          description: Сквозной ID сети PIX (появляется после подтверждения PSP)
          example: E18189547202603160145ZYFfVx3jP8D
        counterpartName:
          type: string
          description: >-
            Имя контрагента по данным PSP (плательщик при поступлении,
            получатель при выводе)
          example: Мария Силва
        counterpartDocument:
          type: string
          description: CPF/CNPJ контрагента, без маски
          example: '12345678900'
        createdAt:
          type: string
          description: Дата создания
          format: date-time
        updatedAt:
          type: string
          description: Дата обновления
          format: date-time
      required:
        - id
        - status
        - type
        - paymentMethod
        - amount
        - currency
        - createdAt
    UnauthorizedErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        error:
          type: string
          example: Unauthorized
        message:
          type: string
          example: Authentication token is required
        details:
          type: object
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
      required:
        - statusCode
        - error
        - message
        - timestamp
    NotFoundErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 404
        error:
          type: string
          example: NotFound
        message:
          type: string
          example: Resource with id 550e8400-e29b-41d4-a716-446655440000 not found
        details:
          type: object
          example:
            resource: Example
            id: 550e8400-e29b-41d4-a716-446655440000
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
      required:
        - statusCode
        - error
        - message
        - timestamp
    InternalServerErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 500
        error:
          type: string
          example: InternalError
        message:
          type: string
          example: An unexpected error occurred
        details:
          type: object
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
          example: 2771463d58840c8e116dc6dda1e1e5d0
      required:
        - statusCode
        - error
        - message
        - timestamp
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Токен доступа, полученный через POST /auth (client_id + client_secret).
        Действителен в течение 300 секунд.

````