Set what a plan costs
POST
/console/plans/{plan}/price
const url = 'https://example.com/console/plans/starter/price';const options = { method: 'POST', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"monthlyPence":1,"applyToExisting":"renewal","reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/console/plans/starter/price \ --header 'Content-Type: application/json' \ --cookie bottle.session_token=<bottle.session_token> \ --data '{ "monthlyPence": 1, "applyToExisting": "renewal", "reason": "example" }'Makes a new Stripe price on the plan’s product and sells it from now on. Businesses already paying the old price are moved to the new one when their month renews if applyToExisting is renewal, or left where they are with none. A business on a price agreed for it alone is never moved by this.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”plan
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
monthlyPence
required
integer
applyToExisting
required
string
reason
required
string
Responses
Section titled “Responses”The plan afterwards
Media typeapplication/json
object
plan
required
string
monthlyPence
required
integer | null
stripePriceId
required
string | null
discount
required
object
percentOff
required
integer
months
required
integer | null
setAt
required
string | null format: date-time
setByName
required
string | null
Example
{ "plan": "starter"}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not Bottle staff, no two-step sign-in, or a console role too low for this
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}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"}