Billing

Paid features and add-ons: what the organization may use now, and the plan or Build Credits that unlock the rest (projects:read or billing:read). A locked feature answers 402 upgrade_required when used (docs/ENTITLEMENTS.md)

get/billing/entitlements

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/billing/entitlements
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Query parameters

orgIdstring

Organization id (required when you belong to several)

Response

Entitlements

organizationIdstring uuid required
planstring required

the organization's plan (free, pro, business), or unlimited (no plan limits, set by the operator)

enforcedboolean required

false: this server does not enforce paid features (a development server without billing) and allows everything

billingConfiguredboolean required

plans and Build Credits can be bought on this server; false: offer to get in touch instead of Checkout

purchasedCreditsnumber required

purchased Build Credits left: what credit-priced add-ons are paid from (the plan's own allowance is not)

allowedClassesstring[] nullable

the site classes the plan of the team hosts (migration 203; null = every class); absent when billing could not be read

Changes

No recorded changes to this operation across all 1 revision of this API.