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

# Consultar uma cobrança

> Consulta uma cobrança específica pelo ID. Exige o escopo `pix:read`.

<Note>
  Exige uma chave de API com o escopo `pix:read`. Use este endpoint para confirmar o status de uma cobrança específica pelo `id` retornado na criação.
</Note>


## OpenAPI

````yaml GET /v1/public/pix/charges/{chargeId}
openapi: 3.1.0
info:
  title: ZynPay Public API
  version: '1.0'
  description: >
    API pública da ZynPay para gerar cobranças Pix e consultar saldo com uma
    chave de API.

    Todo valor monetário é um inteiro em centavos (R$ 10,00 = `1000`).
  license:
    name: Proprietary
servers:
  - url: https://api.zynpay.com.br
security:
  - apiKeyAuth: []
tags:
  - name: Cobranças
    description: Criar e consultar cobranças Pix
  - name: Saldo
    description: Consultar o saldo da conta
paths:
  /v1/public/pix/charges/{chargeId}:
    get:
      tags:
        - Cobranças
      summary: Consultar uma cobrança
      description: Consulta uma cobrança específica pelo ID. Exige o escopo `pix:read`.
      operationId: getCharge
      parameters:
        - in: path
          name: chargeId
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Cobrança encontrada
          content:
            application/json:
              schema:
                type: object
                properties:
                  charge:
                    $ref: '#/components/schemas/PixCharge'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Cobrança não encontrada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    PixCharge:
      type: object
      required:
        - id
        - merchantId
        - status
        - amountCents
        - feeCents
        - netAmountCents
        - provider
        - createdAt
      properties:
        id:
          type: string
          format: uuid
          description: ID único da cobrança na ZynPay.
        merchantId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - created
            - pending
            - paid
            - expired
            - cancelled
            - failed
            - refunded
          description: Veja o ciclo de vida completo em /cobrancas/ciclo-de-vida.
        origin:
          type: string
          enum:
            - public_api
            - dashboard
            - wallet_deposit
          description: Como a cobrança foi criada.
        amountCents:
          type: integer
          description: Valor bruto da cobrança
          em centavos.: null
        feeCents:
          type: integer
          description: Taxa cobrada
          em centavos.: null
        netAmountCents:
          type: integer
          description: amountCents - feeCents. Valor creditado no saldo quando pago.
        provider:
          type: string
          description: Provedor Pix que processou a cobrança.
        providerPaymentId:
          type:
            - string
            - 'null'
        publicToken:
          type: string
          description: Token usado no link de checkout público.
        idempotencyKey:
          type: string
          description: 'Uso interno: a Idempotency-Key enviada na criação.'
        externalReference:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        customer:
          type:
            - object
            - 'null'
          properties:
            name:
              type: string
            email:
              type: string
            externalId:
              type: string
        pixBrCode:
          type:
            - string
            - 'null'
          description: Código "Pix Copia e Cola".
        pixQrCodeImage:
          type:
            - string
            - 'null'
          description: Imagem do QR Code
          em base64.: null
        feeSnapshot:
          type: object
          description: 'Uso interno: perfil de tarifa aplicado no momento da criação.'
        metadata:
          type: object
          description: Uso interno.
        expiresAt:
          type:
            - string
            - 'null'
          format: date-time
        paidAt:
          type:
            - string
            - 'null'
          format: date-time
        cancelledAt:
          type:
            - string
            - 'null'
          format: date-time
        nextReconciliationAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Uso interno.
        reconciliationAttempts:
          type: integer
          description: Uso interno.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - requestId
          properties:
            code:
              type: string
              example: ACCOUNT_NOT_VERIFIED
            message:
              type: string
            fields:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
            requestId:
              type: string
  responses:
    Unauthorized:
      description: Chave de API ausente, inválida, revogada ou expirada
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: Conta não verificada, ou a chave não tem o escopo necessário
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: zpk_live_...
      description: Chave de API criada em Integrações → Chaves de API no painel.

````