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

# Wallet and pricing

> Check your balance and how your SMS price is worked out before a big send.

Messaly is pay as you go. Every message is paid from your wallet as it's sent, and failed SMS are refunded automatically. Top up in the dashboard under **Billing → Wallet**.

## Balance

[`GET /balance`](https://docs.telaven.com/api-reference/account/get-balance) returns your balance and how many SMS it covers at your current price:

```json theme={null}
{
  "success": true,
  "data": {
    "balanceKes": "14437.50",
    "totalLoadedKes": "15000.00",
    "totalSpentKes": "562.50",
    "smsRateKes": "0.90",
    "smsSendable": 16041
  }
}
```

## Your SMS price

[`GET /wallet`](https://docs.telaven.com/api-reference/account/get-wallet-and-pricing) also explains your price:

```json theme={null}
{
  "success": true,
  "pricing": {
    "source": "tier",
    "defaultRateCents": 90,
    "topups30dCents": 6000000,
    "tier": { "label": "Growth", "minTopup30dCents": 5000000, "rateCents": 80 },
    "nextTier": { "label": "Scale", "minTopup30dCents": 10000000, "rateCents": 70 }
  }
}
```

`source` is where your price comes from: `custom` (a price agreed for your account), `tier` (a volume tier, based on what you've topped up in the last 30 days) or `default` (the standard price). `nextTier` shows how much more you'd need to top up for a lower price.

> [!NOTE]
>
> The figures above are examples. Always read your price from the API instead of hard-coding it.

## Running low

Sends that your wallet can't cover return `402` with `code: "INSUFFICIENT_BALANCE"`. A `wallet.topup` [webhook](https://docs.telaven.com/guides/webhooks.md) tells you when a top-up has been credited.


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