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

# Saldo

> Retorna o saldo disponível e o pendente em BRL e USD, em centavos.

#### Escopo

```bash theme={null}
read withdrawals_read
```

## O que faz

Retorna o saldo disponível e o pendente em BRL e USD, em centavos.

## Casos de uso

* Mostrar o saldo no seu painel
* Decidir quando pedir um saque

## Resposta

**data** `object[]`

**campos**

**currency** `string`

Moeda: `BRL` ou `USD`.

**available\_cents** `integer`

Disponível para saque, em centavos.

**pending\_cents** `integer`

Ainda liberando, em centavos.

## Erros

| Status | Descrição |
| - | - |
| `401` | Chave inválida ou revogada. |
| `403` | Faltam escopos (`insufficient_scope`). |
| `429` | Limite de requisições (`rate_limited`). |

```bash cURL theme={null}
curl --request GET \
  --url https://ucsyxzpdbnuyehizezvb.supabase.co/functions/v1/doglytdc-pay/v1/balance \
  -u "$DPAY_CLIENT_ID:$DPAY_CLIENT_SECRET"
```

```json 200 theme={null}
{
  "data": [
    {
      "currency": "BRL",
      "available_cents": 125000,
      "pending_cents": 3000
    }
  ]
}
```

```json 401 theme={null}
{ "error": "unauthorized", "message": "Chave de API inválida." }
```

```json 403 theme={null}
{ "error": "insufficient_scope", "message": "Esta chave precisa dos escopos: read, withdrawals_read." }
```


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