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

# Retorna detalhes do pagamento

<Note>
  **🚀 API v2 (Recomendada)** - Use este endpoint para novos projetos
</Note>


## OpenAPI

````yaml /openapi/openapi-v2.json GET /payments/{paymentId}
openapi: 3.0.0
info:
  title: Documentação de API
  version: '2.0'
servers:
  - url: https://backend-pied-prod.piedadmin.com.br/api/v2
security:
  - bearerAuth: []
tags:
  - name: Request
    description: Tudo sobre orçamentos ou pedidos
  - name: Equipment
    description: Tudo sobre equipamentos
  - name: Company
    description: Tudo sobre empresas de energia
  - name: Custom Field
    description: Tudo sobre campos customizados
  - name: Payments
    description: Tudo sobre pagamentos
paths:
  /payments/{paymentId}:
    get:
      tags:
        - Payments
      summary: Retorna detalhes do pagamento
      parameters:
        - name: paymentId
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payment_v2'
        '429':
          $ref: '#/components/schemas/429'
        '500':
          $ref: '#/components/schemas/500'
      security:
        - bearerAuth: []
components:
  schemas:
    '429':
      description: >-
        hardLimit: O limite de requisições por hora foi ultrapassado. Tente
        novamente mais tarde / timeLimit: O limite de 1 minuto de processamento
        de requisição por hora foi atingido. Tente novamente mais tarde
    '500':
      description: Erro na API
    payment_v2:
      allOf:
        - $ref: '#/components/schemas/paymentBase'
        - type: object
          properties:
            total:
              type: number
            subtotal:
              type: number
    paymentBase:
      type: object
      properties:
        type:
          type: string
          enum:
            - pix
            - boleto
            - debito
            - credito
            - financiamento
            - other
        condition:
          type: object
          properties:
            name:
              type: string
              example: À vista
            quantityOfInstallments:
              type: number
              example: 1
            conditionType:
              type: string
              enum:
                - notUpdate
                - increase
                - decrease
            modifierType:
              type: string
              enum:
                - percentage
                - fixed
            value:
              type: number
              example: 10
        transactionStatus:
          type: string
          enum:
            - pending
            - pre_approved
            - approved
            - canceled
            - voided
            - failed
            - unknown
          example: pending
        transactionId:
          type: string
          example: AAABBB123AA
        authorizationNsu:
          type: string
          example: '123123'
        authorizationCode:
          type: string
          example: '123123'
        paidAt:
          type: string
          example: 2025-01-01T00:00
        creditCard:
          type: object
          properties:
            brand:
              type: string
              example: visa
            last4digits:
              type: string
              example: '1234'
            first6digits:
              type: string
              example: '123456'
            holderName:
              type: string
              example: John Doe
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````