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

# Consultar transação

> Retorna o status e os detalhes de uma transação pelo seu `id`.

Retorna o status e os detalhes de uma transação pelo seu `id`. Útil para reconciliação ou como fallback do webhook.

<Tip>
  Para saber quando uma transação é paga, prefira sempre o [webhook](/webhooks/visao-geral). Evite polling agressivo.
</Tip>


## OpenAPI

````yaml GET /v1/transactions/{transactionId}
openapi: 3.0.3
info:
  title: API Ephra
  description: >-
    API REST para gerar cobranças (PIX, cartão e boleto), consultar transações e
    gerenciar webhooks.
  version: 1.0.0
servers:
  - url: https://api.ephra.io
    description: Servidor de produção
security:
  - bearerAuth: []
tags:
  - name: Autenticação
    description: Login e obtenção do token de acesso
  - name: Pagamentos
    description: Criação de cobranças PIX, cartão e boleto
  - name: Assinaturas
    description: Cobrança recorrente — iniciar, listar, consultar e cancelar assinaturas
  - name: Transações
    description: Consulta de transações
  - name: Webhooks
    description: Cadastro e gerenciamento de webhooks
paths:
  /v1/transactions/{transactionId}:
    get:
      tags:
        - Transações
      summary: Consultar transação
      description: Retorna o status e os detalhes de uma transação pelo seu `id`.
      operationId: getTransaction
      parameters:
        - name: transactionId
          in: path
          required: true
          schema:
            type: string
          example: clxabc123def456
      responses:
        '200':
          description: Dados da transação
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/Transaction'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Transaction:
      type: object
      properties:
        id:
          type: string
          example: clxabc123def456
        paymentMethod:
          type: string
          example: pix
        amount:
          type: integer
          example: 10000
        netAmount:
          type: integer
          example: 9850
        fees:
          type: integer
          example: 150
        status:
          type: string
          example: paid
        description:
          type: string
          nullable: true
        createdAt:
          type: string
          example: '2026-06-03T12:00:00.000Z'
        updatedAt:
          type: string
          example: '2026-06-03T12:01:30.000Z'
        aprovedAt:
          type: string
          nullable: true
          example: '2026-06-03T12:01:30.000Z'
        refuseReason:
          type: string
          nullable: true
        customer:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
              example: Maria Silva
            phone:
              type: string
              nullable: true
            documentType:
              type: string
              example: cpf
            document:
              type: string
              example: '12345678909'
            emails:
              type: array
              items:
                type: object
                properties:
                  email:
                    type: string
                    format: email
        Pix:
          type: object
          nullable: true
          properties:
            key:
              type: string
              nullable: true
            endToEndId:
              type: string
              nullable: true
            payerInfo:
              type: object
              nullable: true
    Error:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: Mensagem descritiva do erro
  responses:
    Unauthorized:
      description: Token ausente, inválido ou expirado
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            error: Unauthorized
            message: Token inválido ou expirado
    NotFound:
      description: Recurso não encontrado
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 404
            error: Not Found
            message: Recurso não encontrado
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````