Create billing checkout session
POST
/api/cloud/billing/checkout
const url = 'https://hitkeep.com/api/cloud/billing/checkout';const options = { method: 'POST', headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'}, body: '{"locale":"example","plan_code":"pro"}'};
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://hitkeep.com/api/cloud/billing/checkout \ --header 'Content-Type: application/json' \ --cookie hk_token=<hk_token> \ --data '{ "locale": "example", "plan_code": "pro" }'Creates a Stripe Checkout session to upgrade the authenticated hosted cloud team to a paid plan.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
locale
string
plan_code
required
string
Responses
Section titled “ Responses ”Billing checkout session
Media type application/json
object
url
required
string
Example generated
{ "url": "example"}Invalid request
Media type application/json
object
message
string
Example generated
{ "message": "example"}Unauthorized
Media type application/json
object
message
string
Example generated
{ "message": "example"}Cloud billing account not found
Media type application/json
object
message
string
Example generated
{ "message": "example"}Use billing portal to manage an existing paid plan
Media type application/json
object
message
string
Example generated
{ "message": "example"}Unable to start checkout
Media type application/json
object
message
string
Example generated
{ "message": "example"}