Skip to content
BrainyShorts Docs
Esc
navigateopen⌘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.

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
}