POST /billing/prorations/calculate/{tenant_id}
Preview the prorated amount before actually changing the plan. Returns estimated fee and remaining billing days without executing the change.
Billing Service `bearerAuth` application/json
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
tenant_id |
path |
string |
Yes |
|
|
|
Tenant ID |
Request Body
Schema: dto.ProrationCalculateRequest
| Field | Type | Required | Example | Constraints | Description |
new_plan |
string |
Yes |
enterprise |
|
|
billing_cycle |
string |
No |
monthly |
|
|
Responses
| Status | Description | Schema |
| 200 | Proration calculation successful | dto.ProrationCalculateDetailResponse |
| 400 | Invalid request parameters | object |
| 401 | Unauthorized | object |
| 500 | Internal server error | object |
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 |
Upgrade will incur a prorated fee of ¥249.50 (15 days remaining) |
|
|
proration_amount |
number |
No |
249.5 |
|
|
remaining_days |
integer |
No |
15 |
|
|
target_plan |
string |
No |
enterprise |
|
|
tenant_id |
string |
No |
tnt_xyz789 |
|
|