DesenvolvedoresReferência da APIAssinaturas

Listar assinaturas

GET
/subscriptions

Assinaturas da loja, da mais recente para a mais antiga, com filtros por status, cliente e produto.

Chave: Só chave secreta (chamada pelo servidor).

Escopo: subscriptions:read.

Autorização

chaveSecreta
headerAutorizaçãoBearer <chave de API>

Chave secreta (sk_…). Use só no servidor; requisições de navegador (com Origin) são recusadas.

Parâmetros de consulta

limit?integer

Itens por página (1 a 100).

Intervalo1 <= value <= 100
Padrão20
cursor?string

Valor de meta.pagination.nextCursor da página anterior.

Tamanholength <= 200
status?string
Value in"pending""trialing""active""past_due""paused""suspended""cancelled""expired"
customerId?string
Formatouuid
productId?string
Formatouuid

Corpo da resposta

Sucesso.

application/json
  1. response
data*array<>
meta*
curl -X GET 'https://minepag.com.br/api/v1/subscriptions'
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "status": "pending",      "billingMode": "provider_managed",      "customer": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "email": "string",        "name": "string"      },      "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",      "productName": "string",      "priceId": "b245ceea-4bc7-4619-ae4c-559a1faf418e",      "priceName": "string",      "interval": "day",      "intervalCount": -9007199254740991,      "quantity": -9007199254740991,      "unitAmount": -9007199254740991,      "currency": "BRL",      "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",      "currentPeriodStart": "2019-08-24T14:15:22Z",      "currentPeriodEnd": "2019-08-24T14:15:22Z",      "nextBillingAt": "2019-08-24T14:15:22Z",      "trialEndsAt": "2019-08-24T14:15:22Z",      "cancelAtPeriodEnd": true,      "cancelledAt": "2019-08-24T14:15:22Z",      "endedAt": "2019-08-24T14:15:22Z",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "meta": {    "requestId": "string",    "pagination": {      "limit": -9007199254740991,      "hasMore": true,      "nextCursor": "string"    }  }}