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 __Host-bottle.session_token=<__Host-bottle.session_token> \
--data '{ "plan": "shop" }'

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: shop yard round

Where to go

Media typeapplication/json
object
url
required

Send the person here.

string format: uri

Example generated

{
"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"
}