Calculate plan change
calculate_plan_changePreview a plan change without payment: calculate unused value against new plan price and return both expiration dates so customers see if expiry moves earlier or later.
Instructions
Preview a plan change. No payment is taken: the unused value of the current plan is converted at the new plan's price, so an upgrade moves the expiry EARLIER and a downgrade moves it later. Returns expirationDate, currentExpirationDate, expirationChangeDays (negative = shorter) and paymentRequired=false; show the customer both dates. Use get_plan_resources first to see available resource IDs for the target plan. Requires services:read when called with an API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | Yes | Plan ID from get_plan_options | |
| orderNo | Yes | Tenant-owned service order number: 1-64 ASCII letters, digits or hyphens, e.g. VP12345 or VP12345-1 | |
| resources | Yes | Array of numeric resource value IDs — one per resource type (RAM, SSD, IP, etc.). Get IDs from get_plan_resources response: each resource type has 'values' array, pick one value's 'id' per type. A type left out keeps its current value; an id the target plan does not offer is refused with 422 invalidResources. |