<!-- Fonte: https://docs.onzepay.com/api/pix-recebidos -->
# Pix recebidos

Cada cobrança paga gera um Pix recebido (`pxi_…`) com o `endToEndId` do arranjo, o valor, a tarifa e o líquido creditado. Webhook: `pix.in.received`.

## Listar Pix recebidos

`GET https://api.onzepay.com/v1/pix-in`

Escopo: `charges.read`.

**Query**

| Campo | Tipo | Descrição |
|---|---|---|
| `endToEndId` | string | E2E do Pix. |
| `externalId` | string | O `externalId` da cobrança. |
| `chargeId` | string | Id da cobrança (`chg_…`). |
| `from` | string (date-time) | Pagos a partir de (ISO 8601 UTC). |
| `to` | string (date-time) | Pagos até (ISO 8601 UTC). |
| `limit` | integer | Itens por página. Padrão 25, máximo 100. |
| `startingAfter` | string | Cursor: o `id` (`pxi_…`) do último item da página anterior. |

:::tabs
```bash title="curl"
curl -X GET "$ONZEPAY_API/v1/pix-in?from=2026-11-01T00%3A00%3A00.000Z&limit=50" \
  -H "Authorization: Bearer $ONZEPAY_SECRET_KEY"
```
```javascript title="Node.js"
const res = await fetch(`${process.env.ONZEPAY_API}/v1/pix-in?from=2026-11-01T00%3A00%3A00.000Z&limit=50`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.ONZEPAY_SECRET_KEY}`
  }
})
const data = await res.json()
if (!res.ok) throw new Error(`${data.code}: ${data.message}`)
```
```python title="Python"
import os
import requests

res = requests.get(
    f"{os.environ['ONZEPAY_API']}/v1/pix-in?from=2026-11-01T00%3A00%3A00.000Z&limit=50",
    headers={"Authorization": f"Bearer {os.environ['ONZEPAY_SECRET_KEY']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()
```
:::

**Resposta `200`**

```json
{
  "data": [
    {
      "id": "pxi_034yDKu1QwzR8mJb3XyTnE",
      "chargeId": "chg_034yDKstyRbto2AiOEPZJP",
      "externalId": "order-4821",
      "endToEndId": "E18236120202611152100abcdef123456",
      "amount": 3000,
      "feeAmount": 30,
      "netAmount": 2970,
      "status": "paid",
      "paidAt": "2026-11-15T21:05:00.000Z"
    }
  ],
  "hasMore": true,
  "nextCursor": "pxi_034yDKu1QwzR8mJb3XyTnE"
}
```
