Skip to content

Change the plan

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

Moving up costs money today, so this returns a page to confirm the amount on. Moving down happens at renewal, costs nothing now, and is recorded immediately. Asking for the plan they are already on cancels a move that was waiting.

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

Somewhere to confirm, or where this business now stands

Media typeapplication/json
object
url
required
string | null format: uri
subscription
required
object
plan
required
string
Allowed values: starter round depot
status
required
string
Allowed values: trialing active past_due unpaid canceled incomplete incomplete_expired paused none
inGoodStanding
required
boolean
manageable
required
boolean
trialEndsAt
required
string | null format: date-time
currentPeriodEnd
required
string | null format: date-time
cancelAt
required
string | null format: date-time
pendingPlan
required
string | null
Allowed values: starter round depot
pendingPlanAt
required
string | null format: date-time
rateLimits
required
object
requestsPerMinute
required
integer
> 0
heavyPerMinute
required
integer
> 0
discount
required
object
percentOff
required
integer
>= 1 <= 100
until
required
string | null format: date-time
customPrice
required
object
monthlyPence
required
integer
from
required
string | null format: date-time
vehiclesUsed
required
integer
Example
{
"subscription": {
"plan": "starter",
"status": "trialing",
"pendingPlan": "starter"
}
}

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

Nothing to move: this business has never paid

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