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

# Buscar Transação

> Retorna os detalhes de uma transação específica pelo seu ID.

**Permissão requerida:** `TRANSACTION:READ` ou `FULL_ACCESS`



## OpenAPI

````yaml GET /transactions/{id}
openapi: 3.0.0
info:
  title: MisesPay API
  description: MisesPay Payment API documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.misespay.com/v2
security: []
paths:
  /transactions/{id}:
    get:
      tags:
        - External API - Transactions
      summary: Buscar transação por ID
      description: |-
        Retorna os detalhes de uma transação específica pelo seu ID.

        **Permissão requerida:** `TRANSACTION:READ` ou `FULL_ACCESS`
      operationId: ExternalTransactionsController_getTransaction
      parameters:
        - name: id
          required: true
          in: path
          description: ID da transação
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Detalhes da transação
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTransactionOutput'
        '401':
          description: Unauthorized - Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '404':
          description: Not Found - Resource 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:
  schemas:
    GetTransactionOutput:
      type: object
      properties:
        id:
          type: string
          description: ID da transação
          format: uuid
        status:
          type: string
          description: Status da transação
          enum:
            - pending
            - completed
            - failed
            - cancelled
        type:
          type: string
          description: Tipo da transação
          enum:
            - payment
            - fee
            - refund
            - chargeback
            - withdrawal
            - adjustment
        paymentMethod:
          type: string
          description: Método de pagamento utilizado
          enum:
            - pix
            - credit_card
            - boleto
        amount:
          type: number
          description: Valor em BRL
          example: 150.75
        currency:
          type: string
          description: Código da moeda
          example: BRL
        description:
          type: string
          description: Descrição da transação
        externalReference:
          type: string
          description: Seu ID de referência externa
          example: pedido-12345
        customerId:
          type: string
          description: ID do cliente
          format: uuid
        projectId:
          type: string
          description: ID do projeto
          format: uuid
        metadata:
          type: object
          description: Metadados personalizados (pares chave-valor)
          additionalProperties: true
          example:
            orderId: '12345'
            source: website
        pixCopyPaste:
          type: string
          description: Código PIX copia e cola (apenas para transações PIX pendentes)
          example: 00020126580014br.gov.bcb.pix0136a1b2c3d4-e5f6-7890-abcd-ef1234567890
        expiresAt:
          type: string
          description: Data de expiração (apenas para transações pendentes)
          format: date-time
        paidAt:
          type: string
          description: Data em que a transação foi paga
          format: date-time
        createdAt:
          type: string
          description: Data de criação
          format: date-time
        updatedAt:
          type: string
          description: Data de atualização
          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: >-
        Access token obtido no POST /auth (client_id + client_secret). Válido
        por 300 segundos.

````