Workspaces

Plans and billing

The workspace plans, how to read your limits from the subscription, and the checkout and billing portal routes.

Team and Agency are not available to buy yet

Team and Agency subscriptions cannot be bought yet. The checkout route exists, and answers with the code billing_not_configured until billing is switched on. App plans are priced per app and apply once app hosting is available. See the pricing page.

Workspace plans

The figures below are generated from the same plan definitions the API enforces, so they cannot drift from the product. Prices are in US dollars and may change before paid plans can be bought. The Apps column applies once app hosting is available; apps cannot be created yet.

Workspace plans
PlanPriceMembersAppsAudit log
FreeFree1107 days
Team$19/mo1010090 days
Agency$49/mo50Unlimited365 days

Read your limits

GET /workspaces/{workspaceId}/subscription returns the plan and its entitlements for the workspace. Read limits from this response and never copy numbers into your own code. Owner, admin and billing roles may call it, with a session or an API token.

Subscription fields
FieldMeaning
workspaceIdThe workspace.
planIdOne of free, team, agency.
statusOne of active, past_due, cancelled, trialing.
providermanual for a plan set without a payment provider, stripe for a paid subscription.
currentPeriodEndEnd of the current period as an ISO time, or null.
cancelAtPeriodEndTrue when the subscription will end at the period end.
entitlementsmaxMembers, maxApps (null means unlimited), clientAccounts, whiteLabel and auditLogDays.

The clientAccounts and whiteLabel entitlements describe agency features that are not available yet.

Read the subscription
curl -sS https://api.perkhost.com/api/v1/workspaces/$WORKSPACE_ID/subscription \
  -H "Authorization: Bearer $PERKHOST_TOKEN"

When a limit is reached

A request that would go past a plan limit, such as adding a member to a full workspace, answers 402. The body has code: "plan_required", the feature, the current planId and a message you can show to a person.

Checkout and the billing portal

  • POST /workspaces/{workspaceId}/billing/checkout takes planId (team or agency), a successUrl and a cancelUrl, both http or https URLs. It returns { "url": ... }, a hosted Stripe page to send the person to.
  • POST /workspaces/{workspaceId}/billing/portal takes a returnUrl and returns { "url": ... }, the Stripe page where a subscription is managed.
  • Both are for the owner, admin and billing roles, with a session. When billing is not set up they answer 409 with the code billing_not_configured.

Stripe reports payment events to PerkHost through a signed webhook. It is not part of the API you call.