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
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.
| Plan | Price | Members | Apps | Audit log |
|---|---|---|---|---|
| Free | Free | 1 | 10 | 7 days |
| Team | $19/mo | 10 | 100 | 90 days |
| Agency | $49/mo | 50 | Unlimited | 365 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.
| Field | Meaning |
|---|---|
| workspaceId | The workspace. |
| planId | One of free, team, agency. |
| status | One of active, past_due, cancelled, trialing. |
| provider | manual for a plan set without a payment provider, stripe for a paid subscription. |
| currentPeriodEnd | End of the current period as an ISO time, or null. |
| cancelAtPeriodEnd | True when the subscription will end at the period end. |
| entitlements | maxMembers, maxApps (null means unlimited), clientAccounts, whiteLabel and auditLogDays. |
The clientAccounts and whiteLabel entitlements describe agency features that are not available yet.
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/checkouttakesplanId(teamoragency), asuccessUrland acancelUrl, both http or https URLs. It returns{ "url": ... }, a hosted Stripe page to send the person to.POST /workspaces/{workspaceId}/billing/portaltakes areturnUrland 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.