> ## 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.

# Balance

> Returns the available and pending balance in BRL and USD, in cents.

#### Scope

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

## What it does

Returns the available and pending balance in BRL and USD, in cents.

## Use cases

* Show the balance on your dashboard
* Decide when to request a withdrawal

## Response

**data** `object[]`

**campos**

**currency** `string`

Currency: `BRL` or `USD`.

**available\_cents** `integer`

Available for withdrawal, in cents.

**pending\_cents** `integer`

Still clearing, in cents.

## Errors

| Status | Description |
| - | - |
| `401` | Invalid or revoked key. |
| `403` | Missing scopes (`insufficient_scope`). |
| `429` | Rate limit (`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.