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

# Billing

> Read the workspace's credit balance, active renewals and credit history.

| Method | Path | Scope |
| - | - | - |
| `GET` | [`/credits`](#credit-overview) | `billing:read` |
| `GET` | [`/credits/ledger`](#credit-history) | `billing:read` |

Credits belong to the workspace the key was created in. Top-ups and purchases are made in the dashboard; the API reads them.

## Credit overview

`GET /credits`

```bash cURL theme={null}
curl https://api.servbase.net/credits -H "Authorization: Bearer $SERVBASE_API_KEY"
```

```python Python theme={null}
overview = requests.get(
    "https://api.servbase.net/credits",
    headers={"Authorization": f"Bearer {API_KEY}"},
    timeout=30,
).json()
if overview["balance"] < overview["monthly_commitment"]:
    print("Top up before the next renewals")
```

```json Response theme={null}
{
  "balance": 42.5,
  "php_per_credit": 1,
  "min_topup_credits": 100,
  "topup_bonus_rules": [{ "min_credits": 1000, "bonus_credits": 100 }],
  "payment_providers": { "paymongo": true, "paypal": true },
  "monthly_commitment": 29.98,
  "subscriptions": [
    { "uid": "5e0d7a13-...", "kind": "app", "item_slug": "starter", "item_name": "Starter", "status": "active", "auto_renew": true, "renewal_credits": 14.99, "period_end": "2026-12-02T03:11:45" }
  ],
  "lifecycle": { "disable_after_days": 10, "deletion_after_days": 20, "warning_days_before_deletion": 3, "reminder_days_before_renewal": 1 }
}
```

| Field | Meaning |
| - | - |
| `balance` | Credits available in the workspace |
| `monthly_commitment` | Credits that active, auto-renewing items will use at their next renewals |
| `subscriptions` | Tiers (`kind` `app`) and add-ons (`kind` `addon`) with their status, renewal price (`renewal_credits`) and the end of the paid period (`period_end`) |
| `lifecycle` | What happens to unpaid apps. See [Billing and renewals](https://docs.servbase.net/operations/billing-and-renewals.md). |

## Credit history

`GET /credits/ledger`

**page** `integer` (default: 1)

Page number, from 1.

**page\_size** `integer` (default: 20)

Entries per page, up to 100.

```json Response theme={null}
{
  "items": [
    { "id": 913, "delta": -14.99, "balance_after": 42.5, "kind": "renewal", "description": "Starter renewal", "app_name": null, "created_at": "2026-11-02T03:11:45" }
  ],
  "page": 1,
  "page_size": 20,
  "total": 37
}
```

Positive `delta` values add credits (top-ups, bonuses), negative values spend them.


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