Create a Stripe Customer Portal session
POST
/billing/portal
const url = 'https://api.krakenkey.io/billing/portal';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"flow":"switch_interval"}'};
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/portal \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "flow": "switch_interval" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
flow
Open the portal on confirming a switch between monthly and yearly billing
string
Responses
Section titled “Responses”Portal session created
Unauthorized
No subscription found