> ## 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.

# Get Transaction

> Returns the details of a specific transaction by its ID.

**Required permission:** `TRANSACTION:READ` or `FULL_ACCESS`



## OpenAPI

````yaml openapi.en.json GET /transactions/{id}
openapi: 3.0.0
info:
  title: pague.dev API
  description: pague.dev Payment API documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api-gateway.pague.dev/v2
security: []
paths:
  /transactions/{id}:
    get:
      tags:
        - External API - Transactions
      summary: Get transaction by ID
      description: |-
        Returns the details of a specific transaction by its ID.

        **Required permission:** `TRANSACTION:READ` or `FULL_ACCESS`
      operationId: ExternalTransactionsController_getTransaction
      parameters:
        - name: id
          required: true
          in: path
          description: >-
            Transaction ID (UUID), your external_reference, or the
            Idempotency-Key used on creation. Resolved in that order. A
            withdrawal still processing (no transaction yet) is also resolved by
            any of these.
          schema:
            type: string
        - $ref: '#/components/parameters/SubAccount'
      responses:
        '200':
          description: Transaction details
          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:
  parameters:
    SubAccount:
      name: X-Sub-Account
      in: header
      required: false
      description: >-
        Reference of the sub-account the operation runs against. When omitted,
        the operation happens on the main account; the reserved value
        `principal` also resolves to the main account and is equivalent to
        omitting the header. Accepted on every endpoint except `POST /auth` and
        the `/sub-accounts` endpoints themselves, which always operate on the
        main account.


        Possible errors: `404 SUB_ACCOUNT_NOT_FOUND`, `403
        SUB_ACCOUNT_FORBIDDEN`, `403 SUB_ACCOUNT_SUSPENDED`.


        Requires the credential to have **sub-account access** enabled (Settings
        → Integration → API Credentials). It starts turned off and is not
        replaced by any permission, not even `FULL_ACCESS`: without it the
        response is `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: Transaction ID
          format: uuid
        status:
          type: string
          description: Transaction status
          enum:
            - pending
            - completed
            - failed
            - cancelled
        type:
          type: string
          description: >-
            Transaction type. `internal_transfer` is a movement between accounts
            under the same ownership — an internal transfer or a split leg — and
            does not travel over PIX.
          enum:
            - payment
            - fee
            - refund
            - chargeback
            - withdrawal
            - adjustment
            - referral_commission
            - internal_transfer
        paymentMethod:
          type: string
          description: Payment method used
          enum:
            - pix
            - credit_card
            - boleto
        amount:
          type: number
          description: Amount in BRL
          example: 150.75
        currency:
          type: string
          description: Currency code
          example: BRL
        description:
          type: string
          description: Transaction description
        externalReference:
          type: string
          description: Your external reference ID
          example: pedido-12345
        customerId:
          type: string
          description: Client ID
          format: uuid
        projectId:
          type: string
          description: Project ID
          format: uuid
        metadata:
          type: object
          description: Custom metadata (key-value pairs)
          additionalProperties: true
          example:
            orderId: '12345'
            source: website
        pixCopyPaste:
          type: string
          description: PIX copy-and-paste code (only for pending PIX transactions)
          example: 00020126580014br.gov.bcb.pix0136a1b2c3d4-e5f6-7890-abcd-ef1234567890
        expiresAt:
          type: string
          description: Expiration date (only for pending transactions)
          format: date-time
        paidAt:
          type: string
          description: Date the transaction was paid
          format: date-time
        e2eId:
          type: string
          description: PIX network end-to-end ID (present once the PSP has confirmed)
          example: E18189547202603160145ZYFfVx3jP8D
        counterpartName:
          type: string
          description: >-
            Counterpart name as returned by the PSP (payer on cash-in, recipient
            on withdrawal)
          example: Maria Silva
        counterpartDocument:
          type: string
          description: Counterpart CPF/CNPJ, unmasked
          example: '12345678900'
        createdAt:
          type: string
          description: Creation date
          format: date-time
        updatedAt:
          type: string
          description: Last update date
          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 obtained from POST /auth (client_id + client_secret). Valid
        for 300 seconds.

````