Upgrade subscription with proration
POST
/billing/upgrade
const url = 'https://api.krakenkey.io/billing/upgrade';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"plan":"starter"}'};
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://api.krakenkey.io/billing/upgrade \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "plan": "starter" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
plan
required
Plan to upgrade to
string
Example
teamResponses
Section titled “Responses”Subscription upgraded
Invalid upgrade path
Unauthorized
No active subscription