> ## Documentation Index
> Fetch the complete documentation index at: https://dev.valorapayments.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Valora Payments API (Brazil: Pix, card, boleto). Base URL https://api.valorapayments.com.br, Authorization: Bearer sk_vl_... used only on the server. Request amounts are reais as strings ("149.90"); response amounts are integer cents (14990). Use POST /v1/checkouts for card and boleto; POST /v1/payments only creates Pix and should send an Idempotency-Key. Confirm payments only through the payment.succeeded webhook after verifying X-Valora-Signature (hex HMAC-SHA256 of "<t>.<raw body>"), dedupe by event.id and check livemode. Never invent endpoints or fields: check /llms.txt and /openapi.json.

# Paginação

> Percorra listas com cursor usando limit e starting_after.

As rotas de lista (`GET /v1/payments`, `GET /v1/customers`, `GET /v1/products`, `GET /v1/webhooks/{endpoint_id}/deliveries`) devolvem os itens do mais novo para o mais antigo, em páginas.

## Parâmetros

| Parâmetro | Descrição |
| - | - |
| `limit` | itens por página, de 1 a 100. Padrão: 20 |
| `starting_after` | o `next_cursor` da página anterior |

## Resposta

```json theme={null}
{
  "object": "list",
  "data": [{ "id": "pay_...", "object": "payment" }],
  "has_more": true,
  "next_cursor": "eyJ0IjoxNzYzMTMyOTMxMDAwLCJpZCI6InBheV8uLi4ifQ"
}
```

Enquanto `has_more` for `true`, peça a próxima página passando `next_cursor` em `starting_after`.

```js theme={null}
let cursor = null;
do {
  const url = new URL("https://api.valorapayments.com.br/v1/payments");
  url.searchParams.set("limit", "100");
  url.searchParams.set("status", "succeeded");
  if (cursor) url.searchParams.set("starting_after", cursor);

  const page = await fetch(url, { headers: { Authorization: `Bearer ${process.env.VALORA_API_KEY}` } }).then((r) => r.json());
  for (const payment of page.data) {
    // processe o pagamento
  }
  cursor = page.has_more ? page.next_cursor : null;
} while (cursor);
```

> [!NOTE]
>
> O cursor é opaco: não monte nem altere. Mantenha os mesmos filtros entre as páginas.


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