Assinaturas
Listar assinaturas
GET /v1/subscriptions
GET /v1/subscriptions
Retorna uma lista paginada de assinaturas. Cada item de data é o objeto completo da assinatura
(mesma estrutura de Consultar), apenas sem os _links por item.
Requisição
curl -X GET "https://api.selectwin.io/v1/subscriptions?limit=20&offset=0&sort=descending" \
-H "SelectKey: sk_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ"Parâmetros de consulta
| Parâmetro | Tipo | Padrão | Descrição |
|---|---|---|---|
limit | integer | 20 | Itens por página (máx. 100) |
offset | integer | 0 | Deslocamento inicial |
sort | string | descending | Ordenação por data de criação |
status | string | — | Filtra por status (active, trialing, pending, paused, pastdue, unpaid, canceled) |
customerId (ou customerid) | string | — | Filtra por cliente (cus_...) |
externalreference | string | — | Filtra pela referência externa |
Veja Paginação para a estrutura completa de paginação.
Resposta 200 OK
{
"offset": 0,
"limit": 20,
"total": 50,
"hasMore": true,
"page": { "current": 1, "total": 3, "offset": { "first": 0, "prev": null, "next": 20, "last": 40 } },
"data": [
{
"id": "subs_01hqzvabc",
"status": "active",
"currency": "BRL",
"method": "credit",
"type": "recurring",
"currentCycle": {
"id": "scy_01hqzvabc",
"cycle": 1,
"status": "paid",
"startDate": "2026-04-01T00:00:00.000Z",
"endDate": "2026-05-01T00:00:00.000Z",
"dueDate": "2026-04-01T00:00:00.000Z",
"billedAt": "2026-04-01T10:15:00.000Z",
"updatedAt": "2026-04-01T10:15:00.000Z",
"createdAt": "2026-04-01T00:00:00.000Z"
},
"customer": { "id": "cus_01hqzvabc", "firstName": "João", "lastName": "Silva", "email": "[email protected]" },
"billing": { "frequency": "monthly", "frequencyCount": 1, "endDate": null, "exactDay": null, "freeTrialDays": null, "address": { "city": "São Paulo", "state": "SP", "country": "BR" } },
"discount": null,
"discounts": null,
"shippable": false,
"shipping": null,
"spplited": false,
"splits": null,
"items": [
{ "id": "sit_01hqzvabc", "name": "Premium Plan", "enabled": true, "pricingSchema": "recurring", "unitPrice": 9900, "quantity": 1, "currency": "BRL" }
],
"callback": null,
"geolocation": null,
"externalReference": "ORDER-123",
"metadata": { "campaign": "launch" },
"createdAt": "2026-04-12T17:56:33.000Z",
"updatedAt": "2026-04-12T17:56:33.000Z"
}
],
"merchant": { "name": "Seller Name", "merchantId": "bus_1234567890", "isSubAccount": false },
"_links": {
"self": { "href": "https://api.selectwin.io/v1/subscriptions", "method": "GET", "description": "List all subscriptions." },
"create": { "href": "https://api.selectwin.io/v1/subscriptions", "method": "POST", "description": "Create a new subscription." }
}
}Os itens da lista carregam a mesma estrutura completa de Consultar (com
currentCycle,billing,items,customer), apenas sem o bloco_linkspor item.
How is this guide?