Subscribe
Starts Pro or Team by card in Stripe Checkout, or switches a live Stripe Pro subscription to Team in place. Fails with failed_precondition, reason ALREADY_SUBSCRIBED, when already on that plan or higher.
Starts Pro or Team by card in Stripe Checkout, or switches a live Stripe Pro subscription to Team in place. Fails with failed_precondition, reason ALREADY_SUBSCRIBED, when already on that plan or higher.
bearerAuthorizationBearer <token>An access token, or an API key.
organization*stringThe organization's ID.
^org_[0-7][0-9a-hjkmnp-tv-z]{25}$application/json- body
plan*stringThe plan to subscribe to: PRO ($15 a month flat) or TEAM ($30 a builder a month).
"PRO""TEAM"returnUri*stringThe console's page that Stripe's checkout returns to, with subscription=started once paid.
OK
application/json- response
checkoutUri?stringWhere the browser goes to pay in Stripe's checkout; empty when an existing Pro subscription switched to Team in place.
switched?booleanTrue when an existing Stripe Pro subscription switched to Team in place without a new checkout.
curl -X POST 'https://api.kosem.ai/v1/organizations/string/billingAccount/subscribe' \
-H 'Content-Type: application/json' \
-d '{
"plan": "PRO",
"returnUri": "string"
}'{
"checkoutUri": "string",
"switched": true
}