Cloud plan page
The Cloud plan page shows your hosted Spanway workspace, its plan and its quotas. From here you upgrade through checkout, buy prepaid credits and set up auto top-up, add your own provider keys, manage invoices in the billing portal, export everything to run the same gateway on your own infrastructure, or cancel the plan. Open it at /ui/cloud-plan. In the left nav it sits in the Settings group, inside the Settings item, as Cloud plan. The nav item is shown to the Admin and Admin Viewer roles (proxyAdminTierRoles) and to org admins. The page checks the role again, so anyone else who opens the URL sees "Cloud plan is only available to admin users."
The page needs the license feature cloud (shown as "Spanway Cloud"). Without it the page shows "Cloud plan needs a Spanway Enterprise license", names the missing feature and links to Get a trial license. The proxy enforces the same feature and answers these routes only when Spanway Cloud is turned on in general_settings. If the Admin UI cannot read the license at all, it fails closed and shows "Cloud plan is hidden until the license can be checked" with a hint to check that GET /health/license answers.
Every part of the page works on one tenant, the one whose organization you are an org admin of. The proxy looks this up from your organization memberships. A proxy admin who is not an org admin of a tenant's organization gets the error "only an organization admin of the tenant can do this" instead of a plan. Use the Tenants page to manage other tenants.
The page opens with a short description. When you cannot change anything it adds "You can view the plan, but only an admin can change it."
A real-world scenario
A tenant on the free plan hits its 10 USD monthly budget in the middle of a launch. Their org admin opens the Cloud plan page, upgrades to Pro through checkout, adds the company's own provider key so the heaviest model bills to their provider account, and turns on auto top-up so credits never run out.
Steps
-
Open Settings, then Cloud plan in the left nav, or go to
/ui/cloud-plan. -
On the Plans card click Upgrade to Pro and finish Stripe checkout. The page calls:
curl -X POST $SPANWAY_URL/cloud/subscribe \-H "Authorization: Bearer $SPANWAY_API_KEY" -H "Content-Type: application/json" -d '{"plan": "pro"}' -
On the Bring your own keys card click Add key, pick the Provider, paste the API key and click Add key.
curl -X POST $SPANWAY_URL/cloud/tenant/credentials \-H "Authorization: Bearer $SPANWAY_API_KEY" -H "Content-Type: application/json" \-d '{"provider": "openai", "api_key": "sk-..."}' -
On the Credits card click Buy credits, tick Save this card for auto top-up, finish checkout, then turn on auto top-up with a threshold and an amount.
Expected result
After checkout the Workspace card shows the Pro plan and its quotas. The provider key shows masked in the keys table, and the credits ledger shows the Purchase entry once Stripe reports the payment.
Workspace card
The first card is titled with the company name and a status badge, Pending verification (amber), Active (green), Suspended (red) or Cancelled (grey), with the signup email under it.
| Row | Meaning |
|---|---|
| Plan | Free, Pro or Enterprise. |
| Credits balance | The prepaid balance in US dollars. |
| Overage this period | Usage past the plan budget so far this calendar month, already priced at the usage price. |
| Model usage on credits | What model usage on Spanway's provider accounts costs you, for example Provider list price + 15%. 100 dollars of provider usage then uses 115 dollars of credits. Usage through your own provider keys is billed by your provider and never uses credits. The Spanway operator sets this price, so you cannot change it here. |
| Plan since | When the current plan started. |
| Trial ends | Always empty today, because no plan starts a trial yet. |
| Verified | When the signup email was verified. |
| API URL | The base URL to send requests to. |
| Tenant ID | The tenant's ID. |
| Suspended | The reason, shown only while the tenant is suspended. |
Under the rows a short note says the same thing in a sentence: requests on Spanway's provider accounts use credits at the provider's list price plus the markup, with a 100 dollar example, requests through your own provider keys never use credits, and spend logs and budgets show the provider's own price. See Usage price.
Under Quotas on the plan name, the card lists Monthly budget, Requests per minute, Tokens per minute, Keys (not enforced yet), Teams (not enforced yet), Team members (not enforced yet) and Model groups. A limit with no value reads Unlimited, and Model groups reads All when every model group is allowed. The budget, the two rate limits and the model groups are enforced on every request. The key, team and member counts are shown so you know what the plan is meant for, but the gateway does not stop you from going past them yet.
Plans card
The Plans card says every plan runs the same gateway and upgrades take effect after checkout. It shows one card per plan offered. Each card shows the price (Free, or the monthly price), a one-line summary, the Monthly budget, Requests per minute, Team members (not enforced yet) and Model usage on credits, and how overage is billed when the plan allows it. Your plan is outlined and carries a Current plan badge.
Plans above yours have an Upgrade to button with the plan name, for users who can change the plan. It opens Stripe checkout in the same tab, and the new plan applies when Stripe reports the checkout complete. The proxy starts checkout only for an active tenant and only for a plan that has an online price. Otherwise it returns an error and a toast shows "Could not start the upgrade".
Credits card
The Credits card shows the prepaid balance that platform usage draws down. Requests sent with your own provider keys are never charged here.
| Control | Type | What it does |
|---|---|---|
| Buy credits | Button | Opens the Buy credits dialog. Shown only to users who can change the plan. |
| Auto top-up | Section | Described below. Shown only to users who can change the plan. |
The ledger lists credit activity, newest first, 10 rows per page.
| Column | Meaning |
|---|---|
| When | When the entry was made. |
| Kind | A badge, Purchase (green), Grant (blue), Usage (grey), Refund (amber) or Expiry (red). |
| Amount | The change in dollars. Credits show with a plus sign. |
| Balance after | The balance once the entry applied. |
| Note | Any note on the entry. Hover to see all of it. |
Buy credits dialog
The dialog says credits are a prepaid balance, that your own provider keys are never charged here, and that you finish the purchase at checkout.
| Control | Type | What it does |
|---|---|---|
| Amount presets | Buttons | $25.00, $100.00, $500.00 and $1,000.00. Each fills the amount. $100.00 is selected by default. |
| Amount (USD) | Number input | Any amount from $5.00 to $10,000.00, in steps of a cent. Anything else shows "Buy between $5.00 and $10,000.00 at a time", and an empty value shows "Enter an amount in US dollars". The amount is rounded to the cent. |
| Save this card for auto top-up. It is only charged without you when auto top-up is on. | Checkbox | Off by default. When on, Stripe keeps the card you pay with so auto top-up can charge it later. |
| Continue to checkout | Button | Opens Stripe checkout in the same tab. It reads Opening checkout... while the session is created. |
| Cancel | Button | Closes the dialog. |
The card is entered on Stripe's checkout page, never in this dialog. The balance and ledger update once Stripe reports the payment, so they may lag a little after you return to the page. The page shows no message of its own when you come back from checkout. The proxy sells credits only to an active or suspended tenant, and a tenant suspended for running out of credits is unblocked once the purchase is credited.
Auto top-up
The Auto top-up section has a switch and a line that says what is set up.
| State | What the line says |
|---|---|
| No saved card | "Buy credits with "Save this card for auto top-up" checked to turn it on." The switch is disabled. |
| Card saved, auto top-up off | "Off. Turn it on to top up from your saved card when the balance runs low." |
| On | When the balance falls to the threshold, your saved card is charged the top-up amount, and turning it off removes the saved card. |
Turning the switch on shows two fields, filled with the current values or the defaults.
| Field | Type | What it does |
|---|---|---|
| When balance falls to (USD) | Number input | The threshold. The default is $10. Must be from $1.00 to $10,000.00, or the error reads "Set a threshold between $1.00 and $10,000.00". |
| Top up by (USD) | Number input | How much to charge each time. The default is $50. Must be from $5.00 to $10,000.00, or the error reads "Top up between $5.00 and $10,000.00". |
Both values are rounded to the cent. Save turns auto top-up on with those values and reads Saving... while it runs. Cancel closes the fields without saving. While auto top-up is on, Edit opens the fields again so you can change the values.
Turning the switch off while auto top-up is on opens a confirmation titled Turn off auto top-up and remove the saved card?, which says the balance is no longer topped up, the saved card is deleted, and requests are refused once the balance runs out. Turn off and remove card turns auto top-up off and removes the saved card from your account and from Stripe. Cancel keeps it on. If the change fails, the dialog stays open with "Auto top-up is still on" and the reason. Turning the switch off while the fields are open, before auto top-up was ever saved on, only closes the fields and keeps the card. To turn auto top-up on again after removing the card you need a new credit purchase with the save card box checked. A failure shows "Could not change auto top-up" with the reason, and the proxy refuses to turn it on without a saved card or for a tenant that is not active or suspended.
Bring your own keys card
The Bring your own keys card lists the provider keys you added. Requests to a provider you add a key for are billed to your own provider account and do not count against the plan budget. Each row shows the provider, the key in masked form and when it was added. The full key is never shown again after you add it.
Add key opens the Add a provider key dialog, and the trash icon on a row (labelled "Remove" with the provider and "key" for screen readers) opens the remove confirmation. Both are shown only to users who can change the plan.
Add a provider key dialog
The dialog says requests to the provider are sent with your key and billed to your provider account instead of your plan, and that the key is encrypted at rest and only ever shown masked.
| Field | Type | What it does |
|---|---|---|
| Provider | Dropdown | One of Anthropic, Cohere, Deepseek, Fireworks AI, Google AI Studio, Groq, Mistral AI, OpenAI, Openrouter, Perplexity, TogetherAI or xAI. Required, with the error "Choose a provider". |
| API key | Password input | The provider's API key, hidden as you type. Required, with the error "Enter the provider API key". Spaces around it are removed. |
| Extra fields | Text area | Optional JSON with string values. The placeholder shows an OpenAI organization as an example. Anything other than a JSON object of strings shows "Extra fields must be a JSON object of strings". |
Add key saves the key and reads Adding... while it runs. A toast confirms "Key added" with the provider and masked key. Could not add the key shows the proxy's reason, for example when the workspace has no default team yet. Cancel closes the dialog and clears what you typed.
Remove key confirmation
The dialog titled Remove this key? says requests to the provider go back to the plan's keys and count against the plan budget, and repeats the provider and masked key. Remove key deletes the stored key and the deployment that used it, and reads Removing... while it runs. This cannot be undone, so you would have to add the key again. Cancel closes the dialog.
Billing, export and cancel actions
A row of buttons at the bottom is shown only to users who can change the plan.
| Control | Type | What it does |
|---|---|---|
| Manage billing | Button | Opens the Stripe billing portal in the same tab, where you change the plan or payment method, or cancel the subscription. The portal returns you to /ui/cloud-plan. Shown only once the tenant has a Stripe customer. |
| Export for self-hosting | Button | Downloads spanway-cloud-<tenant ID>.json, a bundle for the self-hosted importer. It reads Preparing... while the file is built. Virtual keys and passwords are not included, so keys have to be regenerated after import. The bundle does list your members with their email addresses, so the proxy refuses the export for view-only roles. |
| Cancel plan | Button | Opens the cancel confirmation. Hidden once the plan is cancelled. |
The dialog titled Cancel this plan? repeats the workspace and plan, and tells you to export your data first if you want to self-host. Cancel plan in the dialog reads Cancelling... while it runs, and Cancel closes the dialog. The dialog says "Cancelling takes effect at once. The subscription ends now with no refund for the unused part of the period, every request from this workspace is refused straight away and the saved card is removed. Personal details are erased after the retention period, which is 90 days by default." Confirming ends the Stripe subscription right away, removes any saved card, turns off auto top-up and blocks the workspace. The cancel cannot be undone from this page.
Empty, error and disabled states
While the license is checked the page shows a loading state, then "Loading your plan..." while the tenant loads. On a gateway where Spanway Cloud is not turned on, the page shows "Spanway Cloud is not available on this deployment." in place of the plan. Any other failure shows "Could not load your plan:" with the reason, for example when you are not an org admin of a tenant.
Inside the page, "Loading plans..." and "Could not load the plans:" belong to the Plans card. The ledger shows "No credit activity yet." when empty and "Could not load the credit ledger:" with the reason on a failure. The keys card shows "Loading keys...", "No provider keys yet. Every request uses the plan's keys." or "Could not load your keys:" with the reason. Auto top-up shows "Could not load auto top-up:" with the reason when its settings cannot be read. The auto top-up switch is disabled until a card is saved, and buttons are disabled while their request runs.
Differences by role and license
The nav item is shown to the Admin and Admin Viewer roles and to org admins. A proxy admin (proxy_admin) or an org admin sees Upgrade to, Buy credits, auto top-up, Add key, key removal, Manage billing, Export for self-hosting and Cancel plan. Other admin roles see the plan, the quotas, the ledger and the masked keys only.
The proxy checks every action against the tenant whose organization you are an org admin of, and it refuses every change, as well as the auto top-up settings, for the view-only roles proxy_admin_viewer and internal_user_viewer. It also leaves the saved card and auto top-up fields out of the tenant for those roles. An Admin Viewer has the session role Admin Viewer, so the page shows them the read-only view, even when they are also an org admin of the tenant. The workspace export holds member email addresses, so the proxy refuses it for view-only roles too.
The page is locked without the cloud license feature, and the data loads only when the session belongs to a licensed gateway.
Errors
| What you see | What it means | Fix |
|---|---|---|
| "Cloud plan needs a Spanway Enterprise license" | The gateway's license lacks cloud. | The operator adds the feature. |
| "only an organization admin of the tenant can do this" | You are not an org admin of the tenant's organization. | Ask the tenant's org admin, or use the Tenants page as an operator. |
| "Buy between $5.00 and $10,000.00 at a time" | The amount is out of range. | Pick an amount in range. |
no saved card, buy credits with save_card set to save one first | Auto top-up needs a saved card. | Buy credits once with the save card box ticked. |
tenant has no Stripe customer yet, subscribe first | The billing portal needs a Stripe customer. | Subscribe or buy credits first. |
stripe: <reason> | Stripe refused the checkout or portal session. | Try again, or contact support@spanway.ai with the time of the attempt. |
tenant is already cancelled | The plan was cancelled already. | Sign up again to start a new workspace. |
Related docs
See Spanway Cloud for how plans, credits, auto top-up, provider keys and export work, and Billing and invoicing for how Stripe billing is set up. Sanctions screening on Spanway Cloud and license issuance explains why a purchase or a workspace may be held for review.