AI & MCP
Plan upgrades with AI
Copy page
Upgrade a hosting plan from your AI tool in two steps — options, the exact price, and confirmation with a phrase you type yourself
When a site has outgrown its plan (disk full, addon-domain or mailbox limit reached, a build running out of memory), your AI tool can suggest a higher plan and place the upgrade with your confirmation. Tools such as hosting_resource_usage, hosting_site_doctor and the plan_limit_reached error usually lead here.
The upgrade rule
The same rule as the Hostino panel:
- Same product group: the same hosting type (Linux, WordPress, Node.js…) and the same location (Iran or Europe).
- Higher plans only: a plan whose price for this service’s own billing cycle is higher. No downgrades.
- The billing cycle stays the same: a monthly service stays monthly.
- Not included: email hosting and one-click apps (upgraded in the panel). Changing location or hosting type is a migration; contact support.
- The service must be active.
The two-step flow
| Step | Tool | Scope | What happens |
|---|---|---|---|
| 0 | service_upgrade_options | services:read | Allowed plans with the price per period; read-only |
| 1 | service_upgrade | orders:write | The exact prorated amount (for the days left in the current period, with estimated VAT) and a confirmation phrase; nothing changes yet |
| 2 | service_upgrade_confirm | orders:write + orders:confirm | With the phrase you typed, the upgrade order and an unpaid invoice are created |
| 3 | prepare_invoice_payment → pay_invoice_with_credit | orders:confirm + billing:pay | Pay the invoice from credit with a second phrase, or pay it in the panel |
The plan switches when the invoice is paid — automatically, without downtime.
Example confirmation phrase:
confirm upgrading example.com to WP-Core-IR 286,000 toman code 4821- The phrase is accepted with Persian or English digits, with or without thousands separators, is valid for about 15 minutes and locks after 5 wrong attempts.
- The tool must never type or complete the phrase itself.
- The amount is re-checked at confirmation. The prorated amount moves with the calendar; if it changed between steps 1 and 2, the answer is
amount_changedwith the new amount and phrase, and you confirm again. orders:confirmis not allowed in API tokens, so confirming an upgrade is never possible with an API token — only through an OAuth connection, typed by the account owner.- At most 3 upgrades per account in 24 hours.
An example conversation
- “My hosting is full; what should I do?” The tool sees with
hosting_resource_usagethat the disk is 96% full and shows the higher plans with their monthly price viaservice_upgrade_options. - “I’ll take WP-Pro.” The tool calls
service_upgradeand shows the prorated amount and the confirmation phrase. - You type the phrase →
service_upgrade_confirmissues the invoice. - “Pay it from my credit.” →
prepare_invoice_paymentgives the exact amount and a second phrase; once you type it, the invoice is paid and the plan switches automatically.
Errors
| Code | Cause |
|---|---|
not_upgradable_here | Email, one-click app, or a service without a regular billing cycle; use the panel or support |
upgrade_not_allowed | plan_id is not among the service_upgrade_options |
service_not_active / service_not_found | The service is not active or not yours |
amount_changed | The prorated amount changed; the new phrase is in new_request |
confirmation_mismatch | The typed phrase is wrong (attempts_left) |
request_expired | Expired; call service_upgrade again |
too_many_attempts / daily_limit_reached | Too many attempts or the daily limit |
amount_over_limit | The amount is above the limit for this route; upgrade in the panel |
REST equivalent: Purchases API → Plan upgrades.