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

# Listar / Filtrar

> Liste seus links de pagamento ou consulte um link pelo id.

## Listar

```
GET /v1/payment-links
```

```bash theme={null}
curl 'https://api.nasten.net/v1/payment-links?page=1&pageSize=20&pricingType=recurring' \
  -H 'Authorization: Bearer <seu_token>'
```

Os links vêm do mais novo para o mais antigo. O link do "Pagar membro" (tela Equipe do painel) não aparece.

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

Página, a partir de 1.

**pageSize** `integer` (default: 20)

Links por página, de 1 a 100.

**productId** `string`

Só os links ligados a este produto. Precisa estar no formato de id da Nasten (cuid), senão `400` `Produto inválido`.

**pricingType** `string`

Só os links deste tipo: `free`, `one_time` ou `recurring`.

### Resposta `200`

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "clpaylink1234567890abcdef",
      "name": "Clube mensal",
      "imageUrl": null,
      "createdAt": "2026-10-06T14:30:00.000Z",
      "paymentMethods": ["credit_card"],
      "amount": 4990,
      "status": "approved",
      "productId": null,
      "title": null,
      "description": null,
      "checkoutStyle": null,
      "product": null,
      "externalReference": null,
      "pricingType": "recurring",
      "recurringInterval": "monthly",
      "initialFee": 990,
      "trialDays": 7,
      "maxCharges": null,
      "cancelDiscountPercent": 30,
      "cancelDiscountIntervals": 3,
      "accessDays": null,
      "waitlistEnabled": false,
      "questions": []
    }
  ],
  "totalRows": 7,
  "page": 1,
  "pageSize": 20
}
```

Cada item traz os campos do [objeto Link](https://nasten.mintlify.site/pages/payment/reference.md#atributos), **menos** `companyId`, `returnUrl`, `updatedAt`, `interestPassthrough`, `allowedDoubleCard` e `allowedCardPix`. Para esses, consulte o link pelo id.

| Campo | Descrição |
| - | - |
| `totalRows` | Total de links do filtro |
| `page`, `pageSize` | A página e o tamanho usados |

| Status do link | Significado |
| - | - |
| `approved` | Ativo: a página aceita pagamentos |
| `cancelled` | Desativado: a página não abre |

## Consultar um link

```
GET /v1/payment-links/{paymentLinkId}
```

```bash theme={null}
curl 'https://api.nasten.net/v1/payment-links/clpaylink1234567890abcdef' \
  -H 'Authorization: Bearer <seu_token>'
```

**paymentLinkId** `string` *required*

Id do link. Fora do formato de id da Nasten (cuid) responde `400`.

### Resposta `200`

```json theme={null}
{
  "success": true,
  "data": {
    "id": "clpaylink1234567890abcdef",
    "companyId": "clcompany1234567890abcdef",
    "name": "Pedido 1042",
    "imageUrl": null,
    "createdAt": "2026-10-06T14:30:00.000Z",
    "paymentMethods": ["pix", "credit_card"],
    "amount": 50000,
    "status": "approved",
    "productId": null,
    "title": null,
    "description": null,
    "checkoutStyle": null,
    "product": null,
    "externalReference": "pedido-1042",
    "pricingType": "one_time",
    "recurringInterval": null,
    "initialFee": null,
    "trialDays": null,
    "maxCharges": null,
    "cancelDiscountPercent": null,
    "cancelDiscountIntervals": null,
    "accessDays": null,
    "waitlistEnabled": false,
    "questions": [],
    "returnUrl": "https://seusite.com.br/obrigado?pedido=1042",
    "updatedAt": "2026-10-06T14:30:00.000Z",
    "interestPassthrough": false,
    "allowedDoubleCard": true,
    "allowedCardPix": false
  }
}
```

| Status | Mensagem | Causa |
| - | - | - |
| `400` | Mensagem de validação | Id fora do formato |
| `401` | Mensagens do token | Token ausente, vencido ou revogado |
| `404` | `Link de pagamento não encontrado` | Link inexistente, de outra empresa ou do "Pagar membro" |

## Vendas de um link

Cada pagamento gera uma venda própria, que aparece na [listagem de transações](https://nasten.mintlify.site/pages/transactions/get.md) com `paymentLink: { "id", "externalReference" }`. A listagem não tem filtro por link: identifique as vendas pelo `paymentLink.id` ou pelo `externalReference`.


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