Open the billing portal
POST
/billing/portal
const url = 'https://example.com/billing/portal';const options = { method: 'POST', headers: {cookie: 'bottle.session_token=<bottle.session_token>'}};
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/billing/portal \ --cookie bottle.session_token=<bottle.session_token>Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”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"}Nothing to manage yet: 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"}