Open a checkout session for a plan
Creates a Polar checkout session for the requested plan and interval, sized to the workspace's current seat count, and returns the URL for an embedded or hosted checkout. Optional embedOrigin and successUrl must use configured app origins. Requires a Clerk session with a synced profile and the `billing:manage` workspace permission; opening checkout also records a pricing-experiment exposure so a direct link is attributed like a catalog view.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringapplication/json- body
plan*string"free""team""business""enterprise"interval*string"month""year"successUrl?string|nullembedOrigin?string|nullcustomerEmail?string|nullSuccess
application/json- response
data*curl -X POST 'https://api.snoze.dev/v1/workspaces/string/billing/checkout' \ -H 'Content-Type: application/json' \ -d '{ "plan": "free", "interval": "month"}'{ "data": { "id": "string", "url": "string" }}Recover the workspace's pending checkout
Requires billing:manage. Returns the existing verified recurring checkout without creating or changing a purchase, including legacy single-product sessions. Expired and failed sessions return null.
Read payment and webhook completion for a checkout
Requires billing:manage and verifies that the checkout belongs to this workspace. Completion requires the exact Polar order or subscription to be applied locally by a webhook; this read never grants paid access.