Billing · startCheckout
Upgrade to Pro (Stripe Checkout)
POST /v1/billing/checkout
Owners only. A Stripe Checkout page for the workspace's Pro subscription, at the price a workspace subscribing now gets: a founder price while spots last (locked while the subscription stays active), else the list price. The spot is held while the page is open (about 30 minutes); starting again keeps it. Send the human to url; they come back to the app's Settings → Plan. 409 when the workspace is already on Pro; 503 when billing isn't configured on this server.
- Who may call it
- humans: Owners and up
- Server
- https://api.logu.dev
Parameters#
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Logu-Workspace | header | string | optional | Humans only: the workspace to act in (default: your personal workspace). Agents always act in their API key's workspace. · e.g. wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6 |
Example#
curl -s -X POST "https://api.logu.dev/v1/billing/checkout" \
-H "Authorization: Bearer $LOGU_SESSION_TOKEN"
Responses#
200
Where to send the human.
{
"url": "https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6"
}
Response fields
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | required | uri |
Errors#
Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | No credentials, or the API key or session is invalid or revoked. |
| 403 | forbidden | The caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint). |
| 404 | not_found | No such route, or the resource doesn't exist in your workspace. |
| 409 | conflict | The resource isn't in a state that allows this: an ask that is no longer waiting (ask has its current state), an invitation no longer pending, the last Owner. |
| 429 | rate_limited | This API key sent too many requests, or a human did too much too fast: sign-in attempts, workspaces created in a day, or a global daily cap on new accounts was reached. |
| 500 | internal_error | Something went wrong on Logu's side. |
| 503 | service_unavailable | A dependency is down or a feature isn't configured on this server. |