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

# Consultar transação

> Consulta uma transação do estabelecimento pelo UUID da Azentech.

## Comportamento observado

* A consulta é limitada ao estabelecimento associado ao token.

> [!NOTE]
>
> Os exemplos usam identificadores e credenciais sintéticos. Os resultados do processador dependem do credenciamento e da configuração do estabelecimento.


## OpenAPI

````yaml openapi.json GET /api/transaction/{transaction_id}
openapi: 3.1.0
info:
  title: Azentech Payments API
  version: 1.0.0
  description: >-
    Contrato HTTP público das operações de pagamento, consulta, sandbox e
    webhooks da Azentech. A especificação contém apenas o ambiente de
    homologação confirmado.
servers:
  - url: https://gateway.staging.azentech.dev
    description: Homologação (staging)
security: []
tags:
  - name: Pix
    description: Cobranças, pagamentos, aportes, retiradas e jornada biométrica.
  - name: Transações
    description: Consulta e reembolso de transações.
  - name: Saldos
    description: Saldos atuais, históricos e resumo financeiro.
  - name: Relatórios
    description: Extrato e posição financeira.
  - name: Sandbox
    description: Simulações disponíveis para processadores elegíveis em modo de teste.
paths:
  /api/transaction/{transaction_id}:
    get:
      tags:
        - Transações
      summary: Consultar transação
      description: Consulta uma transação do estabelecimento pelo UUID da Azentech.
      operationId: reference_transactions_get
      parameters:
        - name: transaction_id
          in: path
          required: true
          description: UUID da transação na Azentech.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Transação encontrada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShowTransactionEnvelope'
              example:
                transaction:
                  id: 10000000-0000-4000-8000-000000000001
                  merchant_id: 20000000-0000-4000-8000-000000000001
                  user_id: 30000000-0000-4000-8000-000000000001
                  processor_id: 40000000-0000-4000-8000-000000000001
                  merchant_transaction_id: 50000000-0000-4000-8000-000000000001
                  transaction_type: pix
                  first_name: Cliente
                  last_name: Exemplo
                  email: cliente@example.com
                  updated_at: '2026-10-23T14:30:00+00:00'
                  created_at: '2026-10-23T14:30:00+00:00'
                  events:
                    - id: 60000000-0000-4000-8000-000000000001
                      success: true
                      status: success
                      event_type: auth
                      amount: '125.90'
                      ip_address: 192.0.2.10
                      processor_code: null
                      processor_message: null
                      processor_transaction_id: sandbox-event-1001
                      batch_id: null
                      qrcode: >-
                        00020101021226850014br.gov.bcb.pix2563example.invalid/pix/1001
                      pix_key_type: null
                      pix_key_value: null
                      pix_message: 'Deposito para: CONTA DEMO'
                      updated_at: '2026-10-23T14:30:00+00:00'
                      created_at: '2026-10-23T14:30:00+00:00'
                  document_number: '12345678909'
                  status: pending
                  flow_type: cashin
                  error: null
                  e2e_id: null
                  source: player
                  transaction_repay_id: null
        '401':
          description: Token ausente, inválido ou sem acesso.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              example:
                error:
                  message:
                    base:
                      - Not authenticated
                  status: 401
        '404':
          description: Transação não encontrada no estabelecimento autenticado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              example:
                error:
                  message: Transaction not found.
                  status: 404
      security:
        - BearerAuth: []
components:
  schemas:
    ShowTransactionEnvelope:
      type: object
      additionalProperties: false
      properties:
        transaction:
          $ref: '#/components/schemas/ShowTransaction'
      required:
        - transaction
    GatewayError:
      type: object
      additionalProperties: false
      properties:
        error:
          type: object
          additionalProperties: false
          properties:
            message:
              oneOf:
                - type: string
                - type: object
                  additionalProperties:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              description: Mensagem simples ou mapa de campos para listas de mensagens.
            status:
              type: integer
              description: Código HTTP devolvido.
          required:
            - message
            - status
      required:
        - error
    ShowTransaction:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: UUID da transação na Azentech.
          format: uuid
        merchant_id:
          type: string
          description: UUID do estabelecimento.
          format: uuid
        user_id:
          type:
            - string
            - 'null'
          description: UUID do usuário associado.
          format: uuid
        processor_id:
          type: string
          description: UUID do processador selecionado.
          format: uuid
        merchant_transaction_id:
          type: string
          description: Identificador informado pelo estabelecimento.
          maxLength: 255
        transaction_type:
          type: string
          description: Tipo da transação.
        first_name:
          type:
            - string
            - 'null'
          description: Nome do pagador ou recebedor.
        last_name:
          type:
            - string
            - 'null'
          description: Sobrenome do pagador ou recebedor.
        email:
          type:
            - string
            - 'null'
          description: Email do pagador ou recebedor.
          format: email
        updated_at:
          type: string
          description: Data e hora da última alteração.
          format: date-time
        created_at:
          type: string
          description: Data e hora de criação.
          format: date-time
        document_number:
          type:
            - string
            - 'null'
          description: CPF ou CNPJ vinculado à transação.
        status:
          type: string
          description: Estado agregado da transação.
          enum:
            - pending
            - success
            - failed
            - expired
            - in_protest
            - canceled
        flow_type:
          type: string
          description: Direção financeira da transação.
          enum:
            - cashin
            - cashout
            - settlement
        error:
          anyOf:
            - $ref: '#/components/schemas/TransactionError'
            - type: 'null'
        e2e_id:
          type:
            - string
            - 'null'
          description: Identificador EndToEnd do Pix.
        source:
          type:
            - string
            - 'null'
          description: Origem interna da transação.
        transaction_repay_id:
          type:
            - string
            - 'null'
          description: UUID da transação de repasse, quando existir.
          format: uuid
        events:
          type: array
          items:
            $ref: '#/components/schemas/ShowTransactionEvent'
      required:
        - id
        - merchant_id
        - processor_id
        - merchant_transaction_id
        - transaction_type
        - events
        - status
        - flow_type
        - created_at
        - updated_at
    TransactionError:
      type: object
      additionalProperties: true
      description: Erro persistido na transação. As chaves dependem do processador.
      properties:
        code:
          type:
            - string
            - 'null'
          description: Código do erro.
        message:
          type:
            - string
            - 'null'
          description: Descrição do erro.
    ShowTransactionEvent:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: UUID do evento.
          format: uuid
        success:
          type: boolean
          description: Resultado informado pelo processador.
        status:
          type: string
          description: Estado calculado do evento.
        event_type:
          type: string
          description: Tipo do evento.
        amount:
          oneOf:
            - type: string
            - type: number
          description: Valor do evento em reais.
        ip_address:
          type:
            - string
            - 'null'
          description: IP associado ao evento.
        processor_code:
          type:
            - string
            - 'null'
          description: Código devolvido pelo processador.
        processor_message:
          type:
            - string
            - 'null'
          description: Mensagem devolvida pelo processador.
        processor_transaction_id:
          type:
            - string
            - 'null'
          description: Identificador do evento no processador.
        batch_id:
          type:
            - string
            - 'null'
          description: Identificador do lote, quando houver.
        qrcode:
          type:
            - string
            - 'null'
          description: Payload EMV do QR Code Pix.
        pix_key_type:
          type:
            - string
            - 'null'
          description: Tipo da chave Pix.
        pix_key_value:
          type:
            - string
            - 'null'
          description: Valor da chave Pix.
        pix_message:
          type:
            - string
            - 'null'
          description: Mensagem Pix.
        updated_at:
          type: string
          description: Data e hora da última alteração.
          format: date-time
        created_at:
          type: string
          description: Data e hora da criação.
          format: date-time
      required:
        - id
        - success
        - status
        - event_type
        - amount
        - updated_at
        - created_at
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: Token de acesso fornecido para o estabelecimento.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.