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

# GET /api/billing/summary — 钱包与近期活动

> 返回单一负载，含钱包余额、近期支付、近期交易与本月至今的用量，用于控制台计费概览。

返回一个单一负载，驱动控制台中的计费概览：当前钱包余额、近期支付、近期交易，以及本月至今的用量合计。

**方法：** `GET` **路径：** `/api/billing/summary` **认证：** 会话 Bearer

## 响应

<ResponseField name="wallet" type="object">
  当前钱包快照，含 `balance` 与 `currency`。
</ResponseField>

<ResponseField name="recent_payments" type="object[]">
  最新的钱包充值。
</ResponseField>

<ResponseField name="recent_transactions" type="object[]">
  最新的钱包交易。
</ResponseField>

<ResponseField name="month_usage" type="object">
  当前计费月的聚合用量。
</ResponseField>

## 示例

```bash theme={null}
curl -H "Authorization: Bearer eyJhbGciOi..." \
  https://ariacompute.cn/api/billing/summary
```

```json theme={null}
{
  "wallet": { "balance": 42.10, "currency": "CNY" },
  "recent_payments": [
    { "id": "pay_01H...", "amount": 100, "currency": "CNY", "status": "paid" }
  ],
  "recent_transactions": [
    { "id": "txn_01H...", "type": "usage", "amount": -0.12, "currency": "CNY" }
  ],
  "month_usage": { "total_cost": 7.90, "currency": "CNY" }
}
```

## 错误

| 状态    | 含义          |
| ----- | ----------- |
| `401` | 缺失或无效的会话令牌。 |
