Skip to content

Start a checkout session

POST
/billing/checkout
curl --request POST \
--url https://example.com/billing/checkout \
--header 'Content-Type: application/json' \
--cookie bottle.session_token=<bottle.session_token> \
--data '{ "plan": "starter" }'

Returns a Stripe Checkout URL. The subscription itself is recorded when Stripe says it exists, not when this returns.

Media typeapplication/json
object
plan
required
string
Allowed values: starter round

Where to go

Media typeapplication/json
object
url
required

Send the person here.

string format: uri
Examplegenerated
{
"url": "https://example.com"
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not allowed to manage billing, or asking for a key to do it

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Billing is not configured on this deployment

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}