Create billing checkout session REST API
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 Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
locale
string
plan_code
required
string
Responses
Section titled “Responses”Billing checkout session
Media typeapplication/json
object
url
required
string
Examplegenerated
{ "url": "example"}Invalid request
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}Unauthorized
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}Cloud billing account not found
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}Use billing portal to manage an existing paid plan
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}Unable to start checkout
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}