create_checkout_session
Create a Stripe Checkout link that subscribes the workspace to a plan. Returns {url, sessionId}. Nothing is charged until a person opens the url and completes payment, so hand it to whoever owns the workspace. A workspace a person signed up for has zero credits and cannot crawl until a plan or credit pack is on the account; one created through POST /api/agent/signup starts with a one-time free grant and can crawl until it runs out. The caller must be an OWNER or ADMIN of the tenant. An agent-created workspace must be claimed by a person first: until then this returns 409 WORKSPACE_UNCLAIMED with the claimUrl to send them. Plan prices and monthly credits: GET /api/pricing (no token needed).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tenantId | Yes | Path parameter tenantId. | |
| priceTier | Yes | Plan to subscribe to. base is the cheapest; studio and agency carry more monthly credits and storage. | |
| returnUrl | No | Where Stripe sends the person after checkout. Must be a page on the dashboard origin; defaults to the workspace's billing page. Leave it out unless you have a reason. |