Buy a plan change
Overview
Reserves capacity and creates an invoice for a plan change. In a prepaid team, payment is required. Send the quote_token with the same plan_key and resize_disk used for the quote. Include acknowledge_ip_replacement if the quote requires an IP address change.
In a prepaid team the server changes only after payment. In a postpaid team nothing is paid now and account credit is not checked: the new price is billed by the hour once the change applies, any location change fee goes on the monthly postpaid invoice, and the change is refused with 402 if it would take the monthly recurring cost past its limit. Payment details are in billing. The reservation expires if payment is not received by billing.payment_due_at. Use the current-upgrade endpoint to track progress.
Permissions
Requires the billing.purchase (Make purchases) permission for the selected team. Resources outside that team return 404.
Authorization
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.
Send it as Bearer <token>.
Path parameters
The server uuid short
Body
application/jsonThe value of plan_key.
Exactly 64 characters
The value of resize_disk.
The value of acknowledge_ip_replacement.
The value of quote_token.
At most 20000 characters
Response 201
application/jsonThe record, as a JSON object. There is no envelope.
The uuid UUID.
The value of uuid_short.
The value of status.
One of: pending_payment, queued, stopping, migrating, resizing, networking, finalizing, completed, failed, expired, payment_review, cancelled
The value of status_label.
The value of stage.
The value of progress.
The value of progress_message.
The value of location_change_fee.
The value of billing.
Show child attributesHide child attributes
The customer's service number, once a recurring service exists.
The customer's invoice number, once an invoice exists.
A complete URL where the invoice can be paid.
The checkout UUID, or null when no checkout is available.
The value of checkout_uuid_short.
The current invoice status, or null before an invoice exists.
The amount in the currency shown by currency.
The three-letter currency code used for amount.
How often the service renews, or null for a one-time charge.
When payment is due before the reservation is released.
How many minutes the original payment window allowed.
When the charge was paid, or null while payment is outstanding.
The value of source_location.
The value of target_location.
Whether this action requires migration.
The value of crosses_location.
Whether this action requires ip replacement.
The value of resize_disk.
The value of plan_name.
The value of product_group_name.
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.
The value of source_memory.
The value of source_disk.
The value of source_bandwidth.
The value of target_cpu.
The value of target_memory.
The value of target_disk.
The value of target_bandwidth.
The value of transferred_bytes.
The value of total_bytes.
Whether the customer can cancel.
A customer-safe explanation of the failure. Internal billing diagnostics are never published here.
The value of support_reference.
The date and time for created at, in UTC.
The date and time for started at, in UTC.
The date and time for completed at, in UTC.
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
messagefor details. Field validation also includes anerrorsobject keyed by field name. - 429
- Too many requests. The
Retry-Afterheader says how many seconds to wait. Limits are per account, so several keys on one account share them.
Still stuck? Contact our team
View as Markdown