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

# Consultar transação

> Consulte uma transação pelo ID.

Use este endpoint para reconciliar transações voucher depois da criação ou entrega de webhook. A resposta mais recente pode incluir campos normalizados em `voucher`, como `barcode`, `digitable_line`, `url`, `expiration_date`, `instructions` e `receipt_url`.

As instruções de voucher podem chegar de forma assíncrona em alguns provedores de pagamento. Se a resposta de criação retornar `status: "pending"` com campos de voucher vazios, use este endpoint para atualizar a tela do cliente e mantenha os webhooks como fonte de verdade para liberar o pedido.


## OpenAPI

````yaml api-reference/openapi-v2.json GET /v2/transactions/{id}
openapi: 3.1.0
info:
  title: API PIX - v2
  description: API for Pagou.ai Gateway
  version: 2.0.0
  contact:
    name: Support
    url: https://pagou.ai
    email: support@pagou.ai
servers:
  - url: https://api.pagou.ai
    description: Production server
  - url: https://api.sandbox.pagou.ai
    description: Sandbox server for testing
security:
  - BearerAuth: []
  - ApiKeyAuth: []
  - BasicAuth: []
paths:
  /v2/transactions/{id}:
    get:
      tags:
        - API - Transactions
      summary: Get a Transaction
      description: Get a transaction
      operationId: getTransactionsById
      parameters:
        - schema:
            anyOf:
              - type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              - type: number
          in: path
          name: id
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  requestId:
                    type: string
                  data:
                    type: object
                    properties:
                      id:
                        description: >-
                          Unique identifier of the transaction (numeric or
                          UUID).
                        type: string
                        format: uuid
                      amount:
                        type: integer
                        minimum: 100
                        maximum: 100000000
                        description: Total transaction amount in cents.
                      voucher:
                        nullable: true
                        type: object
                        properties:
                          barcode:
                            nullable: true
                            description: >-
                              Barcode string for boleto or voucher, when
                              applicable.
                            type: string
                          digitable_line:
                            nullable: true
                            description: >-
                              Digitable line representation of the boleto or
                              voucher.
                            type: string
                          url:
                            nullable: true
                            description: >-
                              URL where the boleto or voucher can be viewed or
                              downloaded.
                            type: string
                          expiration_date:
                            nullable: true
                            description: Expiration date of the boleto or voucher.
                            type: string
                            format: date-time
                          instructions:
                            nullable: true
                            description: >-
                              Additional payment instructions for the boleto or
                              voucher.
                            type: string
                          receipt_url:
                            nullable: true
                            description: URL to access the payment receipt, when available.
                            type: string
                        required:
                          - barcode
                          - digitable_line
                          - url
                          - expiration_date
                          - instructions
                          - receipt_url
                        additionalProperties: false
                      currency:
                        type: string
                        enum:
                          - ARS
                          - BOB
                          - BRL
                          - CLP
                          - COP
                          - CRC
                          - GTQ
                          - MXN
                          - PYG
                          - PEN
                          - USD
                          - UYU
                        description: Currency of the transaction.
                        default: BRL
                      buyer:
                        type: object
                        properties:
                          id:
                            type: string
                            description: Unique identifier of the buyer.
                            format: uuid
                          name:
                            type: string
                            description: Full name of the buyer.
                          email:
                            type: string
                            format: email
                            pattern: >-
                              ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                            description: Email address of the buyer.
                          phone:
                            type: string
                            description: Phone number of the buyer.
                          birth_date:
                            type: string
                            description: Birth date of the buyer.
                          document:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - DNI
                                  - CUIT
                                  - CI
                                  - CE
                                  - NIT
                                  - CPF
                                  - CNPJ
                                  - RUT
                                  - RUN
                                  - CC
                                  - CDI
                                  - PP
                                  - RUC
                                  - PAS
                                  - DPI
                                  - CUI
                                  - RFC
                                  - CURP
                              number:
                                type: string
                            required:
                              - type
                              - number
                            additionalProperties: false
                            description: Buyer document information.
                          address:
                            type: object
                            properties:
                              street:
                                type: string
                                minLength: 1
                              number:
                                type: string
                              complement:
                                nullable: true
                                type: string
                              neighborhood:
                                type: string
                              city:
                                type: string
                                minLength: 1
                              state:
                                type: string
                                minLength: 2
                                maxLength: 3
                                pattern: ^[\p{L}\p{N}]{2,3}$
                              zipCode:
                                type: string
                              country:
                                default: BR
                                type: string
                                enum:
                                  - AR
                                  - BO
                                  - BR
                                  - CL
                                  - CO
                                  - CR
                                  - EC
                                  - GT
                                  - MX
                                  - PA
                                  - PY
                                  - PE
                                  - UY
                            required:
                              - street
                              - city
                              - country
                            additionalProperties: false
                            description: Buyer billing or shipping address.
                        required:
                          - id
                          - name
                          - email
                          - phone
                          - birth_date
                          - document
                          - address
                        additionalProperties: false
                        description: Buyer details associated with the transaction.
                      external_ref:
                        nullable: true
                        description: External reference originally provided by your system.
                        type: string
                      fee:
                        type: object
                        properties:
                          net_amount:
                            type: integer
                            minimum: 0
                            maximum: 100000000
                            description: >-
                              Net amount in cents that will be settled after
                              fees.
                          estimated_fee:
                            type: integer
                            minimum: 0
                            maximum: 100000000
                            description: >-
                              Estimated processing fee in cents for this
                              transaction.
                        required:
                          - net_amount
                          - estimated_fee
                        additionalProperties: false
                        description: Fee breakdown for the transaction.
                      installments:
                        nullable: true
                        description: >-
                          Number of installments for the transaction, if
                          applicable.
                        type: integer
                        minimum: 1
                        maximum: 12
                      informations:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                              description: Key of the additional information entry.
                            value:
                              type: string
                              description: Value of the additional information entry.
                          required:
                            - key
                            - value
                          additionalProperties: false
                        description: >-
                          Additional information entries returned by the
                          processor or gateway.
                      paid_amount:
                        type: integer
                        minimum: 0
                        maximum: 100000000
                        description: Total amount in cents that has been paid.
                      paid_at:
                        nullable: true
                        description: >-
                          Timestamp of when the transaction was paid, if
                          applicable.
                        type: string
                        format: date-time
                      method:
                        type: string
                        enum:
                          - pix
                          - voucher
                          - credit_card
                        description: Payment method actually used in the transaction.
                        default: pix
                      pix:
                        nullable: true
                        description: PIX payment details when the method is PIX.
                        type: object
                        properties:
                          qr_code:
                            type: string
                            description: PIX QR code payload for payment.
                          expiration_date:
                            description: PIX QR code expiration date.
                            type: string
                            format: date-time
                          end_to_end_id:
                            nullable: true
                            description: >-
                              End-to-end identifier assigned to the PIX payment,
                              when available.
                            type: string
                          receipt_url:
                            nullable: true
                            description: >-
                              URL to access the PIX payment receipt, when
                              available.
                            type: string
                        required:
                          - qr_code
                          - expiration_date
                          - end_to_end_id
                          - receipt_url
                        additionalProperties: false
                      refunded_amount:
                        type: integer
                        minimum: 0
                        maximum: 100000000
                        description: Total refunded amount in cents for this transaction.
                      products:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              maxLength: 255
                              description: Product name or title.
                            price:
                              type: integer
                              minimum: 0
                              maximum: 100000000
                              description: Unit price in cents for the product.
                            quantity:
                              type: integer
                              minimum: 1
                              maximum: 999999
                              description: Quantity of this product.
                          required:
                            - name
                            - price
                            - quantity
                          additionalProperties: false
                        description: List of products included in the transaction.
                      metadata:
                        nullable: true
                        description: >-
                          Arbitrary key-value metadata associated with the
                          transaction.
                        type: object
                        additionalProperties:
                          type: string
                      traceable:
                        type: boolean
                        description: Indicates whether the transaction is traceable.
                      ip_address:
                        nullable: true
                        description: IPv4 or IPv6 address associated with the transaction.
                        anyOf:
                          - type: string
                            format: ipv4
                            pattern: >-
                              ^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$
                          - type: string
                            format: ipv6
                            pattern: >-
                              ^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$
                      splits:
                        type: array
                        items:
                          type: object
                          properties:
                            recipient_id:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                              description: Identifier of the split recipient.
                            amount:
                              type: integer
                              minimum: 1
                              maximum: 100000000
                              description: >-
                                Split amount in cents to allocate to the
                                recipient.
                            charge_processing_fee:
                              default: true
                              description: >-
                                Indicates if processing fees are charged to this
                                recipient.
                              type: boolean
                          required:
                            - recipient_id
                            - amount
                            - charge_processing_fee
                          additionalProperties: false
                        description: Revenue split configuration for this transaction.
                      status:
                        type: string
                        enum:
                          - authorized
                          - canceled
                          - captured
                          - chargedback
                          - three_ds_required
                          - expired
                          - in_protest
                          - paid
                          - partially_paid
                          - partially_refunded
                          - pending
                          - processing
                          - processed
                          - refunded
                          - med
                          - refused
                        description: Current external status of the transaction.
                      next_action:
                        nullable: true
                        description: >-
                          Next action required to complete the transaction, such
                          as 3DS authentication.
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - three_ds_challenge
                            description: The type of next action required.
                          challenge_session_id:
                            type: string
                            description: Challenge session identifier for 3DS resolution.
                          client_secret:
                            type: string
                            description: Client secret for SDK polling authentication.
                          expires_at:
                            description: Expiration timestamp for the challenge session.
                            type: string
                            format: date-time
                        required:
                          - type
                          - challenge_session_id
                          - client_secret
                          - expires_at
                        additionalProperties: false
                      created_at:
                        description: Date and time when the transaction was created.
                        type: string
                        format: date-time
                      updated_at:
                        description: Date and time when the transaction was last updated.
                        type: string
                        format: date-time
                    required:
                      - id
                      - amount
                      - currency
                      - buyer
                      - fee
                      - informations
                      - paid_amount
                      - method
                      - refunded_amount
                      - products
                      - traceable
                      - splits
                      - status
                      - created_at
                      - updated_at
                    additionalProperties: false
                required:
                  - success
                  - requestId
                  - data
                additionalProperties: false
        '422':
          description: Validation error (RFC 7807)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        default:
          description: RFC 7807 Problem Details error response
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
        - BasicAuth: []
components:
  schemas:
    ValidationProblemDetails:
      allOf:
        - $ref: '#/components/schemas/ProblemDetails'
        - type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
                  code:
                    type: string
                additionalProperties: true
          additionalProperties: true
    ProblemDetails:
      type: object
      description: RFC 7807 Problem Details object.
      properties:
        type:
          type: string
          format: uri-reference
        title:
          type: string
        status:
          type: number
        detail:
          type: string
        instance:
          type: string
          format: uri-reference
      required:
        - type
        - title
        - status
        - detail
      additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apiKey
    BasicAuth:
      type: http
      scheme: basic
      description: Use Basic auth with username `token` and password `x`.

````