Assinaturas

Listar Assinaturas

GET/v1/subscriptions
Base URL Produção:https://api.validapay.com.br
Base URL Sandbox:https://sandbox.validapay.com.br

Autenticação

bearerAuthorizationstring · header · obrigatório

Envie no header:

Authorization: Bearer {{token}}

Lista todas as assinaturas com filtros por status, cliente e plano.

Listar assinaturas

Scopes: subscriptions/read

const url = 'https://sandbox.validapay.com.br/v1/subscriptions?limit=15&lastKey=&startDate=&endDate=&status=&search=&document=&paymentMethod=&priceId=&productId=';

const options = {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer {{token}}'
  },
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));

Response Examples

200200
{
  "items": [
    {
      "subscriptionId": "sub_xxx",
      "status": "ACTIVE",
      "interval": "MONTHLY",
      "billingDay": 15,
      "currentCycleNumber": 3,
      "currentCycleAmount": 99.9,
      "nextCycleChargeDate": "2024-02-15",
      "customer": {
        "customerId": "cus_xxx",
        "name": "João Silva",
        "email": "joao@email.com"
      },
      "lastCharge": {
        "netAmount": 98.91,
        "status": "PAID"
      }
    }
  ],
  "pagination": {
    "total": 50,
    "hasMore": true,
    "lastKey": "eyJ..."
  }
}