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

# Listar assinaturas

> Lista as assinaturas da conta, da mais nova para a mais antiga

Lista as assinaturas da conta, da mais nova para a mais antiga, com filtros opcionais.

Permissão: `subscription.read`. Apenas chave secreta (`sk_…`).

> [!NOTE]
>
> Os exemplos usam o sandbox (`https://api.upag.dev/v1`). Em produção use `https://api.upag.io/v1` com `sk_live_…`.

## Endpoint

```bash cURL theme={null}
curl -G https://api.upag.dev/v1/subscriptions \
  -H "Authorization: Bearer sk_test_your_api_key" \
  -d "status=active" \
  -d "customer=8c1f0a26-5d3b-4f1e-9c72-1a4e6b9d0f83" \
  -d "page=1" \
  -d "limit=15"
```

```javascript Node.js SDK theme={null}
import { Upag } from 'upag';

const upag = new Upag('sk_test_your_api_key');

const { data, count } = await upag.subscriptions.list({
  status: 'active',
  customer: '8c1f0a26-5d3b-4f1e-9c72-1a4e6b9d0f83',
  page: 1,
  limit: 15,
});
```

## Query

**status** `string`

Filtra por status: `active`, `canceled`, `past_due`, `trialing`, `incomplete`, `paused` ou `void`.

**customer** `string (uuid)`

Filtra pelas assinaturas de um cliente.

**cancelAtPeriodEnd** `boolean`

`true` ou `false`: filtra as que vão (ou não) cancelar no fim do período.

**id** `string (uuid)`

Filtra por um ID específico.

**page** `integer` (default: 1)

Página, a partir de 1.

**limit** `integer` (default: 15)

Itens por página, mínimo 1.

## Resposta

`200 OK`. `count` é o total de assinaturas que batem com o filtro, não o tamanho da página.

```json Response theme={null}
{
  "data": [
    {
      "id": "9a3c6e1f-0d58-4b72-a4e9-7c2f8b5d1e36",
      "customer": "8c1f0a26-5d3b-4f1e-9c72-1a4e6b9d0f83",
      "paymentMethod": "card",
      "card": "5f0c3d1a-7b2e-4c9d-8a41-0e6f2b9d7c15",
      "status": "active",
      "currency": "brl",
      "interval": "month",
      "intervalCount": 1,
      "cancelAtPeriodEnd": false,
      "startDate": "2026-10-07T19:00:00.000Z",
      "endDate": null,
      "trialStartDate": null,
      "trialEndDate": null,
      "trialEndBehavior": null,
      "currentPeriodStart": "2026-10-07T19:00:00.000Z",
      "currentPeriodEnd": "2026-11-07T19:00:00.000Z",
      "canceledAt": null,
      "cancellationReason": null,
      "items": [
        {
          "id": "c6d2f9a4-7e18-4b35-9a60-3f1e8d5b2c07",
          "product": "7d2b5e90-1c34-4a68-b9f7-0e3a6c8d1f25",
          "price": "3a7e9c14-6b2d-4f85-9e10-5c8d2a7b4f61",
          "name": "Plano mensal",
          "amount": 9900,
          "quantity": 1,
          "totalAmount": 9900,
          "createdAt": "2026-10-07T19:00:00.000Z",
          "updatedAt": "2026-10-07T19:00:00.000Z"
        }
      ],
      "createdAt": "2026-10-07T19:00:00.000Z",
      "updatedAt": "2026-10-07T19:00:05.000Z"
    }
  ],
  "count": 1
}
```

Cada item tem o mesmo formato do [objeto assinatura](https://docs.upag.io/pages/subscriptions/reference.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.