Skip to content

Billing

37 operations in the WP Waterfall API.

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

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200AddonCatalogListAdd-ons
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
data requiredarray of object
data[].key requiredstring
data[].lookup_key requiredstring
data[].name requiredstring
data[].summary requiredstring
data[].route requiredstringOne of: addon, disaster_recovery.
data[].scope requiredstringOne of: company, environment, site, zone, node.
data[].unit requiredstring
data[].monthly_cents requiredinteger or nullThe 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 requiredinteger or nullThe price of one unit for one price_interval. Null when metered, quoted, or included.
data[].price_interval requiredstring or nullWhat unit_cents covers: a month or a year. Null when there is no flat price. One of: month, year.
data[].min_quantity requiredintegerThe fewest units one purchase holds.
data[].metered requiredobject or null
data[].quote_from_cents requiredinteger or null
data[].plan_keys requiredarray or nullPlan lookup keys that may buy it. Null means every plan.
data[].max_quantity requiredinteger
data[].grants requiredarray of object
data[].features requiredarray of string
next_cursorstring 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

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200AdditionalPreviewsUsageThe slots and the environments in them
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
slots requiredintegerSlots the company holds: a license for this many additional previews at a time. Range: 0 to any.
slots_in_use requiredintegerSlots with an additional preview environment in them now. Range: 0 to any.
slots_free requiredintegerRange: 0 to any.
max_slots requiredintegerThe most slots the company may hold before staff raise the limit.
included_previews requiredintegerRange: 0 to any.
monthly_cents requiredintegerWhat one slot costs a month in cents when it is used the whole month. Range: 0 to any.
period_start requiredstring
period_end requiredstring
used_hours requirednumberSlot hours used so far this billing period. Unused slot time is never charged. Range: 0 to any.
used_cents requiredintegerWhat the used hours cost so far, in cents. Range: 0 to any.
data requiredarray of object
data[].environment_id requiredstring (uuid)UUIDv7
data[].environment_name requiredstring
data[].site_id requiredstring (uuid)UUIDv7
data[].site_name requiredstring
data[].created_at requiredstring (date-time)When it started using a slot.
next_cursor requiredstring or nullSet 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

NameInTypeDescription
Idempotency-KeyheaderstringOptional 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.
confirmquerystringAn 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

NameTypeDescription
slots requiredintegerRange: 0 to 1000.

Responses

StatusBodyDescription
200AdditionalPreviewSlotsThe slots now
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
slots requiredintegerSlots the company holds: a license for this many additional previews at a time. Range: 0 to any.
slots_in_use requiredintegerSlots with an additional preview environment in them now. Range: 0 to any.
slots_free requiredintegerRange: 0 to any.
max_slots requiredintegerThe most slots the company may hold before staff raise the limit.
included_previews requiredintegerRange: 0 to any.
monthly_cents requiredintegerWhat one slot costs a month in cents when it is used the whole month. Range: 0 to any.
period_start requiredstring
period_end requiredstring
used_hours requirednumberSlot hours used so far this billing period. Unused slot time is never charged. Range: 0 to any.
used_cents requiredintegerWhat 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
immediatelybooleanEnds now instead of at period end. Within 30 days of the first payment the refund is full. Default: false.
reasonstring
confirmboolean

Responses

StatusBodyDescription
200CancellationCancellation
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
state requiredstringOne of: none, trialing, active, past_due, read_only, suspended, cancelled.
ends_at requiredstring or null (date-time)
refund_cents requiredintegerCents 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 requiredintegerThe part of the refund that went back to the card through Stripe. Range: 0 to any.
refund_to_credit_cents requiredintegerThe 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_refundablebooleanTrue 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_centsintegerUnused 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_centsintegerAccount 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.
messagestringOne 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

StatusBodyDescription
200BillingDetailsBilling details
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
name requiredstring or nullThe name on invoices: the buyer's own name.
company_namestring or nullAn optional company name, printed on invoices with the name.
email requiredstring 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 requiredobject or null
address.line1 requiredstring
address.line2 requiredstring or null
address.city requiredstring
address.state requiredstring or null
address.postal_code requiredstring
address.country requiredstringISO 3166-1 alpha-2.
tax_id requiredobject or null
tax_id.type requiredstringA Stripe tax id type such as eu_vat or au_abn.
tax_id.value requiredstring
has_payment_method requiredbooleanTrue 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

NameInTypeDescription
Idempotency-KeyheaderstringOptional 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

NameTypeDescription
namestring or nullThe name on invoices: the buyer's own name.
company_namestring or nullAn optional company name, printed on invoices with the name.
emailstring (email)
addressobject or null
address.line1 requiredstring
address.line2 requiredstring or null
address.city requiredstring
address.state requiredstring
address.postal_code requiredstring
address.country requiredstringISO 3166-1 alpha-2.
tax_idobject or null
tax_id.type requiredstringA Stripe tax id type such as eu_vat or au_abn.
tax_id.value requiredstring

Responses

StatusBodyDescription
200BillingDetailsBilling details
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
name requiredstring or nullThe name on invoices: the buyer's own name.
company_namestring or nullAn optional company name, printed on invoices with the name.
email requiredstring 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 requiredobject or null
address.line1 requiredstring
address.line2 requiredstring or null
address.city requiredstring
address.state requiredstring or null
address.postal_code requiredstring
address.country requiredstringISO 3166-1 alpha-2.
tax_id requiredobject or null
tax_id.type requiredstringA Stripe tax id type such as eu_vat or au_abn.
tax_id.value requiredstring
has_payment_method requiredbooleanTrue 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

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: 1 to 200, and 50 when left out. Default: 50. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200InvoiceListInvoices
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
data requiredarray of objectThe rows of this page.
data[].id requiredstring (uuid)UUIDv7
data[].stripe_invoice_id requiredstring
data[].subscription_idstring or null (uuid)The subscription the invoice bills, or null for a one-time charge or an unknown plan.
data[].number requiredstring or null
data[].status requiredstringOne of: draft, open, paid, uncollectible, void.
data[].currency requiredstring
data[].subtotal_cents requiredinteger
data[].tax_cents requiredinteger
data[].total_cents requiredinteger
data[].amount_paid_cents requiredinteger
data[].period_start requiredstring (date-time)
data[].period_end requiredstring (date-time)
data[].lines requiredarray of object
data[].pdf_available requiredbooleanTrue 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 requiredstring or null (date-time)
data[].created_at requiredstring (date-time)
next_cursor requiredstring or nullSend 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the invoice.

Responses

StatusBodyDescription
200InvoicePageThe invoice
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
id requiredstring (uuid)Our invoice id, the one in the page address.
state requiredstringOne of: open, paid, void.
invoice_number requiredstring or nullThe invoice number, such as "2VRBR54J-0002", or null before Stripe numbers it.
currency requiredstring
tax_centsintegerThe tax Stripe put on the invoice, inside total_cents. 0 or absent when there is none.
total_cents requiredinteger
amount_due_cents requiredintegerWhat is still owed. 0 once paid or voided.
due_at requiredstring or null (date-time)
paid_at requiredstring or null (date-time)
memo requiredstring or nullThe note staff wrote, or null.
lines requiredarray of object
lines[].description requiredstringOur own words, such as "Dedicated server, 4 vCPUs, 31 GB memory, month to month".
lines[].quantity requiredintegerRange: 1 to any.
lines[].amount_cents requiredinteger
billed_to requiredarray of stringThe company the invoice is for: its billing name and address, as one line each.
from requiredstringWho sent it. Always WP Waterfall.
client_secret requiredstring or nullPays the open invoice with Stripe.js. Null unless the invoice is open and the caller can pay.
can_pay requiredbooleanFalse for staff looking at the invoice as the customer: they read it and cannot pay it.
auto_charge_consent requiredbooleanTrue for the first invoice of a month to month server: paying it lets the card be charged monthly.
pdf_available requiredbooleanTrue when the invoice has a PDF at GET /v1/billing/invoices/{id}/pdf.
publishable_key requiredstring or nullA 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the invoice.

Responses

StatusBodyDescription
200stringThe PDF
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem 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

NameInTypeDescription
lookup_key requiredquerystring
regionquerystringThe 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_codequerystringShows the order with this promo code applied. An invalid code is left out of the answer.

Responses

StatusBodyDescription
200LicensePreviewPlan preview
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
lookup_key requiredstring
license requiredstring
license_name requiredstring
interval requiredstringOne of: monthly, annual, triennial.
credits requiredintegerRange: 0 to any.
subtotal_cents requiredintegerRange: 0 to any.
tax_cents requiredintegerWhat Stripe Tax returns, or 0 while automatic tax is off. Range: 0 to any.
total_cents requiredintegerRange: 0 to any.
automatic_tax requiredboolean
trial_days requiredintegerDays of the free first month, or 0. Range: 0 to any.
due_today_cents requiredintegerWhat the card pays today: 0 during a free first month. Range: 0 to any.
first_term_centsintegerWith 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_monthsintegerMonths the term covers: 1, 12, or 36. Optional so an older API parses.
non_refundablebooleanTrue for annual and three year terms: billed once and not refundable.
renews_onstring (date-time)The date the term renews, ISO. Absent on a free first month.
draft requiredboolean
discount_centsintegerWith 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_centsintegerThe price each period once any discount ends. Present when a code is applied. Range: 0 to any.
promoobjectThe applied code, or absent when none was sent or it could not be used.
promo.code requiredstringThe code in upper case.
promo.name requiredstring
promo.description requiredstring"20% off for the first 3 months".
promo.kind requiredstringOne of: percent, amount.
promo.percent_off requirednumber 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

StatusBodyDescription
200LicenseCatalogPlans and tiers
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
account_type requiredstringThe account type whose list this is. The public list reads as individual. One of: individual, agency, enterprise.
licenses requiredarray of object
licenses[].size requiredintegerThe site credits: 1, 2, 5, 10, or 20 on sale, 40 to 150 through an account rep.
licenses[].slug requiredstringlicense_5.
licenses[].name requiredstring"WP 5".
licenses[].first_month_free requiredbooleanTrue when the license has a free first month on the annual and three year terms (the 1 site license).
licenses[].prices requiredarray of object
licenses[].limits requiredobjectThe pool at the included tier. A tier upgrade adds to it (tiers).
licenses[].draft requiredbooleanTrue while the amounts are not signed off.
licenses[].available requiredbooleanFalse while a platform change the license needs has not shipped (the launch gate).
licenses[].hidden requiredbooleanTrue for a size only an account rep applies. The customer's list never carries one.
licenses[].annual_discount_bps requiredintegerThe annual discount against twelve monthly payments, in basis points.
licenses[].triennial_discount_bps requiredintegerThe three year discount against 36 monthly payments, in basis points.
tiers requiredarray of object
tiers[].tier requiredstringOne of: base, tier_40, tier_65, tier_125, tier_250.
tiers[].name requiredstring"Plus".
tiers[].monthly_cents requiredintegerWhat the tier adds a month for one site. 0 for base. Range: 0 to any.
tiers[].prices requiredarray of objectWhat the tier adds for one site on each term. Empty for base.
tiers[].limits requiredobjectThe site's own limits at this tier, as on a 1 site license.
tiers[].available requiredboolean
enterprise_levels requiredarray of objectThe 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 requiredstringOne of: silver, gold, platinum, diamond.
enterprise_levels[].name requiredstring
enterprise_levels[].from_sites requiredintegerThe 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

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200PaymentMethodListCards
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
data requiredarray of PaymentMethod
data[].id requiredstring
data[].brand requiredstringvisa, mastercard, amex, and so on, as Stripe names it.
data[].last4 requiredstring
data[].exp_month requiredintegerRange: 1 to 12.
data[].exp_year requiredinteger
data[].default requiredbooleanTrue for the card that pays every plan and invoice.
next_cursorstring 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
payment_method_id requiredstring
set_defaultbooleanMakes it the default card. The first card is always the default. Default: false.

Responses

StatusBodyDescription
201PaymentMethodCard saved
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

201 response fields

NameTypeDescription
id requiredstring
brand requiredstringvisa, mastercard, amex, and so on, as Stripe names it.
last4 requiredstring
exp_month requiredintegerRange: 1 to 12.
exp_year requiredinteger
default requiredbooleanTrue 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the payment method, as Stripe names it.
confirmquerystringOne of: true.

Responses

StatusBodyDescription
204Removed
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the payment method, as Stripe names it.
Idempotency-Key requiredheaderstringSend 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

StatusBodyDescription
200PaymentMethodThe new default card
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
id requiredstring
brand requiredstringvisa, mastercard, amex, and so on, as Stripe names it.
last4 requiredstring
exp_month requiredintegerRange: 1 to 12.
exp_year requiredinteger
default requiredbooleanTrue 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

StatusBodyDescription
200PricingBreakdownRecurring charges
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
currency requiredstring
lines requiredarray of object
lines[].id requiredstring
lines[].kind requiredstringOne of: plan, site_tier, regional_surcharge, addon, dedicated_server, platform_fee.
lines[].name requiredstring"WP 5", "Plus site tier", "Additional Disk Space".
lines[].quantity requiredintegerRange: 0 to any.
lines[].term requiredstringOne of: monthly, annual, triennial, hourly.
lines[].amount_cents requiredintegerThe 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 requiredstring or null (uuid)The subscription the line bills on, or null for an add-on or server on its own subscription.
lines[].addon_key requiredstring or nullThe add-on key of an add-on line, such as additional_disk.
lines[].renews_on requiredstring or null (date-time)The next charge date, or null when the line will not renew or has no date.
lines[].ends_on requiredstring 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 requiredbooleanTrue 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 requiredarray of object
discounts[].name requiredstringThe coupon's name as the invoice prints it, such as "Spring sale".
discounts[].term requiredstringOne of: monthly, annual, triennial, hourly.
discounts[].amount_cents requiredintegerCents taken off. Positive.
discounts[].subscription_id requiredstring or null (uuid)
totals requiredarray of objectOne total for each term that has a counted line, in the order monthly, annual, triennial.
totals[].term requiredstringOne of: monthly, annual, triennial, hourly.
totals[].subtotal_cents requiredinteger
totals[].discount_cents requiredintegerRange: 0 to any.
totals[].tax_cents requiredintegerTax Stripe adds, in cents. Zero while tax collection is off. Range: 0 to any.
totals[].total_cents requiredintegerWhat 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

StatusBodyDescription
201SetupIntentSetup intent
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

201 response fields

NameTypeDescription
id requiredstring
client_secret requiredstring

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

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200SubscriptionListSubscriptions
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
data requiredarray of Subscription
data[].id requiredstring (uuid)UUIDv7
data[].stripe_subscription_id requiredstring or nullNull for a license that was backfilled from the old company columns and has no Stripe id.
data[].license requiredstringlicense_5.
data[].license_name requiredstring"WP 5".
data[].display_namestringWhich 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 requiredstring or null
data[].interval requiredstring or nullOne of: monthly, annual, triennial.
data[].status requiredstringOne of: incomplete, incomplete_expired, trialing, active, past_due, unpaid, canceled, paused.
data[].credits requiredintegerThe site credits. Range: 0 to any.
data[].credits_used requiredintegerReal sites using a credit. Range: 0 to any.
data[].credits_free requiredintegerCredits no site uses. Range: 0 to any.
data[].accepts_sites requiredbooleanTrue when a new site may use this license now: a free credit and a status that takes sites.
data[].tiers requiredarray of objectHow many of the license's sites run at each tier above the included one.
data[].current_period_end requiredstring or null (date-time)
data[].cancel_at_period_end requiredboolean
data[].term_monthsinteger or nullMonths the term covers: 1, 12, or 36.
data[].non_refundablebooleanTrue for annual and three year licenses: paid once and not refundable.
data[].renews_onstring or null (date-time)The renewal date, or null when the license is set to end.
data[].access_untilstring or null (date-time)The last day of access when the license is set to end, else null.
data[].created_at requiredstring (date-time)
data[].canceled_at requiredstring or null (date-time)
data[].locked_amount_centsinteger or nullThe license's price per interval, without site tiers. It never goes up while it is active.
next_cursorstring 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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.
confirmquerystringAn 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

NameTypeDescription
lookup_key requiredstring
payment_method_idstringA saved card. Defaults to the company's default card.
promo_codestringA 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_refundablebooleanRequired (true) when the plan is annual or three year: those terms are not refundable.
confirmboolean

Responses

StatusBodyDescription
201SubscriptionStartSubscription started
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

201 response fields

NameTypeDescription
stripe_subscription_id requiredstring
status requiredstringOne of: incomplete, incomplete_expired, trialing, active, past_due, unpaid, canceled, paused.
requires_action requiredboolean
client_secret requiredstring or null
payment_intent_id requiredstring 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the subscription.
Idempotency-Key requiredheaderstringSend 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.
confirmquerystringAn 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

NameTypeDescription
immediatelybooleanEnds now instead of at period end. Within 30 days of the first payment the refund is full. Default: false.
reasonstring
confirmboolean

Responses

StatusBodyDescription
200CancellationCancellation
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
state requiredstringOne of: none, trialing, active, past_due, read_only, suspended, cancelled.
ends_at requiredstring or null (date-time)
refund_cents requiredintegerCents 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 requiredintegerThe part of the refund that went back to the card through Stripe. Range: 0 to any.
refund_to_credit_cents requiredintegerThe 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_refundablebooleanTrue 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_centsintegerUnused 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_centsintegerAccount 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.
messagestringOne 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the subscription.
immediatelyquerystringOne of: true, false. Default: false.

Responses

StatusBodyDescription
200CancelPreviewCancel preview
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
plan_name requiredstring
ends_now requiredbooleanTrue when the plan ends right away: inside the money back window, or when asked to end now.
ends_at requiredstring or null (date-time)When the plan ends.
refundable requiredbooleanTrue when the cancel gives money back.
refund_cents requiredintegerRange: 0 to any.
refund_to_card_cents requiredintegerRange: 0 to any.
refund_to_credit_cents requiredintegerRange: 0 to any.
non_refundablebooleanTrue for an annual or three year plan: it runs to ends_at, with no refund or credit.
credit_to_card_centsintegerUnused 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_centsintegerAccount credit that is never paid out. It stays on the account and lapses with it. Range: 0 to any.
message requiredstring

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

NameInTypeDescription
id requiredpathstring (uuid)The id of the subscription.
Idempotency-KeyheaderstringOptional 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.
confirmquerystringAn 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

NameTypeDescription
credits requiredintegerThe new number of credits: a license size on sale.
intervalstringThe new term. Defaults to the license's own. One of: monthly, annual, triennial.
acknowledge_non_refundablebooleanRequired (true) when the new term is annual or three year: those terms are not refundable.
confirmboolean

Responses

StatusBodyDescription
200SubscriptionThe subscription after the change
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
stripe_subscription_id requiredstring or nullNull for a license that was backfilled from the old company columns and has no Stripe id.
license requiredstringlicense_5.
license_name requiredstring"WP 5".
display_namestringWhich 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 requiredstring or null
interval requiredstring or nullOne of: monthly, annual, triennial.
status requiredstringOne of: incomplete, incomplete_expired, trialing, active, past_due, unpaid, canceled, paused.
credits requiredintegerThe site credits. Range: 0 to any.
credits_used requiredintegerReal sites using a credit. Range: 0 to any.
credits_free requiredintegerCredits no site uses. Range: 0 to any.
accepts_sites requiredbooleanTrue when a new site may use this license now: a free credit and a status that takes sites.
tiers requiredarray of objectHow many of the license's sites run at each tier above the included one.
tiers[].tier requiredstringOne of: base, tier_40, tier_65, tier_125, tier_250.
tiers[].sites requiredintegerRange: 0 to any.
current_period_end requiredstring or null (date-time)
cancel_at_period_end requiredboolean
term_monthsinteger or nullMonths the term covers: 1, 12, or 36.
non_refundablebooleanTrue for annual and three year licenses: paid once and not refundable.
renews_onstring or null (date-time)The renewal date, or null when the license is set to end.
access_untilstring or null (date-time)The last day of access when the license is set to end, else null.
created_at requiredstring (date-time)
canceled_at requiredstring or null (date-time)
locked_amount_centsinteger or nullThe 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the subscription.
credits requiredqueryinteger
intervalquerystringOne of: monthly, annual, triennial.

Responses

StatusBodyDescription
200LicenseChangePreviewPlan change preview
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
subscription_id requiredstring (uuid)
lookup_key requiredstring
license_name requiredstring
credits requiredinteger
interval requiredstringOne of: monthly, annual, triennial.
current_lookup_key requiredstring or null
current_license_name requiredstring or null
current_credits requiredintegerRange: 0 to any.
direction requiredstringMore credits or a longer term (up), fewer credits (down), or no change (same). One of: up, down, same.
allowed requiredboolean
refusals requiredarray of object
refusals[].code requiredstringOne of: same_license, not_sold, too_many_sites, too_many_environments, change_at_renewal, not_writable, dispute_open, billing_details_required.
refusals[].message requiredstring
new_price_cents requiredintegerThe license's price for one billing period of its term. Site tiers are on top. Range: 0 to any.
adjustment_cents requiredinteger
billed requiredstringnow 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 requiredstring or null (date-time)
renews_on requiredstring or null (date-time)
term_months requiredinteger
non_refundable requiredboolean

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

StatusBodyDescription
200BillingSummaryBilling summary
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
state requiredstringOne of: none, trialing, active, past_due, read_only, suspended, cancelled.
license requiredobject or null
license.size requiredintegerThe site credits: 1, 2, 5, 10, or 20 on sale, 40 to 150 through an account rep.
license.slug requiredstringlicense_5.
license.name requiredstring"WP 5".
license.first_month_free requiredbooleanTrue when the license has a free first month on the annual and three year terms (the 1 site license).
license.prices requiredarray of object
license.limits requiredobjectThe pool at the included tier. A tier upgrade adds to it (tiers).
license.draft requiredbooleanTrue while the amounts are not signed off.
license.available requiredbooleanFalse while a platform change the license needs has not shipped (the launch gate).
license.hidden requiredbooleanTrue for a size only an account rep applies. The customer's list never carries one.
license.annual_discount_bps requiredintegerThe annual discount against twelve monthly payments, in basis points.
license.triennial_discount_bps requiredintegerThe three year discount against 36 monthly payments, in basis points.
lookup_key requiredstring or null
interval requiredstring or nullOne of: monthly, annual, triennial.
entitlements requiredobject
entitlements.profile requiredstring or nullThe 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 requiredstring or nullThe license the limits belong to (license_5), or null with no license.
entitlements.site_tierstringOne 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_vcpusintegervCPUs pinned to one site. 0 on every plan and tier since ADR 241: sites share cores. Range: 0 to any.
entitlements.metric requiredstringOne of: bandwidth.
entitlements.interval requiredstring or nullOne of: monthly, annual, triennial.
entitlements.sites requiredintegerThe license's site credits: how many real sites it holds. Range: 0 to any.
entitlements.disk_bytes requiredintegerRange: 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

StatusBodyDescription
200BillingUsageUsage
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
period_start requiredstring (date-time)
period_end requiredstring (date-time)
lines requiredarray of object
lines[].metric requiredstringOne of: visits, bandwidth, disk, cdn, dedicated_bandwidth.
lines[].used requirednumberRange: 0 to any.
lines[].included requirednumber or nullRange: 0 to any.
lines[].overage requirednumberRange: 0 to any.
lines[].overage_cents requiredintegerRange: 0 to any.
lines[].percent requirednumber or nullUsed over included, as a percentage, or null when the metric has no limit. Range: 0 to any.
lines[].status requiredstringok: 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 requiredstring or nullWhere the number came from, or why it is missing.
lines[].source requiredstring or nullnode_logs, cloudflare, heartbeat, or null when nothing was measured.
overage_total_cents requiredintegerThe overage cents so far this period across all lines. Default: 0. Range: 0 to any.
updated_at requiredstring or null (date-time)When the newest figure was measured, or null when nothing was.
previous_period requiredobject or nullThe 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 requiredstring (date-time)
previous_period.period_end requiredstring (date-time)
previous_period.overage_cents requiredintegerRange: 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

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: at most 200, and 200 when left out. Default: 200. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200CompanyAddonListAdd-ons
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
data requiredarray of object
data[].id requiredstring (uuid)
data[].addon_key requiredstring
data[].quantity requiredinteger
data[].environment_id requiredstring or null (uuid)
data[].subscription_idstring or null (uuid)The subscription whose Stripe item bills the add-on, or null when it bills on its own.
data[].site_idstring or null (uuid)The site the add-on belongs to, when it names an environment. Null for a company wide add-on.
data[].status requiredstringOne of: pending, active, failed, removed.
data[].proration_cents requiredinteger
data[].monthly_cents requiredinteger
data[].credit_cents requiredinteger
data[].job_id requiredstring or null (uuid)The node job that applies it, or null when there is no node work.
data[].created_at requiredstring (date-time)
data[].removed_at requiredstring or null (date-time)
next_cursorstring or null
entitlements requiredobject
entitlements.sites requirednumber
entitlements.disk_gb requirednumber
entitlements.php_pool_mb requirednumber
entitlements.redis_mb requirednumber
entitlements.features requiredarray 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
addon_key requiredstring
quantityintegerRange: 1 to 50.
environment_idstring or null (uuid)UUIDv7
promo_codestringA promo code. It takes effect on the first, prorated charge only.

Responses

StatusBodyDescription
202CompanyAddonAddedAdd-on added
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
addon requiredobject
addon.id requiredstring (uuid)
addon.addon_key requiredstring
addon.quantity requiredinteger
addon.environment_id requiredstring or null (uuid)
addon.subscription_idstring or null (uuid)The subscription whose Stripe item bills the add-on, or null when it bills on its own.
addon.site_idstring or null (uuid)The site the add-on belongs to, when it names an environment. Null for a company wide add-on.
addon.status requiredstringOne of: pending, active, failed, removed.
addon.proration_cents requiredinteger
addon.monthly_cents requiredinteger
addon.credit_cents requiredinteger
addon.job_id requiredstring or null (uuid)The node job that applies it, or null when there is no node work.
addon.created_at requiredstring (date-time)
addon.removed_at requiredstring or null (date-time)
proration_cents requiredintegerThe prorated charge for the rest of the current period, after any promo discount.
job_id requiredstring or null (uuid)
discount_centsintegerCents 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

StatusBodyDescription
200CompanyAddonSummaryAdd-on summary
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
items requiredarray of object
items[].key requiredstringadditional_disk, redis_512mb, tier_40, additional_previews: the add-on key or tier.
items[].kind requiredstringOne of: addon, site_tier, preview_slots.
items[].name requiredstring
items[].summary requiredstringOne sentence about the add-on.
items[].term requiredstringOne of: monthly, annual, triennial, hourly, per_backup.
items[].quantity requiredintegerUnits held: blocks, sites, slots. Range: 0 to any.
items[].subscription_id requiredstring or null (uuid)The subscription the units bill on, when they all bill on one.
items[].uses requiredarray of objectThe places that use it, by site name, at most COMPANY_ADDON_USES_LIMIT.
items[].uses_total requiredintegerRange: 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the add-on on the company.

Responses

StatusBodyDescription
202CompanyAddonRemovedAdd-on removed
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
addon requiredobject
addon.id requiredstring (uuid)
addon.addon_key requiredstring
addon.quantity requiredinteger
addon.environment_id requiredstring or null (uuid)
addon.subscription_idstring or null (uuid)The subscription whose Stripe item bills the add-on, or null when it bills on its own.
addon.site_idstring or null (uuid)The site the add-on belongs to, when it names an environment. Null for a company wide add-on.
addon.status requiredstringOne of: pending, active, failed, removed.
addon.proration_cents requiredinteger
addon.monthly_cents requiredinteger
addon.credit_cents requiredinteger
addon.job_id requiredstring or null (uuid)The node job that applies it, or null when there is no node work.
addon.created_at requiredstring (date-time)
addon.removed_at requiredstring or null (date-time)
credit_cents requiredintegerThe credit for the unused part of the period.
job_id requiredstring 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

StatusBodyDescription
200DedicatedServerResponseThe server and any open request
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
server requiredobject or nullNull when the company has no live dedicated server.
server.id requiredstringThe invoice record id.
server.name requiredstringThe server name staff and the customer both read, such as ded-4f2a91c7.
server.region requiredstring
server.region_name requiredstring
server.tier requiredstring
server.vcpu requiredinteger or null
server.memory_mb requiredinteger or null
server.disk_gb requiredinteger or null
server.included_bandwidth_gb requiredinteger or nullBandwidth included each month in GB.
server.bandwidth_used_gb requirednumber or nullBandwidth used this month in GB. Null until metering reports it: the hook is dedicatedBandwidthUsedGb in the API. Range: 0 to any.
server.term requiredstringOne of: monthly, annual, three_year.
server.monthly_cents requiredintegerThe monthly price, or the monthly equivalent of the term. Range: 0 to any.
server.total_cents requiredintegerThe one charge of the term in cents. Not refundable. Range: 0 to any.
server.status requiredstringThe record status: open (waiting for payment), paid, provisioning, ready, active, cancelling, and so on.
server.next_invoice_at requiredstring 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 requiredstring or null (date-time)When a cancelled server's paid term ends.
server.cancelled_at requiredstring or null (date-time)
server.latest_invoice requiredobject or null
server.sites requiredarray of object
server.environmentsarray of objectThe environments on the server, with their state. Optional so an older API parses.
server.lifecycle requiredobject or null
server.actions requiredobject
server.payment_noticestring or nullOne 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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.
confirmquerystringAn 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

NameTypeDescription
move_sites_to_sharedbooleanThe 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.
reasonstring
confirmbooleanCancelling ends the server and is not refunded.

Responses

StatusBodyDescription
202DedicatedServerResponseThe cancel started
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
server requiredobject or nullNull when the company has no live dedicated server.
server.id requiredstringThe invoice record id.
server.name requiredstringThe server name staff and the customer both read, such as ded-4f2a91c7.
server.region requiredstring
server.region_name requiredstring
server.tier requiredstring
server.vcpu requiredinteger or null
server.memory_mb requiredinteger or null
server.disk_gb requiredinteger or null
server.included_bandwidth_gb requiredinteger or nullBandwidth included each month in GB.
server.bandwidth_used_gb requirednumber or nullBandwidth used this month in GB. Null until metering reports it: the hook is dedicatedBandwidthUsedGb in the API. Range: 0 to any.
server.term requiredstringOne of: monthly, annual, three_year.
server.monthly_cents requiredintegerThe monthly price, or the monthly equivalent of the term. Range: 0 to any.
server.total_cents requiredintegerThe one charge of the term in cents. Not refundable. Range: 0 to any.
server.status requiredstringThe record status: open (waiting for payment), paid, provisioning, ready, active, cancelling, and so on.
server.next_invoice_at requiredstring 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 requiredstring or null (date-time)When a cancelled server's paid term ends.
server.cancelled_at requiredstring or null (date-time)
server.latest_invoice requiredobject or null
server.sites requiredarray of object
server.environmentsarray of objectThe environments on the server, with their state. Optional so an older API parses.
server.lifecycle requiredobject or null
server.actions requiredobject
server.payment_noticestring or nullOne 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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.
confirmquerystringAn 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

NameTypeDescription
site_idstring (uuid)One site to move back. Leave it out to move every site on the server.
confirmbooleanMoving a live site is a real change.

Responses

StatusBodyDescription
202DedicatedServerResponseThe move started
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

202 response fields

NameTypeDescription
server requiredobject or nullNull when the company has no live dedicated server.
server.id requiredstringThe invoice record id.
server.name requiredstringThe server name staff and the customer both read, such as ded-4f2a91c7.
server.region requiredstring
server.region_name requiredstring
server.tier requiredstring
server.vcpu requiredinteger or null
server.memory_mb requiredinteger or null
server.disk_gb requiredinteger or null
server.included_bandwidth_gb requiredinteger or nullBandwidth included each month in GB.
server.bandwidth_used_gb requirednumber or nullBandwidth used this month in GB. Null until metering reports it: the hook is dedicatedBandwidthUsedGb in the API. Range: 0 to any.
server.term requiredstringOne of: monthly, annual, three_year.
server.monthly_cents requiredintegerThe monthly price, or the monthly equivalent of the term. Range: 0 to any.
server.total_cents requiredintegerThe one charge of the term in cents. Not refundable. Range: 0 to any.
server.status requiredstringThe record status: open (waiting for payment), paid, provisioning, ready, active, cancelling, and so on.
server.next_invoice_at requiredstring 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 requiredstring or null (date-time)When a cancelled server's paid term ends.
server.cancelled_at requiredstring or null (date-time)
server.latest_invoice requiredobject or null
server.sites requiredarray of object
server.environmentsarray of objectThe environments on the server, with their state. Optional so an older API parses.
server.lifecycle requiredobject or null
server.actions requiredobject
server.payment_noticestring or nullOne 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

NameInTypeDescription
regionquerystringA region code such as us-east4. Defaults to the server's region, else the default region.

Responses

StatusBodyDescription
200DedicatedServerQuoteSizes and prices
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
region requiredstring
region_name requiredstring
stale requiredbooleanTrue when Google's price for the region was read a while ago.
data requiredarray of objectSizes by vCPUs and memory. The key is dedicated-<vCPUs>, and no machine type is sent.
data[].key requiredstringThe key to send when creating an invoice, such as c4d-8.
data[].vcpu requiredinteger
data[].memory_mb requiredinteger
data[].disk_gb requiredintegerThe data disk in GB: 500, and 1,000 on the 32 vCPU tier.
data[].included_bandwidth_gb requiredintegerBandwidth included each month in GB. Shown only: metering is not built.
data[].term_prices requiredobjectThe 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

StatusBodyDescription
200DedicatedServerResponseThe request is cancelled
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
server requiredobject or nullNull when the company has no live dedicated server.
server.id requiredstringThe invoice record id.
server.name requiredstringThe server name staff and the customer both read, such as ded-4f2a91c7.
server.region requiredstring
server.region_name requiredstring
server.tier requiredstring
server.vcpu requiredinteger or null
server.memory_mb requiredinteger or null
server.disk_gb requiredinteger or null
server.included_bandwidth_gb requiredinteger or nullBandwidth included each month in GB.
server.bandwidth_used_gb requirednumber or nullBandwidth used this month in GB. Null until metering reports it: the hook is dedicatedBandwidthUsedGb in the API. Range: 0 to any.
server.term requiredstringOne of: monthly, annual, three_year.
server.monthly_cents requiredintegerThe monthly price, or the monthly equivalent of the term. Range: 0 to any.
server.total_cents requiredintegerThe one charge of the term in cents. Not refundable. Range: 0 to any.
server.status requiredstringThe record status: open (waiting for payment), paid, provisioning, ready, active, cancelling, and so on.
server.next_invoice_at requiredstring 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 requiredstring or null (date-time)When a cancelled server's paid term ends.
server.cancelled_at requiredstring or null (date-time)
server.latest_invoice requiredobject or null
server.sites requiredarray of object
server.environmentsarray of objectThe environments on the server, with their state. Optional so an older API parses.
server.lifecycle requiredobject or null
server.actions requiredobject
server.payment_noticestring or nullOne 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

NameInTypeDescription
Idempotency-Key requiredheaderstringSend 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

NameTypeDescription
tier requiredstringThe size the customer would like. Staff check it and run the change.
notestring

Responses

StatusBodyDescription
201DedicatedServerResponseThe request is open
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

201 response fields

NameTypeDescription
server requiredobject or nullNull when the company has no live dedicated server.
server.id requiredstringThe invoice record id.
server.name requiredstringThe server name staff and the customer both read, such as ded-4f2a91c7.
server.region requiredstring
server.region_name requiredstring
server.tier requiredstring
server.vcpu requiredinteger or null
server.memory_mb requiredinteger or null
server.disk_gb requiredinteger or null
server.included_bandwidth_gb requiredinteger or nullBandwidth included each month in GB.
server.bandwidth_used_gb requirednumber or nullBandwidth used this month in GB. Null until metering reports it: the hook is dedicatedBandwidthUsedGb in the API. Range: 0 to any.
server.term requiredstringOne of: monthly, annual, three_year.
server.monthly_cents requiredintegerThe monthly price, or the monthly equivalent of the term. Range: 0 to any.
server.total_cents requiredintegerThe one charge of the term in cents. Not refundable. Range: 0 to any.
server.status requiredstringThe record status: open (waiting for payment), paid, provisioning, ready, active, cancelling, and so on.
server.next_invoice_at requiredstring 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 requiredstring or null (date-time)When a cancelled server's paid term ends.
server.cancelled_at requiredstring or null (date-time)
server.latest_invoice requiredobject or null
server.sites requiredarray of object
server.environmentsarray of objectThe environments on the server, with their state. Optional so an older API parses.
server.lifecycle requiredobject or null
server.actions requiredobject
server.payment_noticestring or nullOne 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the site.
Idempotency-KeyheaderstringOptional 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.
confirmquerystringAn 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

NameTypeDescription
tier requiredstringOne of: base, tier_40, tier_65, tier_125, tier_250.
confirmboolean

Responses

StatusBodyDescription
200SiteTierChangeThe site's new tier
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
site_id requiredstring (uuid)
tier requiredstringOne of: base, tier_40, tier_65, tier_125, tier_250.
charged_cents requiredintegerWhat was charged now, in cents. 0 for a downgrade. Range: 0 to any.
job_id requiredstring 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

NameInTypeDescription
id requiredpathstring (uuid)The id of the site.
tier requiredquerystringOne of: base, tier_40, tier_65, tier_125, tier_250.

Responses

StatusBodyDescription
200SiteTierPreviewSite tier preview
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
site_id requiredstring (uuid)
subscription_id requiredstring or null (uuid)
from requiredstringOne of: base, tier_40, tier_65, tier_125, tier_250.
to requiredstringOne of: base, tier_40, tier_65, tier_125, tier_250.
from_name requiredstring
to_name requiredstring
direction requiredstringOne of: up, down, same.
allowed requiredboolean
refusals requiredarray of object
refusals[].code requiredstringOne of: same_tier, not_sold, no_license, test_site, change_at_renewal, not_writable, dispute_open, billing_details_required.
refusals[].message requiredstring
interval requiredstring or nullOne of: monthly, annual, triennial.
new_price_cents requiredintegerThe site's tier price for one billing period after the change. Range: 0 to any.
price_change_cents requiredintegerThe change to the license's price each period: positive costs more.
adjustment_cents requiredintegerThe 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_centsintegerThe tier's own prorated amount for the rest of the period, without pending_lines. Optional so an older API parses.
pending_linesarray of objectLines 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 requiredstringIn plain words, such as "Data center surcharge, Frankfurt, prorated".
pending_lines[].amount_cents requiredintegerPositive is charged, negative is a credit.
pending_lines[].lookup_key requiredstring or nullThe catalog key of the line's price, or null for a one time line.
billed requiredstringOne of: now, next_invoice.
non_refundable requiredboolean
limits requiredobjectThe site's limits at the new tier.
limits.bandwidth_bytes requiredinteger or nullIncluded server bandwidth a month in bytes: what the site's server sends out. Range: 0 to any.