# Cancel a plan change

`POST https://console.advinservers.com/api/v1/client/servers/{server}/upgrades/{upgrade}/cancel`

### Overview

Cancels a plan change awaiting payment and releases its reserved capacity. Paid changes cannot be cancelled through this endpoint. Contact support if a paid change needs attention. Invoice checks continue after the response; check the change again until its status is final.

### Permissions

Requires the `billing.purchase` (Make purchases) permission for the selected team. Resources outside that team return 404.

## Authorization

Send `Authorization: Bearer <token>` with the request. Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

## Path parameters

- `server` (string, required): The server uuid short
- `upgrade` (string, required): The upgrade uuid short

## Response 202

The request was accepted and is being carried out in the background.

- `uuid` (string, required): The uuid UUID.
- `uuid_short` (string, required): The value of `uuid_short`.
- `status` (string, required): The value of `status`. One of: `pending_payment`, `queued`, `stopping`, `migrating`, `resizing`, `networking`, `finalizing`, `completed`, `failed`, `expired`, `payment_review`, `cancelled`.
- `status_label` (string, required): The value of `status_label`.
- `stage` (string | null, required): The value of `stage`.
- `progress` (integer, required): The value of `progress`.
- `progress_message` (string | null, required): The value of `progress_message`.
- `location_change_fee` (string | null, required): The value of `location_change_fee`.
- `billing` (object, required): The value of `billing`.
  - `service_id` (integer | null, required): The customer's service number, once a recurring service exists.
  - `invoice_id` (integer | null, required): The customer's invoice number, once an invoice exists.
  - `invoice_url` (string | null, required): A complete URL where the invoice can be paid.
  - `checkout_uuid` (string | null, required): The checkout UUID, or null when no checkout is available.
  - `checkout_uuid_short` (string | null, required): The value of `checkout_uuid_short`.
  - `invoice_status` (string | null, required): The current invoice status, or null before an invoice exists.
  - `amount` (string | null, required): The amount in the currency shown by `currency`.
  - `currency` (string | null, required): The three-letter currency code used for `amount`.
  - `billing_cycle` (string | null, required): How often the service renews, or null for a one-time charge.
  - `payment_due_at` (string | null, required): When payment is due before the reservation is released.
  - `payment_window_minutes` (integer | null, required): How many minutes the original payment window allowed.
  - `paid_at` (string | null, required): When the charge was paid, or null while payment is outstanding.
- `source_location` (string | null, required): The value of `source_location`.
- `target_location` (string | null, required): The value of `target_location`.
- `requires_migration` (boolean, required): Whether this action requires migration.
- `crosses_location` (boolean, required): The value of `crosses_location`.
- `requires_ip_replacement` (boolean, required): Whether this action requires ip replacement.
- `resize_disk` (boolean, required): The value of `resize_disk`.
- `plan_name` (string | null, required): The value of `plan_name`.
- `product_group_name` (string | null, required): The value of `product_group_name`.
- `source_cpu` (integer | null, required): The plan the customer bought, spelled out against what the server has today. These are the snapshot taken at checkout, so they keep describing the change even after the feed moves on.
- `source_memory` (integer | null, required): The value of `source_memory`.
- `source_disk` (integer | null, required): The value of `source_disk`.
- `source_bandwidth` (integer | null, required): The value of `source_bandwidth`.
- `target_cpu` (integer | null, required): The value of `target_cpu`.
- `target_memory` (integer | null, required): The value of `target_memory`.
- `target_disk` (integer | null, required): The value of `target_disk`.
- `target_bandwidth` (integer | null, required): The value of `target_bandwidth`.
- `transferred_bytes` (integer | null, required): The value of `transferred_bytes`.
- `total_bytes` (integer | null, required): The value of `total_bytes`.
- `can_cancel` (boolean, required): Whether the customer can cancel.
- `error` (string | null, required): A customer-safe explanation of the failure. Internal billing diagnostics are never published here.
- `support_reference` (string | null, required): The value of `support_reference`.
- `created_at` (string | null, required): The date and time for created at, in UTC.
- `started_at` (string | null, required): The date and time for started at, in UTC.
- `completed_at` (string | null, required): The date and time for completed at, in UTC.

```json
{
  "uuid": "2946b7c6-1b8d-4279-880f-629c9dd8f48c",
  "uuid_short": "Uuid short",
  "status": "pending_payment",
  "status_label": "Paying from account credit",
  "stage": "awaiting_billing",
  "progress": 0,
  "progress_message": "Paying for the change from your account credit.",
  "location_change_fee": "0.00",
  "billing": {
    "service_id": null,
    "invoice_id": null,
    "invoice_url": null,
    "checkout_uuid": null,
    "invoice_status": null,
    "amount": "6.00",
    "currency": "USD",
    "billing_cycle": null,
    "payment_due_at": "2026-09-14T17:12:09+00:00",
    "payment_window_minutes": null,
    "paid_at": null
  },
  "source_location": "Kansas City, MO",
  "target_location": "Kansas City, MO",
  "requires_migration": false,
  "crosses_location": false,
  "requires_ip_replacement": false,
  "resize_disk": true,
  "plan_name": "Standard 8 GB",
  "product_group_name": "Standard VPS",
  "source_cpu": 4,
  "source_memory": 4294967296,
  "source_disk": 85899345920,
  "source_bandwidth": 5497558138880,
  "target_cpu": 6,
  "target_memory": 8589934592,
  "target_disk": 171798691840,
  "target_bandwidth": 10995116277760,
  "transferred_bytes": null,
  "total_bytes": null,
  "can_cancel": true,
  "error": null,
  "support_reference": null,
  "created_at": "2026-09-14T16:42:09+00:00",
  "started_at": null,
  "completed_at": null
}
```

## Errors

- `401`: The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- `403`: Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- `404`: The resource was not found in the selected team. Resources in another account or team also return 404.
- `422`: A field is missing or invalid, or the resource cannot accept this change in its current state. Check `message` for details. Field validation also includes an `errors` object keyed by field name.
- `429`: Too many requests. The `Retry-After` header says how many seconds to wait. Limits are per account, so several keys on one account share them.

## Example request

```bash
curl --request POST \
  --url 'https://console.advinservers.com/api/v1/client/servers/{server}/upgrades/{upgrade}/cancel' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
