Autional Autional
API Reference GitHub autional.com →

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

NameInTypeRequiredDefaultExampleConstraintsDescription
tenant_id path string Yes Tenant ID

Request Body

Schema: dto.ProrationCalculateRequest

FieldTypeRequiredExampleConstraintsDescription
new_plan string Yes enterprise
billing_cycle string No monthly

Responses

StatusDescriptionSchema
200Proration calculation successfuldto.ProrationCalculateDetailResponse
400Invalid request parametersobject
401Unauthorizedobject
500Internal server errorobject

Referenced Schemas

dto.ProrationCalculateDetailResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.ProrationCalculateResponse No
message string No
timestamp string No

dto.ProrationCalculateResponse

FieldTypeRequiredExampleConstraintsDescription
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