PagnovoPagnovodocs

Referência da API

Buscar assinatura

Retorna a Subscription completa com Customer, Offer/Product vinculados, e um bloco `stats` com totais agregados de invoices: `invoicesCount`, `amountPaidTotal` (em centavos) e `openInvoices` (PENDING + OVERDUE).

GET/v2/subscriptions/: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 Subscription.

Exemplo: sub_abc123-...

Respostas

200

Subscription encontrada com stats agregados.

JSON
{
  "id": "sub_abc123-...",
  "createdByUserId": "u-1234",
  "customerId": "c8a5f4d2-...",
  "offerId": "off_xyz789",
  "status": "ACTIVE",
  "amount": 4900,
  "billingCycle": "MONTHLY",
  "billingCycleCount": 1,
  "maxCycles": 12,
  "currentCycle": 3,
  "nextBillingAt": "2026-09-01T00:00:00.000Z",
  "daysBeforeDueToBill": 5,
  "daysBeforeDueToNotify": 3,
  "paymentMethods": ["PIX"],
  "lateFeeType": "PERCENTAGE",
  "lateFeeValue": 200,
  "interestRatePerMonth": 100,
  "startedAt": "2026-06-01T00:00:00.000Z",
  "expiresAt": null,
  "pausedAt": null,
  "canceledAt": null,
  "canceledReason": null,
  "metadata": null,
  "createdAt": "2026-05-26T14:32:01.923Z",
  "updatedAt": "2026-05-26T14:32:01.923Z",
  "customer": {
    "id": "c8a5f4d2-...",
    "name": "João Silva",
    "email": "joao@exemplo.com",
    "document": "12345678901"
  },
  "offer": {
    "id": "off_xyz789",
    "name": "Mensal",
    "description": "Acesso por 1 mês",
    "deliveryPdfUrl": null,
    "product": {
      "id": "prd_111",
      "name": "Plano Pro",
      "imageUrl": "..."
    }
  },
  "stats": {
    "invoicesCount": 3,
    "amountPaidTotal": 14700,
    "openInvoices": 0
  }
}
404

Subscription não encontrada.

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

Exemplos

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