---
title: "Create billing portal session REST API | HitKeep"
description: "Reference for the HitKeep REST API operation Create billing portal session, including request parameters, responses, and authentication notes."
canonical: "https://hitkeep.com/api/operations/apicloudbillingportal/"
---

# Create billing portal session REST API

POST

/api/cloud/billing/portal

FetchcURL

```
const url = 'http://127.0.0.1:25737/api/cloud/billing/portal';
const options = {
  method: 'POST',
  headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'},
  body: '{"locale":"example"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```
curl --request POST \
  --url http://127.0.0.1:25737/api/cloud/billing/portal \
  --header 'Content-Type: application/json' \
  --cookie hk_token=<hk_token> \
  --data '{ "locale": "example" }'
```

-

Creates a Stripe Customer Portal session for the authenticated hosted cloud team.

## Authorizations

- **[cookieAuth](https://hitkeep.com/api/#cookieauth)**

## Request Bodyrequired

application/json

object

**locale**

string

##### Examplegenerated

```
{
  "locale": "example"
}
```

## Responses

### 200

Billing portal session

application/json

object

**url**

required

string

##### Examplegenerated

```
{
  "url": "example"
}
```

### 401

Unauthorized

application/json

object

**message**

string

##### Examplegenerated

```
{
  "message": "example"
}
```

### 404

Cloud billing account not found

application/json

object

**message**

string

##### Examplegenerated

```
{
  "message": "example"
}
```

### 409

Stripe customer is not configured

application/json

object

**message**

string

##### Examplegenerated

```
{
  "message": "example"
}
```

### 502

Unable to start billing portal

application/json

object

**message**

string

##### Examplegenerated

```
{
  "message": "example"
}
```

[Previous Create billing checkout session](https://hitkeep.com/api/operations/apicloudbillingcheckout/)[Next Create managed cloud account](https://hitkeep.com/api/operations/apicloudsignup/)
