Start a new subscription via Stripe Checkout
curl --request POST \
--url https://app.hookie.ai/admin/api/billing/subscribe \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"plan": "standard"
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({plan: 'standard'})
};
fetch('https://app.hookie.ai/admin/api/billing/subscribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/billing/subscribe"
payload = { "plan": "standard" }
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"session_id": "<string>",
"checkout_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Billing
Start a new subscription via Stripe Checkout
POST
/
admin
/
api
/
billing
/
subscribe
Start a new subscription via Stripe Checkout
curl --request POST \
--url https://app.hookie.ai/admin/api/billing/subscribe \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"plan": "standard"
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({plan: 'standard'})
};
fetch('https://app.hookie.ai/admin/api/billing/subscribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/billing/subscribe"
payload = { "plan": "standard" }
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"session_id": "<string>",
"checkout_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Authorizations
sessionbearerAuth
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Body
application/json
Only the exact string 'team' selects Team; every other value, and an absent or unparseable body, means 'standard' (Pro). Team quantity is set server-side to the workspace's current membership count.
Available options:
standard, team Response
Checkout session created. Redirect the browser to checkout_url. Success/cancel return to {APP_ORIGIN}/settings/billing?status=success|cancel. The plan only changes when the signed Stripe webhook confirms the subscription.