/billing/credit-balance/{tenant_id}
获取租户的信用余额,来源于退款、按比例降价、促销额度等。信用余额可用于抵扣后续账单。
请求参数
| 名称 | 位置 | 类型 | 必填 | 默认值 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|---|---|
tenant_id |
path |
string |
是 | 租户ID |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 200 | 信用余额查询成功 | service-billing/internal/handler/dto.CreditBalanceDetailResponse |
| 400 | 请求参数错误 | object |
| 401 | 未授权 | object |
| 500 | 服务器内部错误 | object |
引用的 Schema
service-billing/internal/handler/dto.CreditBalanceDetailResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
data |
service-billing/internal/handler/dto.CreditBalanceResponse |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |
service-billing/internal/handler/dto.CreditBalanceResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
balance |
number |
否 | 150 |
||
currency |
string |
否 | CNY |
||
tenant_id |
string |
否 | tnt_xyz789 |
||
updated_at |
string |
否 | 2026-05-12T10:00:00Z |