Billing
37 operations in the WP Waterfall API.
- getThe add-on catalog
- getThe additional preview slots of the company and what they cost so far
- putSet how many additional preview slots the company holds
- postCancel the plan
- getBilling name, email, address, and tax id
- putUpdate billing name, email, address, and tax id
- getList invoices
- getOne invoice, as the invoice page shows it
- getOpen an invoice PDF
- getPrice, tax, and total for a plan before it starts
- getThe plans and site tiers on sale
- getList saved cards
- postRegister a confirmed card
- deleteRemove a card
- postMake a card the default
- getThe recurring charges, line by line
- postStart adding a card
- getList the subscriptions on the company with their site licenses
- postBuy a plan with a saved card
- postCancel one subscription
- getWhat cancelling one plan would refund, before it happens
- putAdd or remove site licenses, or change the term, on one subscription
- getWhat adding or removing site licenses, or changing the term, would do
- getThe company's main plan, entitlements, add-ons, and usage
- getUsage this period against the plan
- getThe company's add-ons
- postBuy an add-on
- getThe add-ons the company holds, grouped, with where each is used
- deleteRemove an add-on
- getThe company's dedicated server
- postCancel the dedicated server
- postMove sites from the dedicated server back to shared hosting
- getThe price of each dedicated server size in a region
- deleteCancel the open dedicated server request
- postAsk staff for a different dedicated server size
- putMove one site to another tier
- getWhat moving one site to another tier would do
The add-on catalog
get/add-on-catalogPermalink to The add-on catalog
- Scope:
billing:read - Permission:
billing.read
Every add-on WP Waterfall sells with its monthly price per unit, the most units a company can hold, and what it adds. Items with route addon are bought through POST /companies/me/add-ons.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | AddonCatalogList | Add-ons |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of object | |
data[].key required | string | |
data[].lookup_key required | string | |
data[].name required | string | |
data[].summary required | string | |
data[].route required | string | One of: addon, disaster_recovery. |
data[].scope required | string | One of: company, environment, site, zone, node. |
data[].unit required | string | |
data[].monthly_cents required | integer or null | The monthly price of the smallest purchase: one unit, or min_quantity units when a purchase holds several (Standby Failover: 3 units of 100 USD, so 30000). Null when the add-on is not priced by the month (Custom SSL is yearly, see unit_cents) or is metered, quoted, or included. |
data[].unit_cents required | integer or null | The price of one unit for one price_interval. Null when metered, quoted, or included. |
data[].price_interval required | string or null | What unit_cents covers: a month or a year. Null when there is no flat price. One of: month, year. |
data[].min_quantity required | integer | The fewest units one purchase holds. |
data[].metered required | object or null | |
data[].quote_from_cents required | integer or null | |
data[].plan_keys required | array or null | Plan lookup keys that may buy it. Null means every plan. |
data[].max_quantity required | integer | |
data[].grants required | array of object | |
data[].features required | array of string | |
next_cursor | string or null |
The additional preview slots of the company and what they cost so far
get/billing/additional-previewsPermalink to The additional preview slots of the company and what they cost so far
- Scope:
billing:read - Permission:
billing.read
Read only. Says how many additional preview slots the company holds, how many hold an environment, the slot hours used so far this billing period and what they cost, and lists the additional preview environments using a slot. A slot costs $10 a month, billed by the hour an environment uses it. Time a slot sits empty is never charged.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | AdditionalPreviewsUsage | The slots and the environments in them |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
slots required | integer | Slots the company holds: a license for this many additional previews at a time. Range: 0 to any. |
slots_in_use required | integer | Slots with an additional preview environment in them now. Range: 0 to any. |
slots_free required | integer | Range: 0 to any. |
max_slots required | integer | The most slots the company may hold before staff raise the limit. |
included_previews required | integer | Range: 0 to any. |
monthly_cents required | integer | What one slot costs a month in cents when it is used the whole month. Range: 0 to any. |
period_start required | string | |
period_end required | string | |
used_hours required | number | Slot hours used so far this billing period. Unused slot time is never charged. Range: 0 to any. |
used_cents required | integer | What the used hours cost so far, in cents. Range: 0 to any. |
data required | array of object | |
data[].environment_id required | string (uuid) | UUIDv7 |
data[].environment_name required | string | |
data[].site_id required | string (uuid) | UUIDv7 |
data[].site_name required | string | |
data[].created_at required | string (date-time) | When it started using a slot. |
next_cursor required | string or null | Set when more lines remain after this page. The totals always cover every additional preview, not just the page. |
Set how many additional preview slots the company holds
put/billing/additional-previewsPermalink to Set how many additional preview slots the company holds
- Scope:
billing:write - Permission:
billing.write - Needs a confirmation
A slot is a license to have one additional preview environment (beyond a site's 5 included ones) at a time, and to create and delete them freely. A slot costs $10 a month, billed by the hour an environment uses it: nothing is charged for time a slot sits empty, so setting slots charges nothing now. Answers 409 additional_preview_slots_in_use when fewer slots than environments are asked for (delete a preview first), and 409 additional_preview_company_limit above the company limit (100 until staff raise it). Needs an Owner, an Admin, or a Billing user, or an API key with billing:write, and a saved card (402 payment_method_required). Audited.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Optional on PUT and PATCH. When the call starts a job, a retry with the same key, path, and body within 24 hours returns that job instead of starting another. A different path or body starts a new job. |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Request body application/json, required, SetAdditionalPreviewSlotsRequest
Fields
| Name | Type | Description |
|---|---|---|
slots required | integer | Range: 0 to 1000. |
Responses
| Status | Body | Description |
|---|---|---|
200 | AdditionalPreviewSlots | The slots now |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
slots required | integer | Slots the company holds: a license for this many additional previews at a time. Range: 0 to any. |
slots_in_use required | integer | Slots with an additional preview environment in them now. Range: 0 to any. |
slots_free required | integer | Range: 0 to any. |
max_slots required | integer | The most slots the company may hold before staff raise the limit. |
included_previews required | integer | Range: 0 to any. |
monthly_cents required | integer | What one slot costs a month in cents when it is used the whole month. Range: 0 to any. |
period_start required | string | |
period_end required | string | |
used_hours required | number | Slot hours used so far this billing period. Unused slot time is never charged. Range: 0 to any. |
used_cents required | integer | What the used hours cost so far, in cents. Range: 0 to any. |
Cancel the plan
post/billing/cancelPermalink to Cancel the plan
- Permission:
billing.write - Dashboard session only, no API key
Ends at period end by default. Within 30 days of the first payment a monthly plan's charges are refunded in full, each part to where it came from: the card part to the card, and the part that account credit paid to the company's account credit (refund_to_card_cents and refund_to_credit_cents). An annual or three year plan always runs to the end of its paid term: renewal stops and no refund or credit is given.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, CancelSubscriptionRequest
Fields
| Name | Type | Description |
|---|---|---|
immediately | boolean | Ends now instead of at period end. Within 30 days of the first payment the refund is full. Default: false. |
reason | string | |
confirm | boolean |
Responses
| Status | Body | Description |
|---|---|---|
200 | Cancellation | Cancellation |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
state required | string | One of: none, trialing, active, past_due, read_only, suspended, cancelled. |
ends_at required | string or null (date-time) | |
refund_cents required | integer | Cents given back under the 30-day money-back guarantee (monthly plans only), or 0. It is the sum of refund_to_card_cents and refund_to_credit_cents. Range: 0 to any. |
refund_to_card_cents required | integer | The part of the refund that went back to the card through Stripe. Range: 0 to any. |
refund_to_credit_cents required | integer | The part of the refund that went back to the company's account credit, because account credit paid that part of the plan. Range: 0 to any. |
non_refundable | boolean | True when the plan is annual or three year: it runs to ends_at, renewal stops, and no refund or credit is given. |
credit_to_card_cents | integer | Unused account credit from month to month payments that goes back to the card that paid it when the company's last plan ends. Present when the company holds account credit and this cancel ends its last plan. Payments are final: this is the only credit paid out. Range: 0 to any. |
credit_kept_cents | integer | Account credit that is never paid out: credit from an annual or 3 year term, a courtesy credit, a referral reward, or a promotion. It stays on the account and lapses with it. Range: 0 to any. |
message | string | One plain sentence about what happens next, such as the end date for a prepaid plan. |
Billing name, email, address, and tax id
get/billing/detailsPermalink to Billing name, email, address, and tax id
- Scope:
billing:read - Permission:
billing.read
The name, the optional company name, the email invoices go to, the address, and the optional tax id. A purchase needs the name, the email, and an address with line1, city, state, postal_code, and country. The email is null only for a company that has not saved one yet.
Responses
| Status | Body | Description |
|---|---|---|
200 | BillingDetails | Billing details |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
name required | string or null | The name on invoices: the buyer's own name. |
company_name | string or null | An optional company name, printed on invoices with the name. |
email required | string or null (email) | The email invoices go to. Required to buy anything. It is null only for a company that has not saved one yet: every write needs a valid address, and a purchase asks for it first. |
address required | object or null | |
address.line1 required | string | |
address.line2 required | string or null | |
address.city required | string | |
address.state required | string or null | |
address.postal_code required | string | |
address.country required | string | ISO 3166-1 alpha-2. |
tax_id required | object or null | |
tax_id.type required | string | A Stripe tax id type such as eu_vat or au_abn. |
tax_id.value required | string | |
has_payment_method required | boolean | True once a payment method is on file. The method itself stays in Stripe. |
Update billing name, email, address, and tax id
put/billing/detailsPermalink to Update billing name, email, address, and tax id
- Scope:
billing:write - Permission:
billing.write
Saves the details on the company and on its Stripe customer, where the email is the address Stripe sends invoices to. company_name is printed on invoices with the name. Send only what changes. The email is required: when it is sent it must be a valid address, and null or an empty string answers 422 Enter an email address for invoices. with a field error on email. Checkout saves these before the card is charged.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Optional on PUT and PATCH. When the call starts a job, a retry with the same key, path, and body within 24 hours returns that job instead of starting another. A different path or body starts a new job. |
Request body application/json, required, PutBillingDetailsRequest
Fields
| Name | Type | Description |
|---|---|---|
name | string or null | The name on invoices: the buyer's own name. |
company_name | string or null | An optional company name, printed on invoices with the name. |
email | string (email) | |
address | object or null | |
address.line1 required | string | |
address.line2 required | string or null | |
address.city required | string | |
address.state required | string | |
address.postal_code required | string | |
address.country required | string | ISO 3166-1 alpha-2. |
tax_id | object or null | |
tax_id.type required | string | A Stripe tax id type such as eu_vat or au_abn. |
tax_id.value required | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | BillingDetails | Billing details |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
name required | string or null | The name on invoices: the buyer's own name. |
company_name | string or null | An optional company name, printed on invoices with the name. |
email required | string or null (email) | The email invoices go to. Required to buy anything. It is null only for a company that has not saved one yet: every write needs a valid address, and a purchase asks for it first. |
address required | object or null | |
address.line1 required | string | |
address.line2 required | string or null | |
address.city required | string | |
address.state required | string or null | |
address.postal_code required | string | |
address.country required | string | ISO 3166-1 alpha-2. |
tax_id required | object or null | |
tax_id.type required | string | A Stripe tax id type such as eu_vat or au_abn. |
tax_id.value required | string | |
has_payment_method required | boolean | True once a payment method is on file. The method itself stays in Stripe. |
List invoices
get/billing/invoicesPermalink to List invoices
- Scope:
billing:read - Permission:
billing.read
Lists the company's invoices in pages of up to 100 (default 20). Owners, Admins, and Billing users may read it.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: 1 to 200, and 50 when left out. Default: 50. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | InvoiceList | Invoices |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of object | The rows of this page. |
data[].id required | string (uuid) | UUIDv7 |
data[].stripe_invoice_id required | string | |
data[].subscription_id | string or null (uuid) | The subscription the invoice bills, or null for a one-time charge or an unknown plan. |
data[].number required | string or null | |
data[].status required | string | One of: draft, open, paid, uncollectible, void. |
data[].currency required | string | |
data[].subtotal_cents required | integer | |
data[].tax_cents required | integer | |
data[].total_cents required | integer | |
data[].amount_paid_cents required | integer | |
data[].period_start required | string (date-time) | |
data[].period_end required | string (date-time) | |
data[].lines required | array of object | |
data[].pdf_available required | boolean | True when the invoice has a PDF, which GET /v1/billing/invoices/{id}/pdf sends. False for drafts and for invoices Stripe has no PDF for yet. The invoice itself opens in the dashboard at /settings/billing/invoices/<id>; no Stripe address is ever shown. |
data[].paid_at required | string or null (date-time) | |
data[].created_at required | string (date-time) | |
next_cursor required | string or null | Send it as cursor to get the next page. Null on the last page. |
One invoice, as the invoice page shows it
get/billing/invoices/{id}Permalink to One invoice, as the invoice page shows it
- Scope:
billing:read - Permission:
billing.read
The invoice is named by our invoice id or by its number, such as 2VRBR54J-0002 (the address in an email reads get.wpwaterfall.com/<number>); both are looked up inside the caller's company only. The answer is the amount, the due date, the lines, who it is for, and the state (open, paid, or void). While the invoice is open and the caller is a member who can pay, it also carries the client secret the Stripe Payment Element pays it with. Staff acting as the customer read the invoice and get no client secret. Needs the billing permission. The invoice must belong to the caller's company: another company's invoice is a 404. Never cached.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the invoice. |
Responses
| Status | Body | Description |
|---|---|---|
200 | InvoicePage | The invoice |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | Our invoice id, the one in the page address. |
state required | string | One of: open, paid, void. |
invoice_number required | string or null | The invoice number, such as "2VRBR54J-0002", or null before Stripe numbers it. |
currency required | string | |
tax_cents | integer | The tax Stripe put on the invoice, inside total_cents. 0 or absent when there is none. |
total_cents required | integer | |
amount_due_cents required | integer | What is still owed. 0 once paid or voided. |
due_at required | string or null (date-time) | |
paid_at required | string or null (date-time) | |
memo required | string or null | The note staff wrote, or null. |
lines required | array of object | |
lines[].description required | string | Our own words, such as "Dedicated server, 4 vCPUs, 31 GB memory, month to month". |
lines[].quantity required | integer | Range: 1 to any. |
lines[].amount_cents required | integer | |
billed_to required | array of string | The company the invoice is for: its billing name and address, as one line each. |
from required | string | Who sent it. Always WP Waterfall. |
client_secret required | string or null | Pays the open invoice with Stripe.js. Null unless the invoice is open and the caller can pay. |
can_pay required | boolean | False for staff looking at the invoice as the customer: they read it and cannot pay it. |
auto_charge_consent required | boolean | True for the first invoice of a month to month server: paying it lets the card be charged monthly. |
pdf_available required | boolean | True when the invoice has a PDF at GET /v1/billing/invoices/{id}/pdf. |
publishable_key required | string or null | A Stripe publishable key to use instead of the one the page was built with, or null. Only a staff test company on a live platform needs one, because it pays in Stripe test mode. |
Open an invoice PDF
get/billing/invoices/{id}/pdfPermalink to Open an invoice PDF
- Scope:
billing:read - Permission:
billing.read
The invoice's PDF, sent inline so a browser tab shows it. 404 for a draft or an invoice Stripe has no PDF for yet.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the invoice. |
Responses
| Status | Body | Description |
|---|---|---|
200 | string | The PDF |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
Price, tax, and total for a plan before it starts
get/billing/license-previewPermalink to Price, tax, and total for a plan before it starts
- Scope:
billing:read - Permission:
billing.read
The Summary step of checkout. The tax line is what Stripe Tax returns, or 0 while STRIPE_AUTOMATIC_TAX is off. billing_details_complete says whether the name, the email for invoices, and the address the purchase needs are on file. An Enterprise company has unlimited sites and buys one Single tier for each site, so it may buy only the 1 site license: any other size is refused with 422.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
lookup_key required | query | string | |
region | query | string | The data center the first site will run in, from GET /regions. The answer then names that region's regional surcharge for each site, if it has one. |
promo_code | query | string | Shows the order with this promo code applied. An invalid code is left out of the answer. |
Responses
| Status | Body | Description |
|---|---|---|
200 | LicensePreview | Plan preview |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
lookup_key required | string | |
license required | string | |
license_name required | string | |
interval required | string | One of: monthly, annual, triennial. |
credits required | integer | Range: 0 to any. |
subtotal_cents required | integer | Range: 0 to any. |
tax_cents required | integer | What Stripe Tax returns, or 0 while automatic tax is off. Range: 0 to any. |
total_cents required | integer | Range: 0 to any. |
automatic_tax required | boolean | |
trial_days required | integer | Days of the free first month, or 0. Range: 0 to any. |
due_today_cents required | integer | What the card pays today: 0 during a free first month. Range: 0 to any. |
first_term_cents | integer | With a free first month on a prepaid term: what the card pays when the free month ends, for the rest of the first term (11 or 35 months). Absent otherwise. Range: 0 to any. |
term_months | integer | Months the term covers: 1, 12, or 36. Optional so an older API parses. |
non_refundable | boolean | True for annual and three year terms: billed once and not refundable. |
renews_on | string (date-time) | The date the term renews, ISO. Absent on a free first month. |
draft required | boolean | |
discount_cents | integer | With a promo code: the cents taken off the first charge. subtotal_cents stays the list price, total_cents is after the discount and tax, and due_today_cents follows it. Range: 0 to any. |
recurring_cents | integer | The price each period once any discount ends. Present when a code is applied. Range: 0 to any. |
promo | object | The applied code, or absent when none was sent or it could not be used. |
promo.code required | string | The code in upper case. |
promo.name required | string | |
promo.description required | string | "20% off for the first 3 months". |
promo.kind required | string | One of: percent, amount. |
promo.percent_off required | number or null |
The plans and site tiers on sale
get/billing/licensesPermalink to The plans and site tiers on sale
- Scope:
billing:read - Permission:
company.read
Every plan the account may buy (a number of site licenses, 1 to 20 on sale) and every site tier, with their prices by lookup key on each term (ADR 216). Any self-serve account buys any size. A plan costs the same in every data center, and each site picks its data center when it is created (ADR 215). A tier's price is what it adds for one site. Enterprise gets contact_sales instead. The amounts match the public pricing page.
Responses
| Status | Body | Description |
|---|---|---|
200 | LicenseCatalog | Plans and tiers |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
account_type required | string | The account type whose list this is. The public list reads as individual. One of: individual, agency, enterprise. |
licenses required | array of object | |
licenses[].size required | integer | The site credits: 1, 2, 5, 10, or 20 on sale, 40 to 150 through an account rep. |
licenses[].slug required | string | license_5. |
licenses[].name required | string | "WP 5". |
licenses[].first_month_free required | boolean | True when the license has a free first month on the annual and three year terms (the 1 site license). |
licenses[].prices required | array of object | |
licenses[].limits required | object | The pool at the included tier. A tier upgrade adds to it (tiers). |
licenses[].draft required | boolean | True while the amounts are not signed off. |
licenses[].available required | boolean | False while a platform change the license needs has not shipped (the launch gate). |
licenses[].hidden required | boolean | True for a size only an account rep applies. The customer's list never carries one. |
licenses[].annual_discount_bps required | integer | The annual discount against twelve monthly payments, in basis points. |
licenses[].triennial_discount_bps required | integer | The three year discount against 36 monthly payments, in basis points. |
tiers required | array of object | |
tiers[].tier required | string | One of: base, tier_40, tier_65, tier_125, tier_250. |
tiers[].name required | string | "Plus". |
tiers[].monthly_cents required | integer | What the tier adds a month for one site. 0 for base. Range: 0 to any. |
tiers[].prices required | array of object | What the tier adds for one site on each term. Empty for base. |
tiers[].limits required | object | The site's own limits at this tier, as on a 1 site license. |
tiers[].available required | boolean | |
enterprise_levels required | array of object | The Enterprise levels, Silver, Gold, and Diamond, lowest first, as information: the licensed sites each starts at, the percent off licenses and site tiers, and the service. They apply only to a company staff set up as an Enterprise partner agency. |
enterprise_levels[].level required | string | One of: silver, gold, platinum, diamond. |
enterprise_levels[].name required | string | |
enterprise_levels[].from_sites required | integer | The licensed sites from which the level applies. A company under the Silver line has no level. Range: 0 to any. |
List saved cards
get/billing/payment-methodsPermalink to List saved cards
- Scope:
billing:read - Permission:
billing.read
Brand, last four digits, expiry, and which card is the default. Stripe keeps the card.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | PaymentMethodList | Cards |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of PaymentMethod | |
data[].id required | string | |
data[].brand required | string | visa, mastercard, amex, and so on, as Stripe names it. |
data[].last4 required | string | |
data[].exp_month required | integer | Range: 1 to 12. |
data[].exp_year required | integer | |
data[].default required | boolean | True for the card that pays every plan and invoice. |
next_cursor | string or null |
Register a confirmed card
post/billing/payment-methodsPermalink to Register a confirmed card
- Permission:
billing.write - Dashboard session only, no API key
Saves the card on the company's Stripe customer. The first card becomes the default; set_default makes any card the default. Session only.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, AddPaymentMethodRequest
Fields
| Name | Type | Description |
|---|---|---|
payment_method_id required | string | |
set_default | boolean | Makes it the default card. The first card is always the default. Default: false. |
Responses
| Status | Body | Description |
|---|---|---|
201 | PaymentMethod | Card saved |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
201 response fields
| Name | Type | Description |
|---|---|---|
id required | string | |
brand required | string | visa, mastercard, amex, and so on, as Stripe names it. |
last4 required | string | |
exp_month required | integer | Range: 1 to 12. |
exp_year required | integer | |
default required | boolean | True for the card that pays every plan and invoice. |
Remove a card
delete/billing/payment-methods/{id}Permalink to Remove a card
- Scope:
billing:write - Permission:
billing.write - Needs a confirmation
Refused with 409 for the only card while a plan is active: add another card first. Needs confirm=true.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the payment method, as Stripe names it. |
confirm | query | string | One of: true. |
Responses
| Status | Body | Description |
|---|---|---|
204 | Removed | |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
Make a card the default
post/billing/payment-methods/{id}/defaultPermalink to Make a card the default
- Scope:
billing:write - Permission:
billing.write
Every plan and invoice is charged to the default card.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the payment method, as Stripe names it. |
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Responses
| Status | Body | Description |
|---|---|---|
200 | PaymentMethod | The new default card |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
id required | string | |
brand required | string | visa, mastercard, amex, and so on, as Stripe names it. |
last4 required | string | |
exp_month required | integer | Range: 1 to 12. |
exp_year required | integer | |
default required | boolean | True for the card that pays every plan and invoice. |
The recurring charges, line by line
get/billing/pricing-breakdownPermalink to The recurring charges, line by line
- Scope:
billing:read - Permission:
billing.read
One line for each plan, site tier, add-on, and dedicated server the company pays for, with its quantity, term (monthly, annual, triennial, or hourly), price, and renewal date, and the total of each term. A line on a subscription comes from the lines of Stripe's upcoming invoice, so it is what Stripe charges; an add-on or server on its own subscription is priced from what it was bought at. Overage is not here: GET /billing/usage has it.
Responses
| Status | Body | Description |
|---|---|---|
200 | PricingBreakdown | Recurring charges |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
currency required | string | |
lines required | array of object | |
lines[].id required | string | |
lines[].kind required | string | One of: plan, site_tier, regional_surcharge, addon, dedicated_server, platform_fee. |
lines[].name required | string | "WP 5", "Plus site tier", "Additional Disk Space". |
lines[].quantity required | integer | Range: 0 to any. |
lines[].term required | string | One of: monthly, annual, triennial, hourly. |
lines[].amount_cents required | integer | The charge for the whole line for one term, in cents, before any discount. For an hourly line it is what the hours used so far this period cost. |
lines[].subscription_id required | string or null (uuid) | The subscription the line bills on, or null for an add-on or server on its own subscription. |
lines[].addon_key required | string or null | The add-on key of an add-on line, such as additional_disk. |
lines[].renews_on required | string or null (date-time) | The next charge date, or null when the line will not renew or has no date. |
lines[].ends_on required | string or null (date-time) | The last day of a line that is set to end. Such a line is not counted in the totals. |
lines[].counted required | boolean | True when the line is in the totals: it renews and is not billed by use. A usage billed line shows what it cost so far and is added to the next invoice. |
discounts required | array of object | |
discounts[].name required | string | The coupon's name as the invoice prints it, such as "Spring sale". |
discounts[].term required | string | One of: monthly, annual, triennial, hourly. |
discounts[].amount_cents required | integer | Cents taken off. Positive. |
discounts[].subscription_id required | string or null (uuid) | |
totals required | array of object | One total for each term that has a counted line, in the order monthly, annual, triennial. |
totals[].term required | string | One of: monthly, annual, triennial, hourly. |
totals[].subtotal_cents required | integer | |
totals[].discount_cents required | integer | Range: 0 to any. |
totals[].tax_cents required | integer | Tax Stripe adds, in cents. Zero while tax collection is off. Range: 0 to any. |
totals[].total_cents required | integer | What the term charges: subtotal, less discounts, plus tax. |
Start adding a card
post/billing/setup-intentsPermalink to Start adding a card
- Permission:
billing.write - Dashboard session only, no API key
Returns a Stripe setup intent. The browser confirms it with Stripe Elements, then registers the card with POST /billing/payment-methods. Session only.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, CreateSetupIntentRequest
Responses
| Status | Body | Description |
|---|---|---|
201 | SetupIntent | Setup intent |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
201 response fields
| Name | Type | Description |
|---|---|---|
id required | string | |
client_secret required | string |
List the subscriptions on the company with their site licenses
get/billing/subscriptionsPermalink to List the subscriptions on the company with their site licenses
- Scope:
billing:read - Permission:
billing.read
Each subscription gives site licenses, and each real site uses one. accepts_sites is true when a subscription has a free site license and a status that takes new sites. tiers counts the sites above the included tier. An Enterprise subscription staff applied before ADR 273 has no site limit (credits is null).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | SubscriptionList | Subscriptions |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of Subscription | |
data[].id required | string (uuid) | UUIDv7 |
data[].stripe_subscription_id required | string or null | Null for a license that was backfilled from the old company columns and has no Stripe id. |
data[].license required | string | license_5. |
data[].license_name required | string | "WP 5". |
data[].display_name | string | Which subscription this is, as every screen shows it: "WP 20, 14 of 20 site licenses free, Purchase date: Oct 19, 2026". A repeat in the list ends in "(2)". |
data[].lookup_key required | string or null | |
data[].interval required | string or null | One of: monthly, annual, triennial. |
data[].status required | string | One of: incomplete, incomplete_expired, trialing, active, past_due, unpaid, canceled, paused. |
data[].credits required | integer | The site credits. Range: 0 to any. |
data[].credits_used required | integer | Real sites using a credit. Range: 0 to any. |
data[].credits_free required | integer | Credits no site uses. Range: 0 to any. |
data[].accepts_sites required | boolean | True when a new site may use this license now: a free credit and a status that takes sites. |
data[].tiers required | array of object | How many of the license's sites run at each tier above the included one. |
data[].current_period_end required | string or null (date-time) | |
data[].cancel_at_period_end required | boolean | |
data[].term_months | integer or null | Months the term covers: 1, 12, or 36. |
data[].non_refundable | boolean | True for annual and three year licenses: paid once and not refundable. |
data[].renews_on | string or null (date-time) | The renewal date, or null when the license is set to end. |
data[].access_until | string or null (date-time) | The last day of access when the license is set to end, else null. |
data[].created_at required | string (date-time) | |
data[].canceled_at required | string or null (date-time) | |
data[].locked_amount_cents | integer or null | The license's price per interval, without site tiers. It never goes up while it is active. |
next_cursor | string or null |
Buy a plan with a saved card
post/billing/subscriptionsPermalink to Buy a plan with a saved card
- Scope:
billing:write - Permission:
billing.write - Needs a confirmation
Buys a plan, a new subscription with a number of site licenses (lookup_key such as license_5_monthly), charged to the default card, or to payment_method_id. A plan has one price in every data center, and it never goes up while it is active. Each site picks its data center when it is created (ADR 215); a site whose live environment runs in a data center Google prices above us-east4 adds its regional surcharge as its own line on this subscription (ADR 312, GET /regions shows site_surcharge_cents) and starts at the included tier; PUT /sites/{id}/tier upgrades one site. The subscription appears in GET /billing/subscriptions when Stripe's webhook arrives. When the bank asks for 3D Secure, requires_action is true and the browser confirms the payment with client_secret. An annual or three year plan (lookup keys ending _annual or _3y) is billed once and is not refundable, so it needs acknowledge_non_refundable: true; without it the answer is 400 with the code acknowledge_non_refundable. A first plan that would get the free first month can answer 409 with the code free_month_verification_required and a verification_url: open it, finish the check, then send the same request again. A buyer the check cannot confirm gets the plan billed from the first day instead. Without a billing name and address on file it answers 409 with the code billing_details_required: save them with PUT /billing/details, then send the same request again. Needs confirm: true. An Enterprise company has unlimited sites and buys one Single tier for each site, so it may buy only the 1 site license: any other size is refused with 422.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Request body application/json, required, CreateSubscriptionRequest
Fields
| Name | Type | Description |
|---|---|---|
lookup_key required | string | |
payment_method_id | string | A saved card. Defaults to the company's default card. |
promo_code | string | A promo code. It replaces the free first month; the two never combine. An invalid code answers 422 promo_code_invalid with one generic sentence. |
acknowledge_non_refundable | boolean | Required (true) when the plan is annual or three year: those terms are not refundable. |
confirm | boolean |
Responses
| Status | Body | Description |
|---|---|---|
201 | SubscriptionStart | Subscription started |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
201 response fields
| Name | Type | Description |
|---|---|---|
stripe_subscription_id required | string | |
status required | string | One of: incomplete, incomplete_expired, trialing, active, past_due, unpaid, canceled, paused. |
requires_action required | boolean | |
client_secret required | string or null | |
payment_intent_id required | string or null |
Cancel one subscription
post/billing/subscriptions/{id}/cancelPermalink to Cancel one subscription
- Scope:
billing:write - Permission:
billing.write - Needs a confirmation
Refused with 409 while sites use the plan: move or delete them first. Ends at period end by default. Within 30 days of the first payment a monthly plan's charges are refunded in full, and each part goes back where it came from: refund_to_card_cents to the card through Stripe, and refund_to_credit_cents to the company's account credit when account credit paid that part. Outside the window nothing is refunded. An annual or three year plan always runs to the end of its paid term: renewal stops and no refund or credit is given (non_refundable is true and message says the end date). message is one plain sentence about what was refunded and where. Payments are final: when the cancel ends the company's last plan, only unused account credit that came from month to month payments goes back to the card (credit_to_card_cents), and other account credit is never paid out (credit_kept_cents). Run GET /billing/subscriptions/{id}/cancel-preview first to read it before you confirm. Needs confirm: true.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the subscription. |
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Request body application/json, required, CancelSubscriptionRequest
Fields
| Name | Type | Description |
|---|---|---|
immediately | boolean | Ends now instead of at period end. Within 30 days of the first payment the refund is full. Default: false. |
reason | string | |
confirm | boolean |
Responses
| Status | Body | Description |
|---|---|---|
200 | Cancellation | Cancellation |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
state required | string | One of: none, trialing, active, past_due, read_only, suspended, cancelled. |
ends_at required | string or null (date-time) | |
refund_cents required | integer | Cents given back under the 30-day money-back guarantee (monthly plans only), or 0. It is the sum of refund_to_card_cents and refund_to_credit_cents. Range: 0 to any. |
refund_to_card_cents required | integer | The part of the refund that went back to the card through Stripe. Range: 0 to any. |
refund_to_credit_cents required | integer | The part of the refund that went back to the company's account credit, because account credit paid that part of the plan. Range: 0 to any. |
non_refundable | boolean | True when the plan is annual or three year: it runs to ends_at, renewal stops, and no refund or credit is given. |
credit_to_card_cents | integer | Unused account credit from month to month payments that goes back to the card that paid it when the company's last plan ends. Present when the company holds account credit and this cancel ends its last plan. Payments are final: this is the only credit paid out. Range: 0 to any. |
credit_kept_cents | integer | Account credit that is never paid out: credit from an annual or 3 year term, a courtesy credit, a referral reward, or a promotion. It stays on the account and lapses with it. Range: 0 to any. |
message | string | One plain sentence about what happens next, such as the end date for a prepaid plan. |
What cancelling one plan would refund, before it happens
get/billing/subscriptions/{id}/cancel-previewPermalink to What cancelling one plan would refund, before it happens
- Scope:
billing:read - Permission:
billing.read
Answers the same 404 and 409 as the cancel, then says whether the plan would end now, how much would be refunded, how much of that goes to the card (refund_to_card_cents) and how much to the company's account credit (refund_to_credit_cents), and the one plain sentence to show. Outside the 30 day money back window the answer says that nothing is refunded. When the cancel would end the company's last plan and it holds account credit, credit_to_card_cents is the unused credit from month to month payments that goes back to the card, credit_kept_cents is the credit that is never paid out, and the message says both. Pass immediately=true to ask about ending a plan now. Changes nothing.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the subscription. |
immediately | query | string | One of: true, false. Default: false. |
Responses
| Status | Body | Description |
|---|---|---|
200 | CancelPreview | Cancel preview |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
plan_name required | string | |
ends_now required | boolean | True when the plan ends right away: inside the money back window, or when asked to end now. |
ends_at required | string or null (date-time) | When the plan ends. |
refundable required | boolean | True when the cancel gives money back. |
refund_cents required | integer | Range: 0 to any. |
refund_to_card_cents required | integer | Range: 0 to any. |
refund_to_credit_cents required | integer | Range: 0 to any. |
non_refundable | boolean | True for an annual or three year plan: it runs to ends_at, with no refund or credit. |
credit_to_card_cents | integer | Unused account credit from month to month payments that would go back to the card when the plan ends. Present when the company holds account credit and this cancel ends its last plan. message says it in one sentence. Range: 0 to any. |
credit_kept_cents | integer | Account credit that is never paid out. It stays on the account and lapses with it. Range: 0 to any. |
message required | string |
Add or remove site licenses, or change the term, on one subscription
put/billing/subscriptions/{id}/licensePermalink to Add or remove site licenses, or change the term, on one subscription
- Scope:
billing:write - Permission:
billing.write - Needs a confirmation
Moves the subscription to another plan size (credits, the number of site licenses) or term. More site licenses prorate for the rest of the period and are charged now (ADR 315): a declined card answers 402 card_declined and changes nothing, and a company that is past due answers 409 until the open invoice is paid. Fewer site licenses on a monthly term credit the unused time on the next invoice. A new term starts now. Fewer site licenses than the subscription's real sites answers 409 with a PlanChangeBlocked body listing what to remove first. A prepaid plan moves up mid-term but moves down only when it renews: 409 with the code change_at_renewal. An annual or three year term needs acknowledge_non_refundable: true. Without a billing name and address on file it answers 409 billing_details_required. Site tiers stay as they are. Needs confirm: true. An Enterprise company has unlimited sites and buys one Single tier for each site, so it may buy only the 1 site license: any other size is refused with 422.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the subscription. |
Idempotency-Key | header | string | Optional on PUT and PATCH. When the call starts a job, a retry with the same key, path, and body within 24 hours returns that job instead of starting another. A different path or body starts a new job. |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Request body application/json, required, ChangeLicenseRequest
Fields
| Name | Type | Description |
|---|---|---|
credits required | integer | The new number of credits: a license size on sale. |
interval | string | The new term. Defaults to the license's own. One of: monthly, annual, triennial. |
acknowledge_non_refundable | boolean | Required (true) when the new term is annual or three year: those terms are not refundable. |
confirm | boolean |
Responses
| Status | Body | Description |
|---|---|---|
200 | Subscription | The subscription after the change |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
stripe_subscription_id required | string or null | Null for a license that was backfilled from the old company columns and has no Stripe id. |
license required | string | license_5. |
license_name required | string | "WP 5". |
display_name | string | Which subscription this is, as every screen shows it: "WP 20, 14 of 20 site licenses free, Purchase date: Oct 19, 2026". A repeat in the list ends in "(2)". |
lookup_key required | string or null | |
interval required | string or null | One of: monthly, annual, triennial. |
status required | string | One of: incomplete, incomplete_expired, trialing, active, past_due, unpaid, canceled, paused. |
credits required | integer | The site credits. Range: 0 to any. |
credits_used required | integer | Real sites using a credit. Range: 0 to any. |
credits_free required | integer | Credits no site uses. Range: 0 to any. |
accepts_sites required | boolean | True when a new site may use this license now: a free credit and a status that takes sites. |
tiers required | array of object | How many of the license's sites run at each tier above the included one. |
tiers[].tier required | string | One of: base, tier_40, tier_65, tier_125, tier_250. |
tiers[].sites required | integer | Range: 0 to any. |
current_period_end required | string or null (date-time) | |
cancel_at_period_end required | boolean | |
term_months | integer or null | Months the term covers: 1, 12, or 36. |
non_refundable | boolean | True for annual and three year licenses: paid once and not refundable. |
renews_on | string or null (date-time) | The renewal date, or null when the license is set to end. |
access_until | string or null (date-time) | The last day of access when the license is set to end, else null. |
created_at required | string (date-time) | |
canceled_at required | string or null (date-time) | |
locked_amount_cents | integer or null | The license's price per interval, without site tiers. It never goes up while it is active. |
What adding or removing site licenses, or changing the term, would do
get/billing/subscriptions/{id}/license-previewPermalink to What adding or removing site licenses, or changing the term, would do
- Scope:
billing:read - Permission:
billing.read
For one subscription and the site licenses and term you name: whether the change is allowed, the plain reasons when it is not (more real sites than site licenses, environments or disk over the smaller pool, a prepaid term that moves at renewal, a size that is not sold), the new plan price, and an estimate of the prorated amount for the rest of the period, with billed: now for a larger plan or a new term and next_invoice for a smaller monthly plan. A larger plan is refused while a payment is past due. Changes nothing. An Enterprise company has unlimited sites and buys one Single tier for each site, so it may buy only the 1 site license: any other size is refused with 422.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the subscription. |
credits required | query | integer | |
interval | query | string | One of: monthly, annual, triennial. |
Responses
| Status | Body | Description |
|---|---|---|
200 | LicenseChangePreview | Plan change preview |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
subscription_id required | string (uuid) | |
lookup_key required | string | |
license_name required | string | |
credits required | integer | |
interval required | string | One of: monthly, annual, triennial. |
current_lookup_key required | string or null | |
current_license_name required | string or null | |
current_credits required | integer | Range: 0 to any. |
direction required | string | More credits or a longer term (up), fewer credits (down), or no change (same). One of: up, down, same. |
allowed required | boolean | |
refusals required | array of object | |
refusals[].code required | string | One of: same_license, not_sold, too_many_sites, too_many_environments, change_at_renewal, not_writable, dispute_open, billing_details_required. |
refusals[].message required | string | |
new_price_cents required | integer | The license's price for one billing period of its term. Site tiers are on top. Range: 0 to any. |
adjustment_cents required | integer | |
billed required | string | now for a larger plan or a new term; next_invoice for a smaller plan on the same term. One of: next_invoice, now. |
billed_on required | string or null (date-time) | |
renews_on required | string or null (date-time) | |
term_months required | integer | |
non_refundable required | boolean |
The company's main plan, entitlements, add-ons, and usage
get/billing/summaryPermalink to The company's main plan, entitlements, add-ons, and usage
- Scope:
billing:read - Permission:
billing.read
Returns the company's plan and its state, the add-ons, the usage, the renewal date, and the estimate of the next invoice in cents. Owners, Admins, and Billing users may read it.
Responses
| Status | Body | Description |
|---|---|---|
200 | BillingSummary | Billing summary |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
state required | string | One of: none, trialing, active, past_due, read_only, suspended, cancelled. |
license required | object or null | |
license.size required | integer | The site credits: 1, 2, 5, 10, or 20 on sale, 40 to 150 through an account rep. |
license.slug required | string | license_5. |
license.name required | string | "WP 5". |
license.first_month_free required | boolean | True when the license has a free first month on the annual and three year terms (the 1 site license). |
license.prices required | array of object | |
license.limits required | object | The pool at the included tier. A tier upgrade adds to it (tiers). |
license.draft required | boolean | True while the amounts are not signed off. |
license.available required | boolean | False while a platform change the license needs has not shipped (the launch gate). |
license.hidden required | boolean | True for a size only an account rep applies. The customer's list never carries one. |
license.annual_discount_bps required | integer | The annual discount against twelve monthly payments, in basis points. |
license.triennial_discount_bps required | integer | The three year discount against 36 monthly payments, in basis points. |
lookup_key required | string or null | |
interval required | string or null | One of: monthly, annual, triennial. |
entitlements required | object | |
entitlements.profile required | string or null | The resource profile the limits come from: a ladder row (single_40, wp_5) or a site profile (wp_5+tier_40). Placement and the PHP defaults read it. Null with no license. |
entitlements.license required | string or null | The license the limits belong to (license_5), or null with no license. |
entitlements.site_tier | string | One site's tier, on the limits of one site. Absent on the limits of a whole license. One of: base, tier_40, tier_65, tier_125, tier_250. |
entitlements.dedicated_vcpus | integer | vCPUs pinned to one site. 0 on every plan and tier since ADR 241: sites share cores. Range: 0 to any. |
entitlements.metric required | string | One of: bandwidth. |
entitlements.interval required | string or null | One of: monthly, annual, triennial. |
entitlements.sites required | integer | The license's site credits: how many real sites it holds. Range: 0 to any. |
entitlements.disk_bytes required | integer | Range: 0 to any. |
Usage this period against the plan
get/billing/usagePermalink to Usage this period against the plan
- Scope:
billing:read - Permission:
billing.read
The same numbers Analytics and the invoice show, from the same records.
Responses
| Status | Body | Description |
|---|---|---|
200 | BillingUsage | Usage |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
period_start required | string (date-time) | |
period_end required | string (date-time) | |
lines required | array of object | |
lines[].metric required | string | One of: visits, bandwidth, disk, cdn, dedicated_bandwidth. |
lines[].used required | number | Range: 0 to any. |
lines[].included required | number or null | Range: 0 to any. |
lines[].overage required | number | Range: 0 to any. |
lines[].overage_cents required | integer | Range: 0 to any. |
lines[].percent required | number or null | Used over included, as a percentage, or null when the metric has no limit. Range: 0 to any. |
lines[].status required | string | ok: measured. permission_needed: Cloudflare refused the platform token, so this number is not known and used is not a real zero. not_collected: nothing has been measured yet. One of: ok, permission_needed, not_collected. Default: ok. |
lines[].note required | string or null | Where the number came from, or why it is missing. |
lines[].source required | string or null | node_logs, cloudflare, heartbeat, or null when nothing was measured. |
overage_total_cents required | integer | The overage cents so far this period across all lines. Default: 0. Range: 0 to any. |
updated_at required | string or null (date-time) | When the newest figure was measured, or null when nothing was. |
previous_period required | object or null | The month before this one and the overage it put on the invoice, in cents: what Stripe was told for that month. Null before the plan's first full month, and null without a live plan. |
previous_period.period_start required | string (date-time) | |
previous_period.period_end required | string (date-time) | |
previous_period.overage_cents required | integer | Range: 0 to any. |
The company's add-ons
get/companies/me/add-onsPermalink to The company's add-ons
- Permission:
billing.read - Dashboard session only, no API key
Every add-on on the company, removed ones included, and what the active ones add to the company's limits. Session only.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | CompanyAddonList | Add-ons |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of object | |
data[].id required | string (uuid) | |
data[].addon_key required | string | |
data[].quantity required | integer | |
data[].environment_id required | string or null (uuid) | |
data[].subscription_id | string or null (uuid) | The subscription whose Stripe item bills the add-on, or null when it bills on its own. |
data[].site_id | string or null (uuid) | The site the add-on belongs to, when it names an environment. Null for a company wide add-on. |
data[].status required | string | One of: pending, active, failed, removed. |
data[].proration_cents required | integer | |
data[].monthly_cents required | integer | |
data[].credit_cents required | integer | |
data[].job_id required | string or null (uuid) | The node job that applies it, or null when there is no node work. |
data[].created_at required | string (date-time) | |
data[].removed_at required | string or null (date-time) | |
next_cursor | string or null | |
entitlements required | object | |
entitlements.sites required | number | |
entitlements.disk_gb required | number | |
entitlements.php_pool_mb required | number | |
entitlements.redis_mb required | number | |
entitlements.features required | array of string |
Buy an add-on
post/companies/me/add-onsPermalink to Buy an add-on
- Permission:
billing.write - Dashboard session only, no API key
Adds an add-on such as additional_disk or redis_512mb. The unused days of the period are added to your next invoice, and the monthly price applies from the next period. Owners, Admins, and Billing users only. Session only. When the add-on needs node work the answer points at the job.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, AddCompanyAddonRequest
Fields
| Name | Type | Description |
|---|---|---|
addon_key required | string | |
quantity | integer | Range: 1 to 50. |
environment_id | string or null (uuid) | UUIDv7 |
promo_code | string | A promo code. It takes effect on the first, prorated charge only. |
Responses
| Status | Body | Description |
|---|---|---|
202 | CompanyAddonAdded | Add-on added |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
addon required | object | |
addon.id required | string (uuid) | |
addon.addon_key required | string | |
addon.quantity required | integer | |
addon.environment_id required | string or null (uuid) | |
addon.subscription_id | string or null (uuid) | The subscription whose Stripe item bills the add-on, or null when it bills on its own. |
addon.site_id | string or null (uuid) | The site the add-on belongs to, when it names an environment. Null for a company wide add-on. |
addon.status required | string | One of: pending, active, failed, removed. |
addon.proration_cents required | integer | |
addon.monthly_cents required | integer | |
addon.credit_cents required | integer | |
addon.job_id required | string or null (uuid) | The node job that applies it, or null when there is no node work. |
addon.created_at required | string (date-time) | |
addon.removed_at required | string or null (date-time) | |
proration_cents required | integer | The prorated charge for the rest of the current period, after any promo discount. |
job_id required | string or null (uuid) | |
discount_cents | integer | Cents a promo code took off the charge. Absent when no code was sent. Range: 0 to any. |
The add-ons the company holds, grouped, with where each is used
get/companies/me/add-ons/summaryPermalink to The add-ons the company holds, grouped, with where each is used
- Scope:
billing:read - Permission:
billing.read
One row for each kind of add-on the company holds (Additional Disk Space, Redis, Safe Updates, and the rest), for each site tier in use, and for the additional preview slots, with the units held, the term, the price, and the sites and environments that use it (at most 100 per row, uses_total says how many there are). A removed add-on is not listed. Owners, Admins, and Billing users.
Responses
| Status | Body | Description |
|---|---|---|
200 | CompanyAddonSummary | Add-on summary |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
items required | array of object | |
items[].key required | string | additional_disk, redis_512mb, tier_40, additional_previews: the add-on key or tier. |
items[].kind required | string | One of: addon, site_tier, preview_slots. |
items[].name required | string | |
items[].summary required | string | One sentence about the add-on. |
items[].term required | string | One of: monthly, annual, triennial, hourly, per_backup. |
items[].quantity required | integer | Units held: blocks, sites, slots. Range: 0 to any. |
items[].subscription_id required | string or null (uuid) | The subscription the units bill on, when they all bill on one. |
items[].uses required | array of object | The places that use it, by site name, at most COMPANY_ADDON_USES_LIMIT. |
items[].uses_total required | integer | Range: 0 to any. |
Remove an add-on
delete/companies/me/add-ons/{id}Permalink to Remove an add-on
- Permission:
billing.write - Dashboard session only, no API key
Switches the add-on off and credits the unused part of the period. Only Additional Disk Space, Redis, and hourly backups are removed here; any other add-on answers 422 and is turned off with POST /sites/{id}/add-ons/{key}/cancel, which also undoes it on the server. Owners, Admins, and Billing users only. Session only.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the add-on on the company. |
Responses
| Status | Body | Description |
|---|---|---|
202 | CompanyAddonRemoved | Add-on removed |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
addon required | object | |
addon.id required | string (uuid) | |
addon.addon_key required | string | |
addon.quantity required | integer | |
addon.environment_id required | string or null (uuid) | |
addon.subscription_id | string or null (uuid) | The subscription whose Stripe item bills the add-on, or null when it bills on its own. |
addon.site_id | string or null (uuid) | The site the add-on belongs to, when it names an environment. Null for a company wide add-on. |
addon.status required | string | One of: pending, active, failed, removed. |
addon.proration_cents required | integer | |
addon.monthly_cents required | integer | |
addon.credit_cents required | integer | |
addon.job_id required | string or null (uuid) | The node job that applies it, or null when there is no node work. |
addon.created_at required | string (date-time) | |
addon.removed_at required | string or null (date-time) | |
credit_cents required | integer | The credit for the unused part of the period. |
job_id required | string or null (uuid) |
The company's dedicated server
get/companies/me/dedicated-serverPermalink to The company's dedicated server
- Scope:
billing:read - Permission:
billing.read
The server the company pays for, for the Billing page: name, location, size, the monthly equivalent and the one charge of the term, the end of the paid term (the next invoice date), the newest invoice with its status in plain words (draft, open, paid, past_due, void) and its hosted invoice link, the sites on it, the change in progress, and what the caller may do now. server is null when the company has none. open_request is a request staff have not answered yet.
Responses
| Status | Body | Description |
|---|---|---|
200 | DedicatedServerResponse | The server and any open request |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
server required | object or null | Null when the company has no live dedicated server. |
server.id required | string | The invoice record id. |
server.name required | string | The server name staff and the customer both read, such as ded-4f2a91c7. |
server.region required | string | |
server.region_name required | string | |
server.tier required | string | |
server.vcpu required | integer or null | |
server.memory_mb required | integer or null | |
server.disk_gb required | integer or null | |
server.included_bandwidth_gb required | integer or null | Bandwidth included each month in GB. |
server.bandwidth_used_gb required | number or null | Bandwidth used this month in GB. Null until metering reports it: the hook is dedicatedBandwidthUsedGb in the API. Range: 0 to any. |
server.term required | string | One of: monthly, annual, three_year. |
server.monthly_cents required | integer | The monthly price, or the monthly equivalent of the term. Range: 0 to any. |
server.total_cents required | integer | The one charge of the term in cents. Not refundable. Range: 0 to any. |
server.status required | string | The record status: open (waiting for payment), paid, provisioning, ready, active, cancelling, and so on. |
server.next_invoice_at required | string or null (date-time) | When the next term invoice is written: the end of the paid term. Null before payment or after a cancel. |
server.service_ends_at required | string or null (date-time) | When a cancelled server's paid term ends. |
server.cancelled_at required | string or null (date-time) | |
server.latest_invoice required | object or null | |
server.sites required | array of object | |
server.environments | array of object | The environments on the server, with their state. Optional so an older API parses. |
server.lifecycle required | object or null | |
server.actions required | object | |
server.payment_notice | string or null | One sentence when a payment for the server failed or the saved card cannot pay the next renewal, the same as the email says. Null when nothing is wrong. |
Cancel the dedicated server
post/companies/me/dedicated-server/cancelPermalink to Cancel the dedicated server
- Scope:
billing:write - Permission:
billing.write - Needs a confirmation
An unpaid invoice is voided. A paid server first moves every site to shared hosting (send move_sites_to_shared: true; without it a server with sites on it answers 409 with a plain reason), then the renewal ends at the end of the paid term, a restore point is taken on each site's new home, and the server is drained and deleted. The paid term is not refunded. Needs confirm: true. Safe to repeat. Owners, Admins, and Billing users.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Request body application/json, required, DedicatedCancelRequest
Fields
| Name | Type | Description |
|---|---|---|
move_sites_to_shared | boolean | The customer's choice for the sites still on the server. True moves each one to shared hosting first. Without it, a server with sites on it is refused with a plain reason. |
reason | string | |
confirm | boolean | Cancelling ends the server and is not refunded. |
Responses
| Status | Body | Description |
|---|---|---|
202 | DedicatedServerResponse | The cancel started |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
server required | object or null | Null when the company has no live dedicated server. |
server.id required | string | The invoice record id. |
server.name required | string | The server name staff and the customer both read, such as ded-4f2a91c7. |
server.region required | string | |
server.region_name required | string | |
server.tier required | string | |
server.vcpu required | integer or null | |
server.memory_mb required | integer or null | |
server.disk_gb required | integer or null | |
server.included_bandwidth_gb required | integer or null | Bandwidth included each month in GB. |
server.bandwidth_used_gb required | number or null | Bandwidth used this month in GB. Null until metering reports it: the hook is dedicatedBandwidthUsedGb in the API. Range: 0 to any. |
server.term required | string | One of: monthly, annual, three_year. |
server.monthly_cents required | integer | The monthly price, or the monthly equivalent of the term. Range: 0 to any. |
server.total_cents required | integer | The one charge of the term in cents. Not refundable. Range: 0 to any. |
server.status required | string | The record status: open (waiting for payment), paid, provisioning, ready, active, cancelling, and so on. |
server.next_invoice_at required | string or null (date-time) | When the next term invoice is written: the end of the paid term. Null before payment or after a cancel. |
server.service_ends_at required | string or null (date-time) | When a cancelled server's paid term ends. |
server.cancelled_at required | string or null (date-time) | |
server.latest_invoice required | object or null | |
server.sites required | array of object | |
server.environments | array of object | The environments on the server, with their state. Optional so an older API parses. |
server.lifecycle required | object or null | |
server.actions required | object | |
server.payment_notice | string or null | One sentence when a payment for the server failed or the saved card cannot pay the next renewal, the same as the email says. Null when nothing is wrong. |
Move sites from the dedicated server back to shared hosting
post/companies/me/dedicated-server/move-backPermalink to Move sites from the dedicated server back to shared hosting
- Scope:
billing:write - Permission:
billing.write - Needs a confirmation
Moves one site (site_id), or every site, to a shared server in the same location. Each site is a job (a restore point, a copy, a switch, a check) that you follow in the job drawer; sites move one at a time. The server and its price stay. Refused with a plain reason, and nothing started, when a site cannot move or no shared server has room. Needs confirm: true. Owners, Admins, and Billing users.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Request body application/json, required, DedicatedMoveBackRequest
Fields
| Name | Type | Description |
|---|---|---|
site_id | string (uuid) | One site to move back. Leave it out to move every site on the server. |
confirm | boolean | Moving a live site is a real change. |
Responses
| Status | Body | Description |
|---|---|---|
202 | DedicatedServerResponse | The move started |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
202 response fields
| Name | Type | Description |
|---|---|---|
server required | object or null | Null when the company has no live dedicated server. |
server.id required | string | The invoice record id. |
server.name required | string | The server name staff and the customer both read, such as ded-4f2a91c7. |
server.region required | string | |
server.region_name required | string | |
server.tier required | string | |
server.vcpu required | integer or null | |
server.memory_mb required | integer or null | |
server.disk_gb required | integer or null | |
server.included_bandwidth_gb required | integer or null | Bandwidth included each month in GB. |
server.bandwidth_used_gb required | number or null | Bandwidth used this month in GB. Null until metering reports it: the hook is dedicatedBandwidthUsedGb in the API. Range: 0 to any. |
server.term required | string | One of: monthly, annual, three_year. |
server.monthly_cents required | integer | The monthly price, or the monthly equivalent of the term. Range: 0 to any. |
server.total_cents required | integer | The one charge of the term in cents. Not refundable. Range: 0 to any. |
server.status required | string | The record status: open (waiting for payment), paid, provisioning, ready, active, cancelling, and so on. |
server.next_invoice_at required | string or null (date-time) | When the next term invoice is written: the end of the paid term. Null before payment or after a cancel. |
server.service_ends_at required | string or null (date-time) | When a cancelled server's paid term ends. |
server.cancelled_at required | string or null (date-time) | |
server.latest_invoice required | object or null | |
server.sites required | array of object | |
server.environments | array of object | The environments on the server, with their state. Optional so an older API parses. |
server.lifecycle required | object or null | |
server.actions required | object | |
server.payment_notice | string or null | One sentence when a payment for the server failed or the saved card cannot pay the next renewal, the same as the email says. Null when nothing is wrong. |
The price of each dedicated server size in a region
get/companies/me/dedicated-server/quotePermalink to The price of each dedicated server size in a region
- Scope:
billing:read - Permission:
billing.read
The four sizes with their annual and three year prices in one location. The price follows Google's price for the location: the base price holds where Google's price is the base, and another location can cost more or less. A location that takes no servers, or whose price has not been read, answers 409 with region_not_open or region_price_unavailable. Without region, the server's location, else the default.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
region | query | string | A region code such as us-east4. Defaults to the server's region, else the default region. |
Responses
| Status | Body | Description |
|---|---|---|
200 | DedicatedServerQuote | Sizes and prices |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
region required | string | |
region_name required | string | |
stale required | boolean | True when Google's price for the region was read a while ago. |
data required | array of object | Sizes by vCPUs and memory. The key is dedicated-<vCPUs>, and no machine type is sent. |
data[].key required | string | The key to send when creating an invoice, such as c4d-8. |
data[].vcpu required | integer | |
data[].memory_mb required | integer | |
data[].disk_gb required | integer | The data disk in GB: 500, and 1,000 on the 32 vCPU tier. |
data[].included_bandwidth_gb required | integer | Bandwidth included each month in GB. Shown only: metering is not built. |
data[].term_prices required | object | The price by term. A prepaid term is paid once and is not refundable. monthly is one month at a time with no commitment, and its total_cents is that month. |
Cancel the open dedicated server request
delete/companies/me/dedicated-server/requestPermalink to Cancel the open dedicated server request
- Scope:
billing:write - Permission:
billing.write
Withdraws the request for a dedicated server or a size change that staff have not answered. The request closes, and nothing is charged or changed. 409 when no request is open. Owners, Admins, and Billing users.
Responses
| Status | Body | Description |
|---|---|---|
200 | DedicatedServerResponse | The request is cancelled |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
server required | object or null | Null when the company has no live dedicated server. |
server.id required | string | The invoice record id. |
server.name required | string | The server name staff and the customer both read, such as ded-4f2a91c7. |
server.region required | string | |
server.region_name required | string | |
server.tier required | string | |
server.vcpu required | integer or null | |
server.memory_mb required | integer or null | |
server.disk_gb required | integer or null | |
server.included_bandwidth_gb required | integer or null | Bandwidth included each month in GB. |
server.bandwidth_used_gb required | number or null | Bandwidth used this month in GB. Null until metering reports it: the hook is dedicatedBandwidthUsedGb in the API. Range: 0 to any. |
server.term required | string | One of: monthly, annual, three_year. |
server.monthly_cents required | integer | The monthly price, or the monthly equivalent of the term. Range: 0 to any. |
server.total_cents required | integer | The one charge of the term in cents. Not refundable. Range: 0 to any. |
server.status required | string | The record status: open (waiting for payment), paid, provisioning, ready, active, cancelling, and so on. |
server.next_invoice_at required | string or null (date-time) | When the next term invoice is written: the end of the paid term. Null before payment or after a cancel. |
server.service_ends_at required | string or null (date-time) | When a cancelled server's paid term ends. |
server.cancelled_at required | string or null (date-time) | |
server.latest_invoice required | object or null | |
server.sites required | array of object | |
server.environments | array of object | The environments on the server, with their state. Optional so an older API parses. |
server.lifecycle required | object or null | |
server.actions required | object | |
server.payment_notice | string or null | One sentence when a payment for the server failed or the saved card cannot pay the next renewal, the same as the email says. Null when nothing is wrong. |
Ask staff for a different dedicated server size
post/companies/me/dedicated-server/resize-requestPermalink to Ask staff for a different dedicated server size
- Scope:
billing:write - Permission:
billing.write
Staff decide the size (ADR 131), so this opens a request with the size in its note and emails the staff. Nothing changes and nothing is charged until staff run the change and, for a larger size, you pay the price difference for the rest of the term. One open request at a time (409). Owners, Admins, and Billing users.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, DedicatedResizeRequest
Fields
| Name | Type | Description |
|---|---|---|
tier required | string | The size the customer would like. Staff check it and run the change. |
note | string |
Responses
| Status | Body | Description |
|---|---|---|
201 | DedicatedServerResponse | The request is open |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
201 response fields
| Name | Type | Description |
|---|---|---|
server required | object or null | Null when the company has no live dedicated server. |
server.id required | string | The invoice record id. |
server.name required | string | The server name staff and the customer both read, such as ded-4f2a91c7. |
server.region required | string | |
server.region_name required | string | |
server.tier required | string | |
server.vcpu required | integer or null | |
server.memory_mb required | integer or null | |
server.disk_gb required | integer or null | |
server.included_bandwidth_gb required | integer or null | Bandwidth included each month in GB. |
server.bandwidth_used_gb required | number or null | Bandwidth used this month in GB. Null until metering reports it: the hook is dedicatedBandwidthUsedGb in the API. Range: 0 to any. |
server.term required | string | One of: monthly, annual, three_year. |
server.monthly_cents required | integer | The monthly price, or the monthly equivalent of the term. Range: 0 to any. |
server.total_cents required | integer | The one charge of the term in cents. Not refundable. Range: 0 to any. |
server.status required | string | The record status: open (waiting for payment), paid, provisioning, ready, active, cancelling, and so on. |
server.next_invoice_at required | string or null (date-time) | When the next term invoice is written: the end of the paid term. Null before payment or after a cancel. |
server.service_ends_at required | string or null (date-time) | When a cancelled server's paid term ends. |
server.cancelled_at required | string or null (date-time) | |
server.latest_invoice required | object or null | |
server.sites required | array of object | |
server.environments | array of object | The environments on the server, with their state. Optional so an older API parses. |
server.lifecycle required | object or null | |
server.actions required | object | |
server.payment_notice | string or null | One sentence when a payment for the server failed or the saved card cannot pay the next renewal, the same as the email says. Null when nothing is wrong. |
Move one site to another tier
put/sites/{id}/tierPermalink to Move one site to another tier
- Scope:
billing:write - Permission:
billing.write - Needs a confirmation
Changes one site's tier (ADR 216). An upgrade is charged now for the rest of the period on the site's subscription; a declined card answers 402 card_declined and changes nothing. A downgrade on a monthly plan credits the unused time on the next invoice; on a prepaid plan it answers 409 change_at_renewal. When the site has a live environment, a set_php_performance job applies the new PHP threads, pinned vCPUs, and memory limits, and job_id names it. The tier applies to live only: staging and preview environments always run the included profile, with no extra charge. Without a billing name and address on file it answers 409 billing_details_required. Needs confirm: true.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the site. |
Idempotency-Key | header | string | Optional on PUT and PATCH. When the call starts a job, a retry with the same key, path, and body within 24 hours returns that job instead of starting another. A different path or body starts a new job. |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Request body application/json, required, SetSiteTierRequest
Fields
| Name | Type | Description |
|---|---|---|
tier required | string | One of: base, tier_40, tier_65, tier_125, tier_250. |
confirm | boolean |
Responses
| Status | Body | Description |
|---|---|---|
200 | SiteTierChange | The site's new tier |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
site_id required | string (uuid) | |
tier required | string | One of: base, tier_40, tier_65, tier_125, tier_250. |
charged_cents required | integer | What was charged now, in cents. 0 for a downgrade. Range: 0 to any. |
job_id required | string or null (uuid) | The job that applies the new limits to the site's live environment, or null when it has none yet. |
What moving one site to another tier would do
get/sites/{id}/tier-previewPermalink to What moving one site to another tier would do
- Scope:
billing:read - Permission:
billing.read
The site's tier now and the one you name, whether the move is allowed and why not, the price change on its subscription, and an estimate of what is charged now (an upgrade) or credited on the next invoice (a downgrade on a monthly plan). A downgrade of a prepaid plan waits for the renewal: change_at_renewal. The tier is the site's and applies to live only: staging and preview environments always run the included profile. Changes nothing.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the site. |
tier required | query | string | One of: base, tier_40, tier_65, tier_125, tier_250. |
Responses
| Status | Body | Description |
|---|---|---|
200 | SiteTierPreview | Site tier preview |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
site_id required | string (uuid) | |
subscription_id required | string or null (uuid) | |
from required | string | One of: base, tier_40, tier_65, tier_125, tier_250. |
to required | string | One of: base, tier_40, tier_65, tier_125, tier_250. |
from_name required | string | |
to_name required | string | |
direction required | string | One of: up, down, same. |
allowed required | boolean | |
refusals required | array of object | |
refusals[].code required | string | One of: same_tier, not_sold, no_license, test_site, change_at_renewal, not_writable, dispute_open, billing_details_required. |
refusals[].message required | string | |
interval required | string or null | One of: monthly, annual, triennial. |
new_price_cents required | integer | The site's tier price for one billing period after the change. Range: 0 to any. |
price_change_cents required | integer | The change to the license's price each period: positive costs more. |
adjustment_cents required | integer | The estimated amount of the change: positive is charged, negative is credit. For an upgrade billed now it is everything the change charges: the tier for the rest of the period plus pending_lines. |
tier_adjustment_cents | integer | The tier's own prorated amount for the rest of the period, without pending_lines. Optional so an older API parses. |
pending_lines | array of object | Lines already waiting on the subscription that an upgrade billed now charges with the tier, each on its own, such as the prorated surcharge of a site just placed in Frankfurt. Empty when nothing waits or nothing is billed now. Optional so an older API parses. |
pending_lines[].description required | string | In plain words, such as "Data center surcharge, Frankfurt, prorated". |
pending_lines[].amount_cents required | integer | Positive is charged, negative is a credit. |
pending_lines[].lookup_key required | string or null | The catalog key of the line's price, or null for a one time line. |
billed required | string | One of: now, next_invoice. |
non_refundable required | boolean | |
limits required | object | The site's limits at the new tier. |
limits.bandwidth_bytes required | integer or null | Included server bandwidth a month in bytes: what the site's server sends out. Range: 0 to any. |