Skip to content
BrainyShorts Docs
Esc
↑↓navigate↵open⌘Jpreview

Get a checkout link

Returns a Stripe Checkout URL for the key owner. Give it to the user to open and pay. When the user already pays, returns a billing portal URL with portal: true for switching plans.

POST/api/cli/billing/checkout
Authorization
AuthorizationBearer token (ba_sk_...) · headerrequired

API key from /dashboard/api-keys. Keys expire after 365 days.

or
AuthorizationBearer token (ba_mcp_access_...) · headerrequired

The OAuth access token the hosted MCP server issues (brainy:read for GET routes, brainy:write for everything else). One login serves MCP, the CLI and the desktop app. A token without the needed scope gets 403 Insufficient scope.

Request body
requiredapplication/json
planstringrequired
Allowed:creatorpro
Responses
200

OK

urlstring<uri>required
portalbooleanrequired
400

INVALID_PLAN

errorstringrequired
codestring
401

Missing, invalid, expired, or revoked API key

errorstringrequired
codestring
404

BILLING_DISABLED: paid plans are not open

errorstringrequired
codestring
503

PLAN_UNAVAILABLE

errorstringrequired
codestring
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST "https://www.brainyshorts.com/api/cli/billing/checkout" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "plan": "creator"
}'
Response
{
  "url": "http://example.com",
  "portal": true
}