POST /billing/prorations/calculate/{tenant_id}
在正式变更套餐前预览将产生的按比例(proration)金额,返回预估费用和剩余计费天数,不执行实际变更
计费服务 `bearerAuth` application/json
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
tenant_id |
path |
string |
Yes |
|
|
|
租户ID |
Request Body
Schema: dto.ProrationCalculateRequest
| Field | Type | Required | Example | Constraints | Description |
new_plan |
string |
Yes |
enterprise |
|
|
billing_cycle |
string |
No |
monthly |
|
|
Referenced Schemas
dto.ProrationCalculateDetailResponse
dto.ProrationCalculateResponse
| Field | Type | Required | Example | Constraints | Description |
currency |
string |
No |
CNY |
|
|
current_billing_end |
string |
No |
2026-06-01T00:00:00Z |
|
|
current_plan |
string |
No |
pro |
|
|
message |
string |
No |
升级将产生按比例费用 ¥249.50(剩余15天) |
|
|
proration_amount |
number |
No |
249.5 |
|
|
remaining_days |
integer |
No |
15 |
|
|
target_plan |
string |
No |
enterprise |
|
|
tenant_id |
string |
No |
tnt_xyz789 |
|
|