# Create Stripe Customer Portal session

> Source: https://elaichi.ai/docs/api-reference/organizations/organization/createbillingportal/

`POST /organization/{id}/billing/portal`

Resource: **Organization** · API: **Organizations**

## Path parameters

- **`id`** _(string, required)_
  Resource id

## Response body

- **`url`** _(string)_

## Code examples

### curl

```bash
curl -X POST 'https://api.elaichi.ai/organization/<id>/billing/portal' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/organization/<id>/billing/portal', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/organization/<id>/billing/portal"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.post(url, headers=headers)
print(response.json())
```
