PagnovoPagnovodocs

Referência da API

Buscar fatura

Retorna a Invoice completa com Customer, Subscription resumida, **lista de attempts** (tentativas de pagamento, com `amount`/`lateFeeApplied`/`interestApplied` em centavos) e as últimas 20 **notifications** enviadas.

GET/v2/invoices/:id

Autenticação

HTTP Basic Auth. Envie sua secret key no header:

Authorization: Basic {base64(secret:SUA_SECRET_KEY)}

Parâmetros

idstring (path, UUID)obrigatório

UUID da Invoice.

Exemplo: inv_111aaa

Respostas

200

Invoice encontrada com attempts e notifications. Valores em centavos.

JSON
{
  "id": "inv_111aaa",
  "status": "PAID",
  "description": "Mensalidade Setembro",
  "items": [
    { "description": "Plano Pro - Mensal", "quantity": 1, "unitPrice": 4900, "totalPrice": 4900 }
  ],
  "amount": 4900,
  "amountPaid": 4900,
  "refundedAmount": null,
  "dueDate": "2026-09-15T00:00:00.000Z",
  "expiresAt": "2026-10-15T00:00:00.000Z",
  "paidAt": "2026-09-12T14:32:00.000Z",
  "canceledAt": null,
  "refundedAt": null,
  "lateFeeType": "FIXED",
  "lateFeeValue": 500,
  "interestRatePerMonth": 100,
  "paymentMethods": ["PIX"],
  "hostedUrl": "https://checkout.pagnovo.com/i/inv_111aaa",
  "createdAt": "2026-09-01T00:00:00.000Z",
  "customer": {
    "id": "c8a5f4d2-...",
    "name": "João Silva",
    "email": "joao@exemplo.com",
    "document": "12345678901"
  },
  "subscription": {
    "id": "sub_abc123-...",
    "status": "ACTIVE",
    "currentCycle": 3,
    "maxCycles": 12,
    "offer": { "id": "off_xyz789", "name": "Mensal" }
  },
  "attempts": [
    {
      "id": "att_001",
      "status": "APPROVED",
      "paymentMethod": "PIX",
      "amount": 4900,
      "lateFeeApplied": null,
      "interestApplied": null,
      "transactionId": "1234567",
      "pixCode": "00020126580014br.gov.bcb.pix...",
      "pixExpiresAt": "2026-09-12T15:32:00.000Z",
      "approvedAt": "2026-09-12T14:32:00.000Z",
      "rejectedAt": null,
      "expiredAt": null,
      "failureReason": null,
      "createdAt": "2026-09-12T14:25:00.000Z",
      "ipAddress": "201.23.45.67",
      "userAgent": "Mozilla/5.0..."
    }
  ],
  "notifications": [
    {
      "id": "notif_001",
      "type": "INVOICE_CREATED",
      "channel": "EMAIL",
      "recipient": "joao@exemplo.com",
      "status": "SENT",
      "sentAt": "2026-09-01T00:00:05.000Z",
      "failedAt": null,
      "errorMessage": null,
      "createdAt": "2026-09-01T00:00:00.000Z"
    }
  ]
}
404

Invoice não encontrada.

JSON
{ "status": 404, "error": "Invoice nao encontrada" }

Exemplos

cURL
curl -X GET "https://api.pagnovo.com/v2/invoices/inv_111aaa" \
  -H "Authorization: Basic $(echo -n 'secret:SUA_SECRET_KEY' | base64)"